/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file RODFDetectorFlow.h14/// @author Daniel Krajzewicz15/// @author Eric Nicolay16/// @author Michael Behrisch17/// @date Thu, 16.03.200618///19// missing_desc20/****************************************************************************/21#pragma once22#include <config.h>2324#include <utils/common/SUMOTime.h>25#include <map>26#include <string>27#include <vector>282930// ===========================================================================31// struct definitions32// ===========================================================================33/**34* @class FlowDef35* @brief Definition of the traffic during a certain time containing the flows and speeds36*/37struct FlowDef {38// Number of passenger vehicles that passed within the described time39double qPKW;40// Number of heavy duty vehicles that passed within the described time41double qLKW;42// Mean velocity of passenger vehicles within the described time43double vPKW;44// Mean velocity of heavy duty vehicles within the described time45double vLKW;46// begin time (in s)47// int time;48// probability for having a heavy duty vehicle(qKFZ!=0 ? (qLKW / qKFZ) : 0;)49double fLKW;50// initialise with 051mutable double isLKW;52//53bool firstSet;54};555657// ===========================================================================58// class definitions59// ===========================================================================60/**61* @class RODFDetectorFlows62* @brief A container for flows63*/64class RODFDetectorFlows {65public:66RODFDetectorFlows(SUMOTime startTime, SUMOTime endTime,67SUMOTime stepOffset);68~RODFDetectorFlows();69void addFlow(const std::string& detector_id, SUMOTime timestamp,70const FlowDef& fd);71void removeFlow(const std::string& detector_id);72void setFlows(const std::string& detector_id, std::vector<FlowDef>&);7374const std::vector<FlowDef>& getFlowDefs(const std::string& id) const;75bool knows(const std::string& det_id) const;76double getFlowSumSecure(const std::string& id) const;77double getMaxDetectorFlow() const;78void printAbsolute() const;7980void mesoJoin(const std::string& nid, const std::vector<std::string>& oldids);8182protected:83std::map<std::string, std::vector<FlowDef> > myFastAccessFlows;84SUMOTime myBeginTime, myEndTime, myStepOffset;85mutable double myMaxDetectorFlow;8687private:88/// @brief Invalidated copy constructor89RODFDetectorFlows(const RODFDetectorFlows& src);9091/// @brief Invalidated assignment operator92RODFDetectorFlows& operator=(const RODFDetectorFlows& src);9394};959697