Closed jnnr closed 4 years ago
This PR adds a __repr__() method to the ThermalNetwork class. This allows you to print() a ThermalNetwork and get the following:
__repr__()
thermal_network = dhnx.network.ThermalNetwork() print(thermal_network) # empty dhnx.network.ThermalNetwork object containing no components thermal_network.add('Producer', id=0) print(thermal_network) # dhnx.network.ThermalNetwork object with these components # * 1 producers
This PR adds a
__repr__()
method to the ThermalNetwork class. This allows you to print() a ThermalNetwork and get the following: