Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/mesosim/MEVehicleControl.h
169666 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 MEVehicleControl.h
15
/// @author Daniel Krajzewicz
16
/// @date Wed, 10. Dec 2003
17
///
18
// The class responsible for building and deletion of vehicles (meso-version)
19
/****************************************************************************/
20
#pragma once
21
#include <config.h>
22
23
#include <vector>
24
#include <microsim/MSVehicleControl.h>
25
26
27
// ===========================================================================
28
// class definitions
29
// ===========================================================================
30
/**
31
* @class MEVehicleControl
32
* @brief The class responsible for building and deletion of vehicles (gui-version)
33
*
34
* Builds GUIVehicle instances instead of MSVehicle.
35
*
36
* @see MSVehicleControl
37
* @todo This is partially unsecure due to concurrent access...
38
* @todo Recheck vehicle deletion
39
*/
40
class MEVehicleControl : public MSVehicleControl {
41
public:
42
/// @brief Constructor
43
MEVehicleControl();
44
45
46
/// @brief Destructor
47
~MEVehicleControl();
48
49
50
/// @name Vehicle creation
51
/// @{
52
53
/** @brief Builds a vehicle, increases the number of built vehicles
54
*
55
* Instead of a MSVehicle, a GUIVehicle is built
56
*
57
* @param[in] defs The parameter defining the vehicle
58
* @param[in] route The route of this vehicle
59
* @param[in] type The type of this vehicle
60
* @param[in] ignoreStopErrors whether invalid stops trigger a warning only
61
* @param[in] source whether we are just reading the route file or creating via trigger, traci, ...
62
* @return The built vehicle (MEVehicle instance)
63
* @see MSVehicleControl::buildVehicle
64
*/
65
virtual SUMOVehicle* buildVehicle(SUMOVehicleParameter* defs,
66
ConstMSRoutePtr route, MSVehicleType* type,
67
const bool ignoreStopErrors, const VehicleDefinitionSource source = VehicleDefinitionSource::ROUTEFILE,
68
bool addRouteStops = true) override;
69
/// @}
70
71
72
private:
73
/// @brief invalidated copy constructor
74
MEVehicleControl(const MEVehicleControl& s);
75
76
/// @brief invalidated assignment operator
77
MEVehicleControl& operator=(const MEVehicleControl& s);
78
79
80
};
81
82