CityDrain3

class pycd3.CityDrain3(start_time='', end_time='', delta_t='')

CityDrain3 simulation interface

add_connection(source, source_port_name, sink, sink_port_name)

Connect two nodes

Parameters:
  • source (Node) – Source node
  • source_port_name – Port name at source
  • sink (Node) – Sink node
  • sink_port_name – Port name at sink
Returns:

None

add_node(node_type, parameter={}, node_name='')

Add node to simulation

Parameters:
  • node_type (str) – “Node type”
  • node_name (str) – “Name of the node. If not set a uuid is set”
Returns:

created Node

Return type:

Node

register_native_plugin(file_name)
Parameters:file_name – file name
Returns:None
register_python_plugin(file_name)
Parameters:file_name – file name
Returns:None
set_simulation_parameter(start_time, end_time, delta_t)

Set simulation start, end time as well as delta T

Parameters:
  • start_time (str) – start time as string e.g. “2000-Jan-01 00:00:00”
  • end_time (str) – end time as string e.g. “2001-Jan-01 00:00:00”
  • delta_t (str) – delta t in seconds e.g. “86400”
Returns:

None

start(start_time)
Parameters:start_time – start time as string (2000-Jan-01 00:00:00)
Returns:None