19 #ifndef OPM_DYNAMICLISTECONLIMITED_HPP
20 #define OPM_DYNAMICLISTECONLIMITED_HPP
39 bool wellShutEconLimited(
const std::string& well_name)
const {
40 return std::find(m_shut_wells.begin(), m_shut_wells.end(), well_name) != m_shut_wells.end();
43 void addShutWell(
const std::string& well_name) {
44 assert( !wellShutEconLimited(well_name) );
45 assert( !wellStoppedEconLimited(well_name) );
47 m_shut_wells.push_back(well_name);
50 bool wellStoppedEconLimited(
const std::string& well_name)
const {
51 return std::find(m_stopped_wells.begin(), m_stopped_wells.end(), well_name) != m_stopped_wells.end();
54 void addStoppedWell(
const std::string& well_name) {
55 assert( !wellShutEconLimited(well_name) );
56 assert( !wellStoppedEconLimited(well_name) );
58 m_stopped_wells.push_back(well_name);
63 bool anyConnectionClosedForWell(
const std::string& well_name)
const {
64 return (m_cells_closed_connections.find(well_name) != m_cells_closed_connections.end());
67 const std::vector<int>& getClosedConnectionsForWell(
const std::string& well_name)
const {
68 return (m_cells_closed_connections.find(well_name)->second);
71 void addClosedConnectionsForWell(
const std::string& well_name,
72 const int cell_closed_connection) {
73 if (!anyConnectionClosedForWell(well_name)) {
75 std::vector<int> vector_cells = {cell_closed_connection};
76 m_cells_closed_connections[well_name] = vector_cells;
78 std::vector<int>& closed_connections = m_cells_closed_connections.find(well_name)->second;
79 closed_connections.push_back(cell_closed_connection);
84 std::vector <std::string> m_shut_wells;
85 std::vector <std::string> m_stopped_wells;
87 std::map<std::string, std::vector<int>> m_cells_closed_connections;
to handle the wells and connections violating economic limits.
Definition: DynamicListEconLimited.hpp:32