Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into PR_opened/Fix_34…
Browse files Browse the repository at this point in the history
…30_FourPipeBeamCrash
  • Loading branch information
jmarrec committed Mar 21, 2019
2 parents 615de27 + 8bb82c5 commit 9ce5f2d
Show file tree
Hide file tree
Showing 45 changed files with 531 additions and 3,978 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ if(BUILD_QT)
if(APPLE)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/Qt-prefix/src/Qt-install")
if( Qt5Static )
set(QT_CONFIGURE_COMMAND "-v -release -opensource -qt-pcre -qt-harfbuzz -static -openssl -no-pch -no-ssse3 -qt-sql-sqlite -plugin-sql-sqlite -skip enginio -no-compile-examples -nomake examples -nomake tests -nomake tools -skip qtmultimedia -confirm-license -prefix ${CMAKE_BINARY_DIR}/Qt-prefix/src/Qt-static-install")
set(QT_CONFIGURE_COMMAND "-v -release -opensource -qt-pcre -qt-harfbuzz -static -openssl-linked -I${OPENSSL_INCLUDE_DIR} OPENSSL_LIBS=\\\"${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY}\\\" -no-pch -no-ssse3 -qt-sql-sqlite -plugin-sql-sqlite -skip enginio -no-compile-examples -nomake examples -nomake tests -nomake tools -skip qtmultimedia -confirm-license -prefix ${CMAKE_BINARY_DIR}/Qt-prefix/src/Qt-static-install")
else()
message(WARNING "Shared Apple Qt build untested")
set(QT_CONFIGURE_COMMAND "-v -release -opensource -qt-pcre -qt-harfbuzz -shared -openssl -no-pch -no-ssse3 -qt-sql-sqlite -plugin-sql-sqlite -skip enginio -no-compile-examples -nomake examples -nomake tests -nomake tools -skip qtmultimedia -confirm-license -prefix ${CMAKE_BINARY_DIR}/Qt-prefix/src/Qt-install")
Expand Down
139 changes: 75 additions & 64 deletions openstudiocore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,10 @@ endif()

# openstudio gems

# to update the openstudio gems, you must first update the gems specified in the \dependencies\ruby\Gemfile file
# next, build the openstudio-gems target of the OpenStudio super-build project (CMakeLists.txt one directory above this)
# build and release openstudio gems at https://github.com/NREL/OpenStudio-gems
# upload the openstudio-gems-DATE.tar.gz to the dependencies location on s3, then update the MD5sum and url below
set(OPENSTUDIO_GEMS_ZIP_FILENAME "openstudio-gems-20190225.tar.gz")
set(OPENSTUDIO_GEMS_ZIP_EXPECTED_MD5 "bf6d28d85aa2daf4b05282790d706a16")
set(OPENSTUDIO_GEMS_ZIP_FILENAME "openstudio-gems-20190307.tar.gz")
set(OPENSTUDIO_GEMS_ZIP_EXPECTED_MD5 "1a00d0ee45731c0cce4ca7b73a438005")

set(OPENSTUDIO_GEMS_ZIP_LOCAL_PATH "${CMAKE_BINARY_DIR}/${OPENSTUDIO_GEMS_ZIP_FILENAME}")
if(EXISTS "${OPENSTUDIO_GEMS_ZIP_LOCAL_PATH}")
Expand Down Expand Up @@ -1323,7 +1322,9 @@ add_subdirectory(resources)

add_subdirectory(ruby)

add_subdirectory(sketchup_plugin)
if(BUILD_OS_APP)
add_subdirectory(sketchup_plugin)
endif()

foreach(D ${project_directories})
add_subdirectory(src/${D})
Expand Down Expand Up @@ -1689,6 +1690,7 @@ endif()

install(FILES "${CMAKE_BINARY_DIR}/openstudio-gems/Gemfile" DESTINATION ./Ruby/ COMPONENT "RubyAPI" )
install(FILES "${CMAKE_BINARY_DIR}/openstudio-gems/Gemfile.lock" DESTINATION ./Ruby/ COMPONENT "RubyAPI" )
install(FILES "${CMAKE_BINARY_DIR}/openstudio-gems/openstudio-gems.gemspec" DESTINATION ./Ruby/ COMPONENT "RubyAPI" )

