-
Notifications
You must be signed in to change notification settings - Fork 6
ElectricLoadCenter #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ElectricLoadCenter #152
Changes from all commits
a8575cc
6b36b06
2645805
1690d83
0eb6789
803ad24
05fb069
cf7ec23
cecce93
c21f26d
4c8b999
f776df1
acd4ca1
82c1fff
73403dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| {"skeleton":{"images":""}, | ||
| "bones":[{"name":"root"}], | ||
| "slots":[ | ||
| {"name":"MainPanel","bone":"root","attachment":"MainPanel"}, | ||
| {"name":"Converter","bone":"root","attachment":"Converter"}, | ||
| {"name":"Inverter","bone":"root","attachment":"Inverter"}, | ||
| {"name":"InverterPVWatts","bone":"root","attachment":"InverterPVWatts"}, | ||
| {"name":"InverterTable","bone":"root","attachment":"InverterTable"}, | ||
| {"name":"Transformer","bone":"root","attachment":"Transformer"}, | ||
| {"name":"StorageNMCBattery","bone":"root","attachment":"StorageNMCBattery"}, | ||
| {"name":"StorageSimple","bone":"root","attachment":"StorageSimple"}, | ||
| {"name":"MicroTurbine","bone":"root","attachment":"MicroTurbine"}, | ||
| {"name":"WindTurbine","bone":"root","attachment":"WindTurbine"}, | ||
| {"name":"PV","bone":"root","attachment":"PV"}, | ||
| {"name":"PVWatts","bone":"root","attachment":"PVWatts"}, | ||
| {"name":"PVPerfSimple","bone":"root","attachment":"PVPerfSimple"}, | ||
| {"name":"PVPerfSandia","bone":"root","attachment":"PVPerfSandia"}, | ||
| {"name":"PVPerfSDM","bone":"root","attachment":"PVPerfSDM"}, | ||
| {"name":"SubPanel","bone":"root","attachment":"SubPanel"} | ||
| ], | ||
| "skins":{ | ||
| "default":{ | ||
| "MainPanel":{"MainPanel":{"x":1198.5,"y":4349.5,"width":241,"height":241}}, | ||
| "Converter":{"Converter":{"x":923.5,"y":4349.5,"width":241,"height":241}}, | ||
| "Inverter":{"Inverter":{"x":923.5,"y":4608.5,"width":241,"height":241}}, | ||
| "InverterPVWatts":{"InverterPVWatts":{"x":636.5,"y":4608.5,"width":241,"height":241}}, | ||
| "InverterTable":{"InverterTable":{"x":636.5,"y":4880.5,"width":241,"height":241}}, | ||
| "Transformer":{"Transformer":{"x":923.5,"y":4086.5,"width":241,"height":241}}, | ||
| "StorageNMCBattery":{"StorageNMCBattery":{"x":1197.5,"y":3817.5,"width":241,"height":241}}, | ||
| "StorageSimple":{"StorageSimple":{"x":925.5,"y":3817.5,"width":241,"height":241}}, | ||
| "MicroTurbine":{"MicroTurbine":{"x":632.5,"y":3817.5,"width":241,"height":241}}, | ||
| "WindTurbine":{"WindTurbine":{"x":632.5,"y":4082.5,"width":241,"height":241}}, | ||
| "PV":{"PV":{"x":632.5,"y":4352.5,"width":241,"height":241}}, | ||
| "PVWatts":{"PVWatts":{"x":381.5,"y":4352.5,"width":241,"height":241}}, | ||
| "PVPerfSimple":{"PVPerfSimple":{"x":120,"y":4352.5,"width":240,"height":241}}, | ||
| "PVPerfSandia":{"PVPerfSandia":{"x":120,"y":4073.5,"width":240,"height":241}}, | ||
| "PVPerfSDM":{"PVPerfSDM":{"x":120,"y":3797.5,"width":240,"height":241}}, | ||
| "SubPanel":{"SubPanel":{"x":1198.5,"y":4085.5,"width":241,"height":241}} | ||
| } | ||
| }, | ||
| "animations":{"animation":{}} | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| using Grasshopper.Kernel; | ||
| using Ironbug.Grasshopper.Properties; | ||
| using Ironbug.HVAC; | ||
| using System; | ||
| using System.Collections.Generic; | ||
|
|
||
| namespace Ironbug.Grasshopper.Component | ||
| { | ||
| public class Ironbug_ElectricLoadCenter : Ironbug_Component | ||
| { | ||
| public Ironbug_ElectricLoadCenter() | ||
| : base("IB_ElectricLoadCenter", "ELC MainPanel", | ||
| "The main panel of the ElectricLoadCenter", | ||
| "Ironbug", "08:ElectricLoadCenter" | ||
| ) | ||
| { | ||
| } | ||
|
|
||
| public override GH_Exposure Exposure => GH_Exposure.primary; | ||
|
|
||
|
|
||
| protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) | ||
| { | ||
| pManager.AddGenericParameter("_subPanels", "_subPanels", "A list of ElectricLoadCenters", GH_ParamAccess.list); | ||
| pManager.AddGenericParameter("powerInTransformer", "transformerIn", "An optional input for a transformer for transferring electricity from the grid to a building (as distribution transformers) when applicable", GH_ParamAccess.item); | ||
| pManager.AddGenericParameter("powerOutTransformer", "transformerOut", "An optional input for a transformer for transferring electricity from onsite generators to the grid when applicable", GH_ParamAccess.item); | ||
|
|
||
| pManager[0].DataMapping = GH_DataMapping.Flatten; | ||
| pManager[1].Optional = true; | ||
| pManager[2].Optional = true; | ||
| } | ||
|
|
||
| protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) | ||
| { | ||
| pManager.AddGenericParameter("ElectricLoadCenter", "ELC", "ElectricLoadCenter main panel", GH_ParamAccess.item); | ||
| } | ||
|
|
||
| protected override void SolveInstance(IGH_DataAccess DA) | ||
| { | ||
| var obj = new HVAC.IB_ElectricLoadCenter(); | ||
|
|
||
|
|
||
| var subPanels = new List<HVAC.IB_ElectricLoadCenterDistribution>(); | ||
| IB_ElectricLoadCenterTransformer inTransformer = null; | ||
| IB_ElectricLoadCenterTransformer outTransformer = null; | ||
|
|
||
| DA.GetDataList(0, subPanels); | ||
| DA.GetData(1, ref inTransformer); | ||
| DA.GetData(2, ref outTransformer); | ||
|
|
||
| obj.SetSubPanels(subPanels); | ||
| obj.SetPowerInTransformer(inTransformer); | ||
| obj.SetPowerOutTransformer(outTransformer); | ||
|
|
||
| DA.SetData(0, obj); | ||
| } | ||
|
|
||
| protected override System.Drawing.Bitmap Icon => Resources.MainPanel; | ||
|
|
||
| public override Guid ComponentGuid => new Guid("EA1FF6A4-A434-4DF0-8885-8C1699D92C02"); | ||
|
|
||
|
|
||
| } | ||
|
|
||
|
|
||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| using Grasshopper.Kernel; | ||
| using Ironbug.Grasshopper.Properties; | ||
| using Ironbug.HVAC; | ||
| using Ironbug.HVAC.BaseClass; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
|
|
||
| namespace Ironbug.Grasshopper.Component | ||
| { | ||
| public class Ironbug_ElectricLoadCenterDistribution : Ironbug_HVACWithParamComponent | ||
| { | ||
| public Ironbug_ElectricLoadCenterDistribution() | ||
| : base("IB_ElectricLoadCenterDistribution", "ELC Distribution (SubPanel)", | ||
| "Description", | ||
| "Ironbug", "08:ElectricLoadCenter", | ||
| typeof(HVAC.IB_ElectricLoadCenterDistribution_FieldSet)) | ||
| { | ||
|
|
||
| } | ||
|
|
||
| public override GH_Exposure Exposure => GH_Exposure.secondary; | ||
|
|
||
|
|
||
| protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) | ||
| { | ||
| pManager.AddGenericParameter("generators", "generators", "A list of IB_Generator", GH_ParamAccess.list); | ||
| pManager.AddGenericParameter("inverter", "inverter", "", GH_ParamAccess.item); | ||
| pManager.AddGenericParameter("transformer", "transformer", "", GH_ParamAccess.item); | ||
| pManager.AddGenericParameter("electricalStorage", "electricalStorage", "", GH_ParamAccess.item); | ||
| pManager.AddGenericParameter("storageConverter", "storageConverter", "", GH_ParamAccess.item); | ||
|
|
||
| pManager[0].Optional = true; | ||
| pManager[0].DataMapping = GH_DataMapping.Flatten; | ||
| pManager[1].Optional = true; | ||
| pManager[2].Optional = true; | ||
| pManager[3].Optional = true; | ||
| pManager[4].Optional = true; | ||
| } | ||
|
|
||
| protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) | ||
| { | ||
| pManager.AddGenericParameter("subPanel", "subPanel", "A distribution sub-panel of the ElectricLoadCenter main panel", GH_ParamAccess.item); | ||
| } | ||
|
|
||
| protected override void SolveInstance(IGH_DataAccess DA) | ||
| { | ||
| var obj = new HVAC.IB_ElectricLoadCenterDistribution(); | ||
|
|
||
| var generators = new List<HVAC.BaseClass.IB_Generator>(); | ||
| IB_ElecInverter inverter = null; | ||
| IB_ElectricLoadCenterTransformer transformer = null; | ||
| IB_ElecStorage storage = null; | ||
| IB_ElectricLoadCenterStorageConverter converter = null; | ||
|
|
||
| DA.GetDataList(0, generators); | ||
| DA.GetData(1, ref inverter); | ||
| DA.GetData(2, ref transformer); | ||
| DA.GetData(3, ref storage); | ||
| DA.GetData(4, ref converter); | ||
|
|
||
| if (generators != null && generators.Any()) | ||
| obj.SetGenerators(generators); | ||
|
Comment on lines
+62
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| if (inverter != null) | ||
| obj.SetInverter(inverter); | ||
| if (transformer != null) | ||
| obj.SetTransformer(transformer); | ||
| if (storage != null) | ||
| obj.SetElectricalStorage(storage); | ||
| if (converter != null) | ||
| obj.SetStorageConverter(converter); | ||
|
|
||
|
|
||
| this.SetObjParamsTo(obj); | ||
| var objs = this.SetObjDupParamsTo(obj); | ||
| DA.SetDataList(0, objs); | ||
| } | ||
|
|
||
| protected override System.Drawing.Bitmap Icon => Resources.SubPanel; | ||
|
|
||
| public override Guid ComponentGuid => new Guid("37129A27-30E5-4091-8C0A-491DFAB84AF7"); | ||
|
|
||
|
|
||
| } | ||
|
|
||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| using System; | ||
| using Grasshopper.Kernel; | ||
| using Ironbug.Grasshopper.Properties; | ||
|
|
||
| namespace Ironbug.Grasshopper.Component | ||
| { | ||
| public class Ironbug_ElectricLoadCenterInverterLookUpTable : Ironbug_HVACWithParamComponent | ||
| { | ||
| public Ironbug_ElectricLoadCenterInverterLookUpTable() | ||
| : base("IB_ElectricLoadCenterInverterLookUpTable", "InverterLookUpTable", | ||
| "Description", | ||
| "Ironbug", "08:ElectricLoadCenter", | ||
| typeof(HVAC.IB_ElectricLoadCenterInverterLookUpTable_FieldSet)) | ||
| { | ||
|
|
||
| } | ||
|
|
||
| public override GH_Exposure Exposure => GH_Exposure.secondary; | ||
|
|
||
| protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) | ||
| { | ||
| } | ||
|
|
||
| protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) | ||
| { | ||
| pManager.AddGenericParameter("inverter", "inverter", "inverter", GH_ParamAccess.item); | ||
| } | ||
|
|
||
| protected override void SolveInstance(IGH_DataAccess DA) | ||
| { | ||
| var obj = new HVAC.IB_ElectricLoadCenterInverterLookUpTable(); | ||
|
|
||
| this.SetObjParamsTo(obj); | ||
| var objs = this.SetObjDupParamsTo(obj); | ||
| DA.SetDataList(0, objs); | ||
| } | ||
|
|
||
| protected override System.Drawing.Bitmap Icon => Resources.InverterTable; | ||
|
|
||
| public override Guid ComponentGuid => new Guid("A1B2C3D4-E5F6-7890-1234-567890ABCDEF"); | ||
|
Comment on lines
+10
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This component has placeholder values that should be updated:
|
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| using System; | ||
| using Grasshopper.Kernel; | ||
| using Ironbug.Grasshopper.Properties; | ||
|
|
||
| namespace Ironbug.Grasshopper.Component | ||
| { | ||
| public class Ironbug_ElectricLoadCenterInverterPVWatts : Ironbug_HVACWithParamComponent | ||
| { | ||
| public Ironbug_ElectricLoadCenterInverterPVWatts() | ||
| : base("IB_ElectricLoadCenterInverterPVWatts", "InverterPVWatts", | ||
| "Description", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| "Ironbug", "08:ElectricLoadCenter", | ||
| typeof(HVAC.IB_ElectricLoadCenterInverterPVWatts_FieldSet)) | ||
| { | ||
|
|
||
| } | ||
|
|
||
| public override GH_Exposure Exposure => GH_Exposure.secondary; | ||
|
|
||
|
|
||
| protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) | ||
| { | ||
| } | ||
|
|
||
| protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) | ||
| { | ||
| pManager.AddGenericParameter("inverter", "inverter", "inverter", GH_ParamAccess.item); | ||
| } | ||
|
|
||
| protected override void SolveInstance(IGH_DataAccess DA) | ||
| { | ||
| var obj = new HVAC.IB_ElectricLoadCenterInverterPVWatts(); | ||
|
|
||
| this.SetObjParamsTo(obj); | ||
| var objs = this.SetObjDupParamsTo(obj); | ||
| DA.SetDataList(0, objs); | ||
| } | ||
|
|
||
| protected override System.Drawing.Bitmap Icon => Resources.InverterPVWatts; | ||
|
|
||
| public override Guid ComponentGuid => new Guid("CB67FE63-AEB7-4D95-B50D-AA293F606DDD"); | ||
|
|
||
|
|
||
| } | ||
|
|
||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| using System; | ||
| using Grasshopper.Kernel; | ||
| using Ironbug.Grasshopper.Properties; | ||
|
|
||
| namespace Ironbug.Grasshopper.Component | ||
| { | ||
| public class Ironbug_ElectricLoadCenterInverterSimple : Ironbug_HVACWithParamComponent | ||
| { | ||
| public Ironbug_ElectricLoadCenterInverterSimple() | ||
| : base("IB_ElectricLoadCenterInverterSimple", "InverterSimple", | ||
| "Description", | ||
| "Ironbug", "08:ElectricLoadCenter", | ||
| typeof(HVAC.IB_ElectricLoadCenterInverterSimple_FieldSet)) | ||
| { | ||
|
|
||
| } | ||
|
|
||
| public override GH_Exposure Exposure => GH_Exposure.secondary; | ||
|
|
||
| protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) | ||
| { | ||
| } | ||
|
|
||
| protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) | ||
| { | ||
| pManager.AddGenericParameter("inverter", "inverter", "inverter", GH_ParamAccess.item); | ||
| } | ||
|
|
||
| protected override void SolveInstance(IGH_DataAccess DA) | ||
| { | ||
| var obj = new HVAC.IB_ElectricLoadCenterInverterSimple(); | ||
|
|
||
| this.SetObjParamsTo(obj); | ||
| var objs = this.SetObjDupParamsTo(obj); | ||
| DA.SetDataList(0, objs); | ||
| } | ||
|
|
||
| protected override System.Drawing.Bitmap Icon => Resources.Inverter; | ||
|
|
||
| public override Guid ComponentGuid => new Guid("B2C3D4E5-F6A7-8901-2345-67890ABCDEF1"); | ||
|
Comment on lines
+10
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This component has placeholder values that should be updated:
|
||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The component and several of its input parameters have placeholder or empty descriptions. Please provide meaningful descriptions to improve usability and maintainability.
inverterparameter description on line 28 is empty.transformerparameter description on line 29 is empty.electricalStorageparameter description on line 30 is empty.storageConverterparameter description on line 31 is empty.