Some objects, like EVV2G, have the following in the their verify_node function:
validate(self.ports["usage"].initial_value != 0, "EV usage port needs usage profile added.")
The result of which means that, in this case, usage data needs to be supplied upon instantiation. However objects, such as the node and EVDemandProfile do not have these checks. In fact, if you trace the inheritance of the ElectricalDemand port on an EVDemandProfile object you find the Sink object which has the following validator:
non_neg_check = validator("initial_value", allow_reuse=True)(nonnegative_load)
and as Sink inherits from Port, initial_value is assigned a default value:
initial_value: dict = 0
This seems like two types of behaviours that I feel need to be reconciled. Currently in MES, if you want to build a network you need to instantiate a EVV2G with dummy usage and availability data, which is overwritten later. If you're building a network with a EVDemandProfile object, you don't need to insert dummy data into it.
Some objects, like
EVV2G, have the following in the theirverify_nodefunction:validate(self.ports["usage"].initial_value != 0, "EV usage port needs usage profile added.")The result of which means that, in this case, usage data needs to be supplied upon instantiation. However objects, such as the
nodeandEVDemandProfiledo not have these checks. In fact, if you trace the inheritance of theElectricalDemandport on anEVDemandProfileobject you find theSinkobject which has the following validator:non_neg_check = validator("initial_value", allow_reuse=True)(nonnegative_load)and as
Sinkinherits fromPort,initial_valueis assigned a default value:initial_value: dict = 0This seems like two types of behaviours that I feel need to be reconciled. Currently in MES, if you want to build a network you need to instantiate a
EVV2Gwith dummy usage and availability data, which is overwritten later. If you're building a network with aEVDemandProfileobject, you don't need to insert dummy data into it.