Skip to content

Commit

Permalink
fix(*): remove update() method from newly added objs
Browse files Browse the repository at this point in the history
  • Loading branch information
MingboPeng committed Nov 12, 2023
1 parent bc90919 commit 4487b7f
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,9 @@ public void SetControlZone(string controlZoneName)
_controlZoneName = controlZoneName;
}

private void UpdateFromOld()
{
var _oldZone = this.GetChild<IB_ThermalZone>();
if (_oldZone != null)
{
_controlZoneName = _oldZone.ZoneName;
this.SetChild<IB_ThermalZone>(null);
}
}


public override OpenStudio.AvailabilityManager ToOS(Model model)
{
UpdateFromOld();

var obj = base.OnNewOpsObj(NewDefaultOpsObj, model);
// this will be executed after all loops (nodes) are saved
Func<bool> func = () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,8 @@ public void SetControlZone(string controlZoneName)
_controlZoneName = controlZoneName;
}


private void UpdateFromOld()
{
var _oldZone = this.GetChild<IB_ThermalZone>();
if (_oldZone != null)
{
_controlZoneName = _oldZone.ZoneName;
this.SetChild<IB_ThermalZone>(null);
}
}


public override OpenStudio.AvailabilityManager ToOS(Model model)
{
UpdateFromOld();

var obj = base.OnNewOpsObj(NewDefaultOpsObj, model);
// this will be executed after all loops (nodes) are saved
Func<bool> func = () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,8 @@ public void SetControlZone(string controlZoneName)
_controlZoneName = controlZoneName;
}

private void UpdateFromOld()
{
var _oldZone = this.GetChild<IB_ThermalZone>();
if (_oldZone != null)
{
_controlZoneName = _oldZone.ZoneName;
this.SetChild<IB_ThermalZone>(null);
}
}

public override OpenStudio.AvailabilityManager ToOS(Model model)
{
UpdateFromOld();

var obj = base.OnNewOpsObj(NewDefaultOpsObj, model);

// this will be executed after all loops (nodes) are saved
Expand Down
12 changes: 0 additions & 12 deletions src/Ironbug.HVAC/LoopObjs/IB_AirLoopHVACUnitaryHeatPumpAirToAir.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,9 @@ public void SetControlZone(string controlZoneName)
_controlZoneName = controlZoneName;
}

private void UpdateFromOld()
{
var _oldZone = this.GetChild<IB_ThermalZone>();
if (_oldZone != null)
{
_controlZoneName = _oldZone.ZoneName;
this.SetChild<IB_ThermalZone>(null);
}
}

public override HVACComponent ToOS(Model model)
{

UpdateFromOld();

var obj = base.OnNewOpsObj(NewDefaultOpsObj, model);

if (this._coolingCoil != null) obj.setCoolingCoil(this._coolingCoil.ToOS(model));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,8 @@ public void SetControlZone(string controlZoneName)
_controlZoneName = controlZoneName;
}

private void UpdateFromOld()
{
var _oldZone = this.GetChild<IB_ThermalZone>();
if (_oldZone != null)
{
_controlZoneName = _oldZone.ZoneName;
this.SetChild<IB_ThermalZone>(null);
}
}

public override HVACComponent ToOS(Model model)
{
UpdateFromOld();

var obj = base.OnNewOpsObj(NewDefaultOpsObj, model);

Expand Down

0 comments on commit 4487b7f

Please sign in to comment.