Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/tests/complex/tutorial/city_mobil/data/constants.py
169708 views
1
# -*- coding: utf-8 -*-
2
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
# Copyright (C) 2008-2025 German Aerospace Center (DLR) and others.
4
# This program and the accompanying materials are made available under the
5
# terms of the Eclipse Public License 2.0 which is available at
6
# https://www.eclipse.org/legal/epl-2.0/
7
# This Source Code may also be made available under the following Secondary
8
# Licenses when the conditions for such availability set forth in the Eclipse
9
# Public License 2.0 are satisfied: GNU General Public License, version 2
10
# or later which is available at
11
# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13
14
# @file constants.py
15
# @author Michael Behrisch
16
# @author Daniel Krajzewicz
17
# @date 2008-07-21
18
19
from __future__ import absolute_import
20
import os
21
import sys
22
23
INFINITY = 1e400
24
25
PREFIX = "park"
26
DOUBLE_ROWS = 8
27
ROW_DIST = 29
28
STOP_POS = ROW_DIST - 9
29
SLOTS_PER_ROW = 10
30
SLOT_WIDTH = 5
31
SLOT_LENGTH = 9
32
SLOT_FOOT_LENGTH = 5
33
CAR_CAPACITY = 3
34
CYBER_CAPACITY = 20
35
BUS_CAPACITY = 30
36
TOTAL_CAPACITY = 60
37
CYBER_SPEED = 5
38
CYBER_LENGTH = 9
39
WAIT_PER_PERSON = 5
40
OCCUPATION_PROBABILITY = 0.5
41
BREAK_DELAY = 1200
42
43
SUMO_HOME = os.path.realpath(os.environ.get(
44
"SUMO_HOME", os.path.join(os.path.dirname(__file__), "..", "..", "..", "..")))
45
sys.path.append(os.path.join(SUMO_HOME, "tools"))
46
try:
47
from sumolib import checkBinary # noqa
48
except ImportError:
49
def checkBinary(name):
50
return name
51
NETCONVERT = checkBinary("netconvert")
52
SUMO = checkBinary("sumo")
53
SUMOGUI = checkBinary("sumo-gui")
54
55