get_filename_component(ENERGYPLUS_DIR "${ENERGYPLUS_EXE}" DIRECTORY)
file(GLOB ENERGYPLUS_FILES "${ENERGYPLUS_DIR}/energyplus*")
Expand Down Expand Up @@ -1747,11 +1749,6 @@ endif()
include(CPack)
include(CPackIFW)

cpack_add_component(SketchUpPlugin
DISPLAY_NAME "SketchUp Plugin"
DESCRIPTION "SketchUp Plugin"
)

cpack_add_component(CLI
DISPLAY_NAME "Command Line Interface"
DESCRIPTION "Command Line Interface"
Expand All @@ -1762,26 +1759,6 @@ cpack_add_component(RubyAPI
DESCRIPTION "Ruby API"
)

cpack_add_component(CSharpAPI
DISPLAY_NAME "C# API"
DESCRIPTION "C# API"
)

cpack_add_component(PAT
DISPLAY_NAME "Parametric Analysis Tool"
DESCRIPTION "Parametric Analysis Tool"
)

cpack_add_component(OpenStudioApp
DISPLAY_NAME "OpenStudio Application"
DESCRIPTION "OpenStudio Application"
)

cpack_add_component(DView
DISPLAY_NAME "DView"
DESCRIPTION "DView Application for viewing results"
)

cpack_add_component(EnergyPlus
DISPLAY_NAME "EnergyPlus"
DESCRIPTION "Minimal EnergyPlus installation"
Expand All @@ -1792,17 +1769,6 @@ cpack_add_component(Radiance
DESCRIPTION "Full Radiance installation"
)

cpack_add_component(Resources
DISPLAY_NAME "Application Resources"
DESCRIPTION "Resource Files used by the OpenStudio Application and SketchUp Plugin"
)

cpack_ifw_configure_component(SketchUpPlugin
DEPENDS Resources
SCRIPT sketchup_plugin/install_operations.qs
REQUIRES_ADMIN_RIGHTS
)

cpack_ifw_configure_component(CLI
SCRIPT src/cli/install_operations.qs
REQUIRES_ADMIN_RIGHTS
Expand All @@ -1812,42 +1778,87 @@ cpack_ifw_configure_component(RubyAPI
REQUIRES_ADMIN_RIGHTS
)

cpack_ifw_configure_component(CSharpAPI
cpack_ifw_configure_component(EnergyPlus
REQUIRES_ADMIN_RIGHTS
)

cpack_ifw_configure_component(PAT
DEPENDS CLI RubyAPI
SCRIPT pat/install_operations.qs
cpack_ifw_configure_component(Radiance
REQUIRES_ADMIN_RIGHTS
)

cpack_ifw_configure_component(OpenStudioApp
DEPENDS Resources CLI
SCRIPT src/openstudio_app/install_operations.qs
cpack_ifw_configure_component(Unspecified
SCRIPT src/install_utility/install_operations.qs
REQUIRES_ADMIN_RIGHTS
)

cpack_ifw_configure_component(DView
REQUIRES_ADMIN_RIGHTS
)
if(BUILD_CSHARP_BINDINGS)
cpack_add_component(CSharpAPI
DISPLAY_NAME "C# API"
DESCRIPTION "C# API"
)

cpack_ifw_configure_component(EnergyPlus
REQUIRES_ADMIN_RIGHTS
)
cpack_ifw_configure_component(CSharpAPI
REQUIRES_ADMIN_RIGHTS
)
endif()

cpack_ifw_configure_component(Radiance
REQUIRES_ADMIN_RIGHTS
)
if(BUILD_OS_APP)

cpack_add_component(Resources
DISPLAY_NAME "Application Resources"
DESCRIPTION "Resource Files used by the OpenStudio Application and SketchUp Plugin"
)

cpack_add_component(SketchUpPlugin
DISPLAY_NAME "SketchUp Plugin"
DESCRIPTION "SketchUp Plugin"
)

cpack_ifw_configure_component(Resources
REQUIRES_ADMIN_RIGHTS
)
cpack_add_component(OpenStudioApp
DISPLAY_NAME "OpenStudio Application"
DESCRIPTION "OpenStudio Application"
)

cpack_ifw_configure_component(Unspecified
SCRIPT src/install_utility/install_operations.qs
REQUIRES_ADMIN_RIGHTS
)
cpack_ifw_configure_component(Resources
REQUIRES_ADMIN_RIGHTS
)

cpack_ifw_configure_component(SketchUpPlugin
DEPENDS Resources
SCRIPT sketchup_plugin/install_operations.qs
REQUIRES_ADMIN_RIGHTS
)

cpack_ifw_configure_component(OpenStudioApp
DEPENDS Resources CLI
SCRIPT src/openstudio_app/install_operations.qs
REQUIRES_ADMIN_RIGHTS
)
endif()

if(BUILD_PAT)
cpack_add_component(PAT
DISPLAY_NAME "Parametric Analysis Tool"
DESCRIPTION "Parametric Analysis Tool"
)

cpack_ifw_configure_component(PAT
DEPENDS CLI RubyAPI
SCRIPT pat/install_operations.qs
REQUIRES_ADMIN_RIGHTS
)
endif()

if(BUILD_DVIEW)
cpack_add_component(DView
DISPLAY_NAME "DView"
DESCRIPTION "DView Application for viewing results"
)

cpack_ifw_configure_component(DView
REQUIRES_ADMIN_RIGHTS
)
endif()

if( BUILD_NUGET_PACKAGE )
configure_file( OpenStudio.nuspec.in OpenStudio.nuspec )
Expand Down
7 changes: 5 additions & 2 deletions openstudiocore/resources/model/OpenStudio.idd
Original file line number Diff line number Diff line change
Expand Up @@ -2025,7 +2025,7 @@ OS:BuildingUnit,
\default Residential

OS:DefaultConstructionSet,
\min-fields 11
\min-fields 12
A1, \field Handle
\type handle
\required-field
Expand Down Expand Up @@ -2057,7 +2057,10 @@ OS:DefaultConstructionSet,
A10, \field Building Shading Construction Name
\type object-list
\object-list ConstructionNames
A11; \field Site Shading Construction Name
A11, \field Site Shading Construction Name
\type object-list
\object-list ConstructionNames
A12; \field Adiabatic Surface Construction Name
\type object-list
\object-list ConstructionNames

Expand Down
7 changes: 7 additions & 0 deletions openstudiocore/src/cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,13 @@ target_link_libraries(openstudio
openstudio_radiance_static
)

if (APPLE)
target_link_libraries(openstudio
${OPENSSL_CRYPTO_LIBRARY}
${OPENSSL_SSL_LIBRARY}
)
endif()

if (UNIX AND NOT APPLE)
target_link_libraries(openstudio ${RUBY_STATIC_LIBRARY} "dl" "crypt" "ssl")
target_link_libraries(openstudio "icui18n" "icuuc" "gmp")
Expand Down
92 changes: 48 additions & 44 deletions openstudiocore/src/energyplus/ForwardTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ Workspace ForwardTranslator::translateModelPrivate( model::Model & model, bool f
}
}

// Energyplus only allows single zone input for ITE object. If space type is assigned in OS,
// Energyplus only allows single zone input for ITE object. If space type is assigned in OS,
// will translate to multiple ITE objects assigned to each zone under the same space type.
// then delete the one that pointed to a spacetype.
// By doing this, we can solve the potential problem that if this load is applied to a space type,
// By doing this, we can solve the potential problem that if this load is applied to a space type,
// the load gets copied to each space of the space type, which may cause conflict of supply air node.
std::vector<ElectricEquipmentITEAirCooled> iTEAirCooledEquipments = model.getConcreteModelObjects<ElectricEquipmentITEAirCooled>();
for (ElectricEquipmentITEAirCooled iTequipment : iTEAirCooledEquipments) {
Expand Down Expand Up @@ -3000,41 +3000,44 @@ boost::optional<IdfObject> ForwardTranslator::translateAndMapModelObject(ModelOb
// no-op
break;
}
case openstudio::IddObjectType::OS_UtilityCost_Charge_Block:
{
LOG(Warn, "OS_UtilityCost_Charge_Block is not currently translated");
break;
}
case openstudio::IddObjectType::OS_UtilityCost_Charge_Simple:
{
LOG(Warn, "OS_UtilityCost_Charge_Simple is not currently translated");
break;
}
case openstudio::IddObjectType::OS_UtilityCost_Computation:
{
LOG(Warn, "OS_UtilityCost_Computation is not currently translated");
break;
}
case openstudio::IddObjectType::OS_UtilityCost_Qualify:
{
LOG(Warn, "OS_UtilityCost_Qualify is not currently translated");
break;
}
case openstudio::IddObjectType::OS_UtilityCost_Ratchet:
{
LOG(Warn, "OS_UtilityCost_Ratchet is not currently translated");
break;
}
case openstudio::IddObjectType::OS_UtilityCost_Tariff:
{
LOG(Warn, "OS_UtilityCost_Tariff is not currently translated");
break;
}
case openstudio::IddObjectType::OS_UtilityCost_Variable:
{
LOG(Warn, "OS_UtilityCost_Variable is not currently translated");
break;
}

// TODO: once UtilityCost objects are wrapped
//case openstudio::IddObjectType::OS_UtilityCost_Charge_Block:
//{
//LOG(Warn, "OS_UtilityCost_Charge_Block is not currently translated");
//break;
//}
//case openstudio::IddObjectType::OS_UtilityCost_Charge_Simple:
//{
//LOG(Warn, "OS_UtilityCost_Charge_Simple is not currently translated");
//break;
//}
//case openstudio::IddObjectType::OS_UtilityCost_Computation:
//{
//LOG(Warn, "OS_UtilityCost_Computation is not currently translated");
//break;
//}
//case openstudio::IddObjectType::OS_UtilityCost_Qualify:
//{
//LOG(Warn, "OS_UtilityCost_Qualify is not currently translated");
//break;
//}
//case openstudio::IddObjectType::OS_UtilityCost_Ratchet:
//{
//LOG(Warn, "OS_UtilityCost_Ratchet is not currently translated");
//break;
//}
//case openstudio::IddObjectType::OS_UtilityCost_Tariff:
//{
//LOG(Warn, "OS_UtilityCost_Tariff is not currently translated");
//break;
//}
//case openstudio::IddObjectType::OS_UtilityCost_Variable:
//{
//LOG(Warn, "OS_UtilityCost_Variable is not currently translated");
//break;
//}

case openstudio::IddObjectType::OS_Version :
{
model::Version version = modelObject.cast<Version>();
Expand Down Expand Up @@ -3389,13 +3392,14 @@ std::vector<IddObjectType> ForwardTranslator::iddObjectsToTranslateInitializer()
result.push_back(IddObjectType::OS_Foundation_Kiva);
result.push_back(IddObjectType::OS_Foundation_Kiva_Settings);

result.push_back(IddObjectType::OS_UtilityCost_Charge_Block);
result.push_back(IddObjectType::OS_UtilityCost_Charge_Simple);
result.push_back(IddObjectType::OS_UtilityCost_Computation);
result.push_back(IddObjectType::OS_UtilityCost_Qualify);
result.push_back(IddObjectType::OS_UtilityCost_Ratchet);
result.push_back(IddObjectType::OS_UtilityCost_Tariff);
result.push_back(IddObjectType::OS_UtilityCost_Variable);
// TODO: once UtilityCost objects are wrapped
// result.push_back(IddObjectType::OS_UtilityCost_Charge_Block);
// result.push_back(IddObjectType::OS_UtilityCost_Charge_Simple);
// result.push_back(IddObjectType::OS_UtilityCost_Computation);
// result.push_back(IddObjectType::OS_UtilityCost_Qualify);
// result.push_back(IddObjectType::OS_UtilityCost_Ratchet);
// result.push_back(IddObjectType::OS_UtilityCost_Tariff);
// result.push_back(IddObjectType::OS_UtilityCost_Variable);

result.push_back(IddObjectType::OS_WeatherFile);
result.push_back(IddObjectType::OS_WeatherProperty_SkyTemperature);
Expand Down
Loading

0 comments on commit 9ce5f2d

Please sign in to comment.