Line data Source code
1 : #pragma once 2 : 3 : #include <string> 4 : #include <unordered_map> 5 : #include <utility> 6 : #include <vector> 7 : 8 : #include "Alg/Graph.hpp" 9 : #include "Static/SUMOAdapter.hpp" 10 : #include "Static/Static.hpp" 11 : #include "Static/supply/Network.hpp" 12 : #include "data/SUMO/Network.hpp" 13 : #include "data/VISUM/OFormatDemand.hpp" 14 : 15 : namespace Static { 16 14 : class Demand { 17 : public: 18 : template<typename T, typename... args> 19 : class Loader { 20 : public: 21 : Demand load(T arg1, args... arg2); 22 : }; 23 : 24 : private: 25 : // clang-format off 26 : std::unordered_map< 27 : Network::Node, 28 : std::unordered_map< 29 : Network::Node, 30 : Flow 31 : > 32 : > flows; 33 : // clang-format on 34 : 35 : public: 36 : void addDemand(Network::Node u, Network::Node v, Flow f); 37 : 38 : std::vector<Network::Node> getStartNodes() const; 39 : std::vector<Network::Node> getDestinations(Network::Node u) const; 40 : 41 : Flow getDemand(Network::Node u, Network::Node v) const; 42 : Flow getTotalDemand() const; 43 : }; 44 : 45 : template<> 46 : class Demand::Loader< 47 : const VISUM::OFormatDemand &, 48 : const Static::SUMOAdapter &> { 49 : public: 50 : Demand load( 51 : const VISUM::OFormatDemand &oDemand, 52 : const SUMOAdapter &adapter 53 : ); 54 : }; 55 : 56 : } // namespace Static