Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
"name": "ironbug-${nextRelease.version}.zip",
"label": "ironbug-${nextRelease.version}.zip"
},
{
"path": "ironbug-net8.zip",
"name": "ironbug-net8-${nextRelease.version}.zip",
"label": "ironbug-net8-${nextRelease.version}.zip"
},
{
"path": "ironbug.console.win.zip",
"name": "ironbug.console.win-${nextRelease.version}.zip",
Expand Down
Binary file added doc/HVAC_GHTemplates/04_Generators/PVWatts.gh
Binary file not shown.
Binary file added doc/HVAC_GHTemplates/04_Generators/PVs.gh
Binary file not shown.
Binary file not shown.
Binary file modified doc/Icon/Ironbug.HVAC.afdesign
Binary file not shown.
Binary file added doc/Icon/Ironbug.HVAC/24h/Converter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/Inverter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/InverterPVWatts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/InverterTable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/MainPanel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/MicroTurbine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/PV.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/PVPerfSDM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/PVPerfSandia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/PVPerfSimple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/PVWatts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions doc/Icon/Ironbug.HVAC/24h/Spine.json
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":{}}
}
Binary file added doc/Icon/Ironbug.HVAC/24h/StorageNMCBattery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/StorageSimple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/SubPanel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/Transformer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Icon/Ironbug.HVAC/24h/WindTurbine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ public IGH_Param CreateParameter(GH_ParameterSide side, int index)

public bool DestroyParameter(GH_ParameterSide side, int index)
{
throw new NotImplementedException();
return true;
//throw new NotImplementedException();
}

public void VariableParameterMaintenance()
Expand Down
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);
Comment on lines +15 to +31

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The component and several of its input parameters have placeholder or empty descriptions. Please provide meaningful descriptions to improve usability and maintainability.

  • The main component description on line 15 is "Description".
  • The inverter parameter description on line 28 is empty.
  • The transformer parameter description on line 29 is empty.
  • The electricalStorage parameter description on line 30 is empty.
  • The storageConverter parameter description on line 31 is empty.


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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The generators != null check is redundant. The DA.GetDataList method ensures that generators is initialized to an empty list if no data is provided, so it will never be null. You can simplify the condition to just generators.Any().

            if (generators.Any()) 
                obj.SetGenerators(generators);

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This component has placeholder values that should be updated:

  • Description: The component description on line 11 is a placeholder. Please provide a meaningful description that explains what the component does.
  • GUID: The ComponentGuid on line 40 is a placeholder. Using non-unique GUIDs can cause conflicts in Grasshopper. Please generate a new, unique GUID for this component. You can use an online GUID generator or the 'Create GUID' tool in Visual Studio.

}
}
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",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The component description is a placeholder. Please provide a meaningful description that explains what the component does to improve usability.

"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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This component has placeholder values that should be updated:

  • Description: The component description on line 11 is a placeholder. Please provide a meaningful description that explains what the component does.
  • GUID: The ComponentGuid on line 40 is a placeholder. Using non-unique GUIDs can cause conflicts in Grasshopper. Please generate a new, unique GUID for this component.

}
}
Loading