EPANET-RTX  1.1
real-time extension for the EPANET toolkit
Public Types | Public Member Functions | Protected Member Functions | List of all members
RTX::Model Class Reference

A hydraulic / water quality model abstraction. More...

#include <Model.h>

Inheritance diagram for RTX::Model:
[legend]

Public Types

typedef boost::shared_ptr< ModelsharedPointer
 

Public Member Functions

virtual void initEngine ()
 
virtual void closeEngine ()
 
std::string name ()
 
void setName (std::string name)
 
virtual void loadModelFromFile (const string &filename) throw (std::exception)
 
string modelFile ()
 
virtual void overrideControls () throw (RtxException)
 
void runSinglePeriod (time_t time)
 
void runExtendedPeriod (time_t start, time_t end)
 
void setStorage (PointRecord::sharedPointer record)
 
void setParameterSource (PointRecord::sharedPointer record)
 
bool shouldRunWaterQuality ()
 
void setShouldRunWaterQuality (bool run)
 
void initDMAs ()
 
void setDmaShouldDetectClosedLinks (bool detect)
 
bool dmaShouldDetectClosedLinks ()
 
void setDmaPipesToIgnore (vector< Pipe::sharedPointer > ignorePipes)
 
vector< Pipe::sharedPointer > dmaPipesToIgnore ()
 
void addJunction (Junction::sharedPointer newJunction)
 
void addTank (Tank::sharedPointer newTank)
 
void addReservoir (Reservoir::sharedPointer newReservoir)
 
void addPipe (Pipe::sharedPointer newPipe)
 
void addPump (Pump::sharedPointer newPump)
 
void addValve (Valve::sharedPointer newValve)
 
void addDma (Dma::sharedPointer dma)
 
Link::sharedPointer linkWithName (const string &name)
 
Node::sharedPointer nodeWithName (const string &name)
 
vector< Element::sharedPointer > elements ()
 
vector< Dma::sharedPointer > dmas ()
 
vector< Junction::sharedPointer > junctions ()
 
vector< Tank::sharedPointer > tanks ()
 
vector< Reservoir::sharedPointer > reservoirs ()
 
vector< Pipe::sharedPointer > pipes ()
 
vector< Pump::sharedPointer > pumps ()
 
vector< Valve::sharedPointer > valves ()
 
virtual void setHydraulicTimeStep (int seconds)
 
int hydraulicTimeStep ()
 
virtual void setQualityTimeStep (int seconds)
 
int qualityTimeStep ()
 
void setInitialJunctionUniformQuality (double qual)
 
void setInitialJunctionQualityFromMeasurements (time_t time)
 
virtual void setInitialModelQuality ()
 
virtual time_t currentSimulationTime ()
 
TimeSeries::sharedPointer iterations ()
 
TimeSeries::sharedPointer relativeError ()
 
bool tanksNeedReset ()
 
void setTanksNeedReset (bool needReset)
 
virtual std::ostream & toStream (std::ostream &stream)
 
vector< TimeSeries::sharedPointer > networkStatesWithMeasures ()
 
void setRecordForNetworkStatesWithMeasures (PointRecord::sharedPointer pr)
 
void setRecordForNetworkBoundariesAndMeasures (PointRecord::sharedPointer pr)
 
Units flowUnits ()
 
Units headUnits ()
 
Units pressureUnits ()
 
Units qualityUnits ()
 
Units volumeUnits ()
 
void setFlowUnits (Units units)
 
void setHeadUnits (Units units)
 
void setPressureUnits (Units units)
 
void setQualityUnits (Units units)
 
void setVolumeUnits (Units units)
 

Protected Member Functions

void setSimulationParameters (time_t time)
 
void saveNetworkStates (time_t time)
 
virtual double reservoirLevel (const string &reservoirName)
 
virtual double tankLevel (const string &tankName)
 
virtual double junctionHead (const string &junction)
 
virtual double junctionPressure (const string &junction)
 
virtual double junctionDemand (const string &junctionName)
 
virtual double junctionQuality (const string &junctionName)
 
virtual double junctionInitialQuality (const string &junctionName)
 
virtual double pipeFlow (const string &pipe)
 
virtual double pumpEnergy (const string &pump)
 
virtual void setReservoirHead (const string &reservoir, double level)
 
virtual void setReservoirQuality (const string &reservoir, double quality)
 
virtual void setTankLevel (const string &tank, double level)
 
virtual void setJunctionDemand (const string &junction, double demand)
 
virtual void setJunctionQuality (const string &junction, double quality)
 
virtual void setPipeStatus (const string &pipe, Pipe::status_t status)
 
virtual void setPumpStatus (const string &pump, Pipe::status_t status)
 
virtual void setPumpSetting (const std::string &pump, double setting)
 
virtual void setValveSetting (const string &valve, double setting)
 
virtual bool solveSimulation (time_t time)
 
virtual time_t nextHydraulicStep (time_t time)
 
virtual void stepSimulation (time_t time)
 
virtual int iterations (time_t time)
 
virtual double relativeError (time_t time)
 
virtual void setCurrentSimulationTime (time_t time)
 
double nodeDistanceXY (Node::sharedPointer n1, Node::sharedPointer n2)
 

Detailed Description

A hydraulic / water quality model abstraction.

Provides methods for simulation and storing/retrieving states and parameters, and accessing infrastructure elements

See also
Element, Junction, Pipe

The documentation for this class was generated from the following files: