-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #816 from gridsingularity/restoring_external_devic…
…es_setup_file restoring_external_devices_setup_file_being_for_api_client_test
- Loading branch information
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
""" | ||
Copyright 2018 Grid Singularity | ||
This file is part of D3A. | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
""" | ||
from d3a.models.appliance.switchable import SwitchableAppliance | ||
from d3a.models.area import Area | ||
from d3a.models.strategy.storage import StorageStrategy | ||
from d3a.models.strategy.load_hours import CellTowerLoadHoursStrategy, LoadHoursStrategy | ||
from d3a.models.appliance.pv import PVAppliance | ||
from d3a.models.strategy.external_strategies.pv import PVExternalStrategy | ||
from d3a.models.strategy.external_strategies.load import LoadHoursExternalStrategy | ||
from d3a_interface.constants_limits import ConstSettings | ||
|
||
ConstSettings.IAASettings.MARKET_TYPE = 2 | ||
|
||
|
||
def get_setup(config): | ||
area = Area( | ||
'Grid', | ||
[ | ||
Area( | ||
'House 1', | ||
[ | ||
Area('H1 General Load', strategy=LoadHoursStrategy(avg_power_W=200, | ||
hrs_per_day=6, | ||
hrs_of_day=list( | ||
range(12, 18)), | ||
final_buying_rate=35), | ||
appliance=SwitchableAppliance()), | ||
Area('H1 Storage1', strategy=StorageStrategy(initial_soc=100, | ||
battery_capacity_kWh=20), | ||
appliance=SwitchableAppliance()), | ||
Area('H1 Storage2', strategy=StorageStrategy(initial_soc=100, | ||
battery_capacity_kWh=20), | ||
appliance=SwitchableAppliance()), | ||
], | ||
), | ||
Area( | ||
'House 2', | ||
[ | ||
Area('load', strategy=LoadHoursExternalStrategy( | ||
avg_power_W=200, hrs_per_day=24, hrs_of_day=list(range(0, 24)), | ||
final_buying_rate=35), | ||
appliance=SwitchableAppliance()), | ||
Area('pv', strategy=PVExternalStrategy(panel_count=4), | ||
appliance=PVAppliance()), | ||
|
||
], external_connection_available=True, | ||
), | ||
Area('Cell Tower', strategy=CellTowerLoadHoursStrategy(avg_power_W=100, | ||
hrs_per_day=24, | ||
hrs_of_day=list(range(0, 24)), | ||
final_buying_rate=35), | ||
appliance=SwitchableAppliance()), | ||
], | ||
config=config | ||
) | ||
return area |