First time here? Check out the Help page!
1 | initial version |
I'll attempt to answer your questions but the OS developers might have some additional details about some of them.
Before starting to write measures it's a good idea to read the Measure Writing Guide.
User's can interact with models through formal measures in the GUIs or more directly through the API with one of the language bindings for Ruby, C#, or Python. However, only Ruby and C# are fully supported, Python is less supported.
See one definition of a language binding.
During a simulation OpenStudio uses the ForwardTranslator to translate the model to IDF for simulation using EnergyPlus. OpenStudio can also import IDFs via the GUI or the API, which uses the ReverseTranslator. Currently everything except the HVAC objects can be imported from an IDF. There isn't a gbXMLToidf
method in the SDK, but there are ForwardTranslator and ReverseTranslator classes that have methods to convert to/from GBXML.
No, user's do not need the source code for measures. The measures indirectly use the source code through the API.
2 | No.2 Revision |
I'll attempt to answer your questions but the OS developers others might have some additional details about some of them.
Before starting to write measures it's a good idea to read the Measure Writing Guide.
User's can interact with models through formal measures in the GUIs or more directly through the API with one of the language bindings for Ruby, C#, or Python. However, only Ruby and C# are fully supported, Python is less supported.
See one definition of a language binding.
During a simulation OpenStudio uses the ForwardTranslator to translate the model to IDF for simulation using EnergyPlus. OpenStudio can also import IDFs via the GUI or the API, which uses the ReverseTranslator. Currently everything except the HVAC objects can be imported from an IDF. There isn't a gbXMLToidf
method in the SDK, but there are ForwardTranslator and ReverseTranslator classes that have methods to convert to/from GBXML.
No, user's do not need the source code for measures. The measures indirectly use the source code through the API.
3 | No.3 Revision |
I'll attempt to answer your questions but others might have some additional details about some of them.
Before starting to write measures it's a good idea to read the Measure Writing Guide.
User's can interact with models through formal measures in the GUIs GUIs, which are written in Ruby, or more directly through the API with one of the language bindings for Ruby, C#, or Python. However, only Ruby and C# are fully supported, Python is less supported. bindings require users to build OS from source code.
See one definition of a language binding.
During a simulation OpenStudio uses the ForwardTranslator to translate the model to IDF for simulation using EnergyPlus. OpenStudio can also import IDFs via the GUI or the API, which uses the ReverseTranslator. Currently everything except the HVAC objects can be imported from an IDF. There isn't a gbXMLToidf
method in the SDK, but there are ForwardTranslator and ReverseTranslator classes that have methods to convert to/from GBXML.
No, user's do not need the source code for measures. The measures indirectly use the source code through the API.API and the Ruby bindings.
4 | No.4 Revision |
I'll attempt to answer your questions but others might have some additional details about some of them.
Before starting to write measures it's a good idea to read the Measure Writing Guide.
User's can interact with models through formal measures in the GUIs, which are written in Ruby, or more directly through the API with one of the language bindings for Ruby, C#, or Python. However, only Ruby and C# are fully supported, Python bindings require users to build OS from source code.
See one definition of a language binding.
During a simulation OpenStudio uses the ForwardTranslator to translate the model to IDF for simulation using EnergyPlus. OpenStudio can also import IDFs via the GUI or the API, which uses the ReverseTranslator. Currently everything except the HVAC objects can be imported from an IDF. There isn't a gbXMLToidf
method in the SDK, but there are ForwardTranslator and ReverseTranslator classes that have methods to convert to/from GBXML.GBXML. See below for some untested code.
No, user's do not need the source code for measures. The measures indirectly use the source code through the API and the Ruby bindings.
Here's an example of some untested code using the Ruby bindings outside of a formal measure that may work. See the Optional - Install Ruby instructions to enable this.
# OpenStudio Ruby Bindings
require 'openstudio'
# path to gbxml
xml_path = 'path/to/model.xml'
# gbxml to osm
reverse_translator = OpenStudio::GbXML::GbXMLReverseTranslator.new
model = reverse_translator.loadModel(xml_path)
# osm to idf
forward_translator = OpenStudio::EnergyPlus::ForwardTranslator.new
idf = forward_translator.translateModel(model)
# save IDF
idf_path = 'path/to/model.idf'
idf.save(idf_path, true)
5 | No.5 Revision |
I'll attempt to answer your questions but others might have some additional details about some of them.
Before starting to write measures it's a good idea to read the Measure Writing Guide.
User's can interact with models through formal measures in the GUIs, which are written in Ruby, or more directly through the API with one of the language bindings for Ruby, C#, or Python. However, only Ruby and C# are fully supported, Python bindings require users to build OS from source code.
See one definition of a language binding.
During a simulation OpenStudio uses the ForwardTranslator to translate the model to IDF for simulation using EnergyPlus. OpenStudio can also import IDFs via the GUI or the API, which uses the ReverseTranslator. Currently everything except the HVAC objects can be imported from an IDF. There isn't a gbXMLToidf
method in the SDK, but there are ForwardTranslator and ReverseTranslator classes that have methods to convert to/from GBXML. See below for some untested code.
No, user's do not need the source code for measures. The measures indirectly use the source code through the API and the Ruby bindings.
Here's an example of some untested code using the Ruby bindings outside of a formal measure that may work. See the Optional - Install Ruby instructions to enable this.
# OpenStudio Ruby Bindings
require 'openstudio'
# path to gbxml
xml_path = 'path/to/model.xml'
# gbxml to osm
reverse_translator = OpenStudio::GbXML::GbXMLReverseTranslator.new
model = reverse_translator.loadModel(xml_path)
# osm to idf
forward_translator = OpenStudio::EnergyPlus::ForwardTranslator.new
idf = forward_translator.translateModel(model)
# save IDF
idf
idf_path = 'path/to/model.idf'
idf.save(idf_path, true)