First time here? Check out the Help page!
1 | initial version |
The documentation page you referenced is from version 1.8.3, but I suspect you're using a version of OpenStudio that's post-v2.3.1.
The latest (v2.5.0) documentation shows that coolingCoil
returns an OptionalCoilCoolingVariableRefrigerantFlow object, for which you get the actual CoilCOolingVariableRefrigerantFlow object by calling .get
, as you have done.
However, the supplyAirFan
method returns an HVACComponent object (not an "optional" type), which does not respond to the .get
method (because you call it, you 'have' it).
So your code will work if you just do supply_air_fan = vrf_in.supplyAirFan
(no .get
). Note, since you then have an HVACComponent, in order to have access to specific fan object methods, you'll need to cast it to the appropriate fan type by checking, e.g. if supply_air_fan.to_FanOnOff.is_initialized?
and then .get
that object type.
PS: here is the where/when the vrf coils were changed to return optional.
2 | No.2 Revision |
The documentation page you referenced is from version 1.8.3, but I suspect you're using a version of OpenStudio that's post-v2.3.1.
The latest (v2.5.0) documentation shows that coolingCoil
returns an OptionalCoilCoolingVariableRefrigerantFlow object, for which you get the actual CoilCOolingVariableRefrigerantFlow object by calling .get
, as you have done.
However, the supplyAirFan
method returns an HVACComponent object (not an "optional" type), which does not respond to the .get
method (because you call it, you 'have' it).method.
So your code will work if you just do supply_air_fan = vrf_in.supplyAirFan
(no .get
). Note, since you then have an HVACComponent, in order to have access to specific fan object methods, you'll need to cast it to the appropriate fan type by checking, e.g. if supply_air_fan.to_FanOnOff.is_initialized?
and then .get
that object type.
PS: here is the where/when the vrf coils were changed to return optional. optional.
3 | No.3 Revision |
The documentation page you referenced is from version 1.8.3, but I suspect you're using a version of OpenStudio that's post-v2.3.1.
The latest (v2.5.0) documentation shows that coolingCoil
returns an OptionalCoilCoolingVariableRefrigerantFlow object, for which you get the actual CoilCOolingVariableRefrigerantFlow object by calling .get
, as you have done.
However, the supplyAirFan
method returns an HVACComponent object (not an "optional" type), which does not respond to the .get
method.method, and why you receive the 'undefined method' error.
So your code will work if you just do supply_air_fan = vrf_in.supplyAirFan
(no .get
). Note, since you then have an HVACComponent, in order to have access to specific fan object methods, you'll need to cast it to the appropriate fan type by checking, e.g. if supply_air_fan.to_FanOnOff.is_initialized?
and then .get
that object type.
PS: here is the where/when the vrf coils were changed to return optional.
4 | No.4 Revision |
The documentation page you referenced is from version 1.8.3, but I suspect you're using a version of OpenStudio that's post-v2.3.1.
The latest (v2.5.0) documentation shows that coolingCoil
returns an OptionalCoilCoolingVariableRefrigerantFlow object, for which you get the actual CoilCOolingVariableRefrigerantFlow object by calling .get
, as you have done.
However, the supplyAirFan
method returns an HVACComponent object (not an "optional" type), which does not respond to the .get
method, and why you receive the 'undefined method' error.
So your code will work if you just do supply_air_fan = vrf_in.supplyAirFan
(no .get
). Note, since you then have an HVACComponent, in order to have access to specific fan object methods, you'll need to cast it to the appropriate fan type by checking, e.g. if supply_air_fan.to_FanOnOff.is_initialized?
and then .get
that object type.
PS: here is the where/when the vrf coils were changed to return optional.