Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

data type error in Ruby

Hi, i want to modify the COP of CoilCoolingDXSingleSpeed according to a csv file:

arr_of_arrs = CSV.foreach('C:\Users\sdl06\Documents\essence-144\144assumption\PTAC_Efficiency.csv')

coils.each do |coil|
   arr_of_arrs.each do |arr|
      if coil.name.get.casecmp(arr[0])==0
         coil.setRatedCOP(arr[1].to_f)
      end
   end
end

However, I got error like that:

TypeError: Expected argument 1 of type boost::optional< double >, but got String "3.98"
        in SWIG method 'setRatedCOP'

Any suggestion? Thanks!

data type error in Ruby

Hi, i want to modify the COP of CoilCoolingDXSingleSpeed according to a csv file:

arr_of_arrs = CSV.foreach('C:\Users\sdl06\Documents\essence-144\144assumption\PTAC_Efficiency.csv')

CSV.foreach('C:\Users\sdl06\Documents\essence-144\144assumption\PTAC_Efficiency.csv')
coils.each do |coil|
   arr_of_arrs.each do |arr|
      if coil.name.get.casecmp(arr[0])==0
         coil.setRatedCOP(arr[1].to_f)
      end
   end
end

However, I got error like that:

TypeError: Expected argument 1 of type boost::optional< double >, but got String "3.98"
        in SWIG method 'setRatedCOP'

Any suggestion? Thanks!

data type error in Ruby

Hi, i want to modify the COP of CoilCoolingDXSingleSpeed according to a csv file:

arr_of_arrs = CSV.foreach('C:\Users\sdl06\Documents\essence-144\144assumption\PTAC_Efficiency.csv')

coils.each do |coil|
   arr_of_arrs.each do |arr|
      if coil.name.get.casecmp(arr[0])==0
         coil.setRatedCOP(arr[1].to_f)
      end
   end
end

However, I got error like that:

TypeError: Expected argument 1 of type boost::optional< double >, but got String "3.98"
        in SWIG method 'setRatedCOP'

I know that is because of data type error, but I don't know how to transfer Float to Double. Any suggestion? Thanks!

data type error in Ruby

Hi, i want to modify the COP of CoilCoolingDXSingleSpeed according to a csv file:

arr_of_arrs = CSV.foreach('C:\Users\sdl06\Documents\essence-144\144assumption\PTAC_Efficiency.csv')

coils.each do |coil|
   arr_of_arrs.each do |arr|
      if coil.name.get.casecmp(arr[0])==0
         coil.setRatedCOP(arr[1].to_f)
      end
   end
end

However, I got error like that:

TypeError: Expected argument 1 of type boost::optional< double >, but got String "3.98"
        in SWIG method 'setRatedCOP'

I know that is because of data type error, but I don't know how to transfer Float to Double. Any suggestion? Thanks!

data type error in Ruby

Hi, i want to modify the COP of CoilCoolingDXSingleSpeed according to a csv file:

arr_of_arrs = CSV.foreach('C:\Users\sdl06\Documents\essence-144\144assumption\PTAC_Efficiency.csv')

coils.each do |coil|
   arr_of_arrs.each do |arr|
      if coil.name.get.casecmp(arr[0])==0
         coil.setRatedCOP(arr[1].to_f)
      end
   end
end

However, I got error like that:

TypeError: Expected argument 1 of type boost::optional< double >, but got String "3.98"
        in SWIG method 'setRatedCOP'

I know that is because of data type error, but I don't know how to transfer Float to Double. Any suggestion? Thanks!

data type error in Ruby

Hi, i want to modify the COP of CoilCoolingDXSingleSpeed according to a csv file:

arr_of_arrs = CSV.foreach('C:\Users\sdl06\Documents\essence-144\144assumption\PTAC_Efficiency.csv')
CSV.read('C:\Users\sdl06\Documents\essence-144\144assumption\PTAC_Efficiency.csv')

coils.each do |coil|
   arr_of_arrs.each do |arr|
      if coil.name.get.casecmp(arr[0])==0
         coil.setRatedCOP(arr[1].to_f)
      end
   end
end

However, I got error like that:

TypeError: Expected argument 1 of type boost::optional< double >, but got String "3.98"
        in SWIG method 'setRatedCOP'

I know that is data type error, but I don't know how to transfer Float to Double. Any suggestion? Thanks!

data type error in Ruby

Hi, i want to modify the COP of CoilCoolingDXSingleSpeed according to a csv file:

arr_of_arrs = CSV.read('C:\Users\sdl06\Documents\essence-144\144assumption\PTAC_Efficiency.csv')

coils.each do |coil|
   arr_of_arrs.each do |arr|
      if coil.name.get.casecmp(arr[0])==0
         coil.setRatedCOP(arr[1].to_f)
      end
   end
end

However, I got error like that:

TypeError: Expected argument 1 of type boost::optional< double >, but got String "3.98"
        in SWIG method 'setRatedCOP'

I know that is data type error, but I don't know how to transfer Float to Double. Any suggestion? Thanks!