Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/microsim/MSNoLogicJunction.h
185785 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2001-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 MSNoLogicJunction.h
15
/// @author Christian Roessel
16
/// @author Daniel Krajzewicz
17
/// @author Michael Behrisch
18
/// @author Jakob Erdmann
19
/// @date Wed, 12 Dez 2001
20
///
21
// logic, e.g. for exits.
22
/****************************************************************************/
23
#pragma once
24
#include <config.h>
25
26
#include <string>
27
#include <vector>
28
#include <bitset>
29
#include "MSJunction.h"
30
31
// ===========================================================================
32
// class declarations
33
// ===========================================================================
34
class MSLane;
35
36
37
// ===========================================================================
38
// class definitions
39
// ===========================================================================
40
/**
41
* @class MSNoLogicJunction
42
* This junctions let all vehicles past through so they only should be used on
43
* junctions where incoming vehicles are no foes to each other (may drive
44
* simultaneously).
45
*/
46
class MSNoLogicJunction : public MSJunction {
47
public:
48
/// Destructor.
49
virtual ~MSNoLogicJunction();
50
51
/** @brief Constructor
52
* @param[in] id The id of the junction
53
* @param[in] position The position of the junction
54
* @param[in] shape The shape of the junction
55
* @param[in] incoming The incoming lanes
56
* @param[in] internal The internal lanes
57
*/
58
MSNoLogicJunction(const std::string& id, SumoXMLNodeType type, const Position& position,
59
const PositionVector& shape,
60
const std::string& name,
61
std::vector<MSLane*> incoming,
62
std::vector<MSLane*> internal);
63
64
/** Initialises the junction after the net was completely loaded */
65
void postloadInit();
66
67
/** @brief Returns all internal lanes on the junction
68
*/
69
virtual const std::vector<MSLane*> getInternalLanes() const;
70
71
private:
72
/** Lanes incoming to the junction */
73
std::vector<MSLane*> myIncomingLanes;
74
75
/** The junctions internal lanes */
76
std::vector<MSLane*> myInternalLanes;
77
78
private:
79
/// @brief Invalidated copy constructor.
80
MSNoLogicJunction(const MSNoLogicJunction&);
81
82
/// @brief Invalidated assignment operator.
83
MSNoLogicJunction& operator=(const MSNoLogicJunction&);
84
85
};
86
87