intersect and match ruby routines are taking long time to execute. Any help/suggestion in optimizing them would be great.
I am passing the building model for intersection and matching and it takes around 60 secs complete it on unix env with ruby 1.9. Any suggestion on how to improve execution time would be greatly appreciated.
Thanks Karthick
Modifying the question. I can get around the time of execution but the intersection routines are shattering surfaces into many random surfaces. Not sure how to make sure the intersection is regular and not random surface shapes. Any help would be greatly appreciated.
@Karthick what version of OpenStudio are you using. We are currently using Ruby 2.2.4. It has been a long time since we used a 1.x ruby so that could certainly create issues in trying to use the SDK. If you call the OpenStudio CLI to run the measure, it will use our built in Ruby, so that may a good idea. It is also hard to know if the time seems long without knowing more about the complexity of the model. Is the time an issue because you are running a large parametric analysis? You could always pre-intersect.match the seed, you can also turn of intersect in measure unless needed.
Sorry David, Somehow missed your comment.
I am on Ruby 2.2 now. I can work around the time but the surfaces are getting shattered instead of getting intersected in regular shapes. I am not sure what is happening there. Any suggestion please.
Have you tried using the surface matching measure and not the SketchUp plugin for intersection?
I am using the ruby shared lib using the .intersect method. I mean not using sketchup.
@Karthick so when did it start going faster, when you switched from ruby 1.0 to 2.2? Is that also when it started created un-expected surfaces on intersection? What version of OpenStudio are you using? Since you are still not using Ruby 2.2.4, consider this approach. The OpenStudio CLI has a built in ruby 2.24. interpreter. When running the measure instead of
ruby measure.rb
callopenstudio measure.rb
. If this still doesn't work as expected you can send the model to OpenStudio@NREL.gov and we can take a look at it.