diff --git a/examples/NIS-workshop/battery.json b/examples/NIS-workshop/battery.json new file mode 100644 index 0000000000000000000000000000000000000000..c4bcb27f456083b3f0cb6391736f8710b579fa4b --- /dev/null +++ b/examples/NIS-workshop/battery.json @@ -0,0 +1,10 @@ +{ + "specific_capital_expenditure": 1000, + "service_life": 15, + "factor_effort_maintenance_operation": 0.02, + "input_efficiency": 0.99, + "output_efficiency": 0.99, + "e2p_in": 1, + "e2p_out": 1, + "self_discharging_loss": 0.0 +} \ No newline at end of file diff --git a/examples/simple_prosumer/data.csv b/examples/NIS-workshop/data.csv similarity index 100% rename from examples/simple_prosumer/data.csv rename to examples/NIS-workshop/data.csv diff --git a/examples/NIS-workshop/inverter_battery.json b/examples/NIS-workshop/inverter_battery.json new file mode 100644 index 0000000000000000000000000000000000000000..3d8fbfdd34539f0ee7a5d3531a184454ebaae2a2 --- /dev/null +++ b/examples/NIS-workshop/inverter_battery.json @@ -0,0 +1,9 @@ +{ + "specific_capital_expenditure": 250, + "service_life": 15, + "factor_effort_maintenance_operation": 0.02, + "efficiency_a": 0.95, + "efficiency_b": 0.95, + "rated_power_side_a": "input", + "rated_power_side_b": "output" +} \ No newline at end of file diff --git a/examples/simple_prosumer/inverter_pv.json b/examples/NIS-workshop/inverter_pv.json similarity index 100% rename from examples/simple_prosumer/inverter_pv.json rename to examples/NIS-workshop/inverter_pv.json diff --git a/examples/NIS-workshop/prosumer.json b/examples/NIS-workshop/prosumer.json new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/examples/simple_prosumer/pv.json b/examples/NIS-workshop/pv.json similarity index 100% rename from examples/simple_prosumer/pv.json rename to examples/NIS-workshop/pv.json diff --git a/examples/simple_prosumer/runme.py b/examples/NIS-workshop/runme_task.py similarity index 66% rename from examples/simple_prosumer/runme.py rename to examples/NIS-workshop/runme_task.py index ed187920a0278650e9fcf459c9df32bbd4bb4700..240112e4213b44af52b7dac1e32832b6c63c26b0 100644 --- a/examples/simple_prosumer/runme.py +++ b/examples/NIS-workshop/runme_task.py @@ -21,29 +21,28 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ - +# Import necessary modules from the custom model library from Model_Library.architecture import Architecture, Profile from Model_Library.dynamics import DynamicTree from Model_Library.topology import Prosumer - import json import numpy as np -architecture = Architecture(DynamicTree(np.full(24, 3600, dtype=int)).root()) - -input_profiles = Profile.from_csv("data.csv", architecture.get_dynamic("")) +# === Create system architecture with time resolution === -with open("prosumer.json") as f: - prosumer_json = json.load(f) +# === Load input profiles from CSV and the Prosumer configuration from JSON === -prosumer_json["components"]["pv"]["irradiance"] = input_profiles["irradiance"] -prosumer_json["components"]["pv"]["temperature"] = input_profiles["temperature"] -prosumer_json["components"]["consumption"]["consumption"] = input_profiles[ - "electricity_demand" -] +# === Inject time series data into the prosumer model === -prosumer = Prosumer("my_prosumer", prosumer_json) +# === Instantiate the Prosumer object === -prosumer.optimize("sized", architecture, {}, ["annuity"], {}) +# === Run system sizing optimization === +# Objective: optimize component sizing to minimize annuity cost +# Arguments: key, architecture, component_iden_strs, strategy, sub_configurations +# - optimization type +# - architecture +# - component_iden_strs +# - strategy +# - sub_configurations -prosumer.save_results("output_files") +# === Save results to output directory === \ No newline at end of file diff --git a/examples/simple_prosumer/prosumer.json b/examples/simple_prosumer/prosumer.json deleted file mode 100644 index 208891503ba3ce63d7d17fde380d56c681beaa83..0000000000000000000000000000000000000000 --- a/examples/simple_prosumer/prosumer.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "components": { - "pv": { - "type": "PVGenerator", - "model": "pv.json", - "min_capacity": 10, - "max_capacity": 10 - }, - "inverter_pv": { - "type": "PowerElectronic", - "model": "inverter_pv.json", - "min_capacity": 10, - "max_capacity": 10 - }, - "grid": { - "type": "ElectricalGrid", - "price": 0.3046, - "injection_price": 0.0793 - }, - "consumption": { - "type": "ElectricalConsumption" - } - }, - "connections": [ - { - "type": "OneToOne", - "from": "pv.output_1", - "to": "inverter_pv.input_1" - }, - { - "type": "OneToOne", - "from": "inverter_pv.output_1", - "to": "grid.input_1" - }, - { - "type": "OneToOne", - "from": "inverter_pv.output_1", - "to": "consumption.input_1" - }, - { - "type": "OneToOne", - "from": "grid.output_1", - "to": "consumption.input_1" - } - ], - "planning_horizon": 20, - "price_change_factor": 1.02, - "interest_factor": 1.05 -} \ No newline at end of file