Source code for pandaprosumer.mapping.fluid_mix_energy_system

from .fluid_mix import FluidMixMapping


[docs] class FluidMixEnergySystemMapping(FluidMixMapping): """ Fluid Mix mapping between controllers in different networks/producers. """
[docs] def __init__(self, container, initiator_id, responder_net, responder_id, order=0, no_chain=True, index=None): """ Initializes the GenericWiseMapping. :param container: The prosumer object :param initiator_id: The initiating controller :param responder_id: The responding controller :param order: The order of mapping application :param index: The index of the mapping """ super().__init__(container, initiator_id, responder_id, order, no_chain, index) self.responder_net = responder_net
def __str__(self): return "FluidMixEnergySystemMapping" @property def name(self): return "FluidMixEnergySystemMapping" def _validate(self): """ Validates the generic mapping. """ super()._validate()
[docs] def map(self, initiator_controller, responder_controller_id): """ Applies the element-wise mapping between the initiator and responder controllers. :param initiator_controller: The initiating controller :param responder_controller_id: The responding controller id in the mapping's responder_net """ responder_controller = self.responder_net.controller.loc[responder_controller_id].object super().map(initiator_controller, responder_controller)