예제 #1
0
 def setUp(self):
     self.env = BaseEnvironment()
     self.heat_storage = Mock(spec=SimulatedHeatStorage)()
     self.power_meter = Mock(spec=SimulatedPowerMeter)
     self.cu = SimulatedCogenerationUnit(1, self.env)
     self.cu.heat_storage = self.heat_storage
     self.cu.power_meter = self.power_meter
예제 #2
0
    def setUp(self):
        self.env = BaseEnvironment()
        self.heat_storage = Mock(spec=SimulatedHeatStorage)
        self.power_meter = SimulatedPowerMeter(0, self.env)
        self.cu = SimulatedCogenerationUnit(1, self.env)
        self.cu.heat_storage = self.heat_storage
        self.cu.power_meter = self.power_meter

        self.cu.config['minimal_workload'] = 0.20
        self.cu.off_time = self.env.now - 1
        self.gas_input = 20.0
        self.cu.config['max_gas_input'] = self.gas_input
        self.electrical_efficiency = 0.25
        self.cu.config['electrical_efficiency'] = self.electrical_efficiency
        self.thermal_efficiency = 0.7
        self.cu.config['thermal_efficiency'] = self.thermal_efficiency
        self.total_hours_of_operation = 1
        self.cu.total_hours_of_operation = self.total_hours_of_operation
예제 #3
0
    def setUp(self):
        self.env = BaseEnvironment()
        self.heat_storage = Mock(spec=SimulatedHeatStorage)()
        self.power_meter = SimulatedPowerMeter(0, self.env)
        self.cu = SimulatedCogenerationUnit(1, self.env)
        self.cu.heat_storage = self.heat_storage
        self.cu.power_meter = self.power_meter

        self.max_gas_input = 19.0
        self.cu.config['max_gas_input'] = self.max_gas_input
        self.electrical_efficiency = 0.25
        self.cu.config['electrical_efficiency'] = self.electrical_efficiency
        self.thermal_efficiency = 0.6
        self.cu.config['thermal_efficiency'] = self.thermal_efficiency
        self.max_efficiency_loss = 0.10
        self.cu.max_efficiency_loss = self.max_efficiency_loss
        self.maintenance_interval_hours = 2000
        self.cu.config[
            'maintenance_interval_hours'] = self.maintenance_interval_hours
        self.minimal_workload = 0.40
        self.cu.config['minimal_workload'] = self.minimal_workload
        self.cu.config['minimal_off_time'] = 5.0 * 60.0
        self.off_time = self.env.now
        self.cu.off_time = self.off_time
        self.current_electrical_production = 0.0
        self.cu.current_electrical_production = self.current_electrical_production
        self.total_electrical_production = 0.0
        self.cu.total_electrical_production = self.total_electrical_production
        self.total_thermal_production = 0.0
        self.cu.total_thermal_production = self.total_thermal_production

        self.total_gas_consumption = 0.0
        self.cu.total_gas_consumption = self.total_gas_consumption

        self.cu.overwrite_workload = None
        self.cu.running = True

        self.heat_storage.input_energy = 0
        self.power_meter.energy_produced = 0