Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/develop' into develop3
Browse files Browse the repository at this point in the history
# Conflicts:
#	openstudiocore/CMakeLists.txt
#	openstudiocore/src/cli/CMakeLists.txt
#	openstudiocore/src/sdd/ForwardTranslator.cpp
  • Loading branch information
macumber committed Mar 21, 2019
2 parents 8977f72 + 8bb82c5 commit 11dff4e
Show file tree
Hide file tree
Showing 38 changed files with 260 additions and 3,904 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ build_profile/
build-profile/
core-build/
super-build/
super-build-release/
/super-build-shared/
/super-build-static/

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,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
4 changes: 2 additions & 2 deletions openstudiocore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -796,8 +796,7 @@ 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 "openstudio3-gems-20190307.tar.gz")
set(OPENSTUDIO_GEMS_ZIP_EXPECTED_MD5 "3dcc9690c1a9969e0824d6e2780df56c")
Expand Down Expand Up @@ -1584,6 +1583,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
9 changes: 8 additions & 1 deletion openstudiocore/src/cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ endif()


# -Wno-deprecated-declaration, /wd4996: suppresses deprecated warning
# -Wno-register, /wd5033: ISO C++1z does not allow register storage class specifier
# -Wno-register, /wd5033: ISO C++1z does not allow ‘register’ storage class specifier
if(MSVC)
set_target_properties(openstudio PROPERTIES COMPILE_FLAGS "/bigobj /wd4996 /wd5033")
set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/embedded_scripting_wrap.cxx" PROPERTIES COMPILE_FLAGS "-DRUBY_EMBEDDED" )
Expand Down Expand Up @@ -288,6 +288,13 @@ target_link_libraries(openstudio
)

# link CLI with ruby static library, ruby bindings (openstudio.so) are linked to dynamic ruby
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} ${EXTENSION_LIBS} dl crypt)
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 @@ -265,10 +265,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 @@ -2999,41 +2999,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 @@ -3388,13 +3391,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
39 changes: 31 additions & 8 deletions openstudiocore/src/energyplus/ReverseTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -929,14 +929,37 @@ boost::optional<ModelObject> ReverseTranslator::translateAndMapWorkspaceObject(c
modelObject = translateTimestep(workspaceObject);
break;
}
case openstudio::IddObjectType::UtilityCost_Charge_Simple :
{
break; // no-op
}
case openstudio::IddObjectType::UtilityCost_Qualify :
{
break; // no-op
}

// TODO: once UtilityCost objects are wrapped (and ReverseTranslated)
//case openstudio::IddObjectType::OS_UtilityCost_Charge_Block:
//{
//break; // no-op
//}
//case openstudio::IddObjectType::UtilityCost_Charge_Simple :
//{
//break; // no-op
//}
//case openstudio::IddObjectType::UtilityCost_Computation :
//{
//break; // no-op
//}
//case openstudio::IddObjectType::UtilityCost_Qualify :
//{
//break; // no-op
//}
//case openstudio::IddObjectType::UtilityCost_Ratchet :
//{
//break; // no-op
//}
//case openstudio::IddObjectType::UtilityCost_Tariff :
//{
//break; // no-op
//}
//case openstudio::IddObjectType::UtilityCost_Variable :
//{
//break; // no-op
//}

case openstudio::IddObjectType::Version :
{
modelObject = translateVersion(workspaceObject );
Expand Down
45 changes: 24 additions & 21 deletions openstudiocore/src/model/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1439,27 +1439,30 @@ set(${target_name}_src
UtilityBill.hpp
UtilityBill_Impl.hpp
UtilityBill.cpp
UtilityCost_Charge_Block.hpp
UtilityCost_Charge_Block_Impl.hpp
UtilityCost_Charge_Block.cpp
UtilityCost_Charge_Simple.hpp
UtilityCost_Charge_Simple_Impl.hpp
UtilityCost_Charge_Simple.cpp
UtilityCost_Computation.hpp
UtilityCost_Computation_Impl.hpp
UtilityCost_Computation.cpp
UtilityCost_Qualify.hpp
UtilityCost_Qualify_Impl.hpp
UtilityCost_Qualify.cpp
UtilityCost_Ratchet.hpp
UtilityCost_Ratchet_Impl.hpp
UtilityCost_Ratchet.cpp
UtilityCost_Tariff.hpp
UtilityCost_Tariff_Impl.hpp
UtilityCost_Tariff.cpp
UtilityCost_Variable.hpp
UtilityCost_Variable_Impl.hpp
UtilityCost_Variable.cpp

# TODO: once UtilityCost objects are wrapped
# UtilityCost_Charge_Block.hpp
# UtilityCost_Charge_Block_Impl.hpp
# UtilityCost_Charge_Block.cpp
# UtilityCost_Charge_Simple.hpp
# UtilityCost_Charge_Simple_Impl.hpp
# UtilityCost_Charge_Simple.cpp
# UtilityCost_Computation.hpp
# UtilityCost_Computation_Impl.hpp
# UtilityCost_Computation.cpp
# UtilityCost_Qualify.hpp
# UtilityCost_Qualify_Impl.hpp
# UtilityCost_Qualify.cpp
# UtilityCost_Ratchet.hpp
# UtilityCost_Ratchet_Impl.hpp
# UtilityCost_Ratchet.cpp
# UtilityCost_Tariff.hpp
# UtilityCost_Tariff_Impl.hpp
# UtilityCost_Tariff.cpp
# UtilityCost_Variable.hpp
# UtilityCost_Variable_Impl.hpp
# UtilityCost_Variable.cpp

WaterHeaterMixed.hpp
WaterHeaterMixed_Impl.hpp
WaterHeaterMixed.cpp
Expand Down
34 changes: 20 additions & 14 deletions openstudiocore/src/model/ConcreteModelObjects.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,13 +451,16 @@
#include "Timestep.hpp"
#include "UtilityBill.hpp"
#include "UnitarySystemPerformanceMultispeed.hpp"
#include "UtilityCost_Charge_Block.hpp"
#include "UtilityCost_Charge_Simple.hpp"
#include "UtilityCost_Computation.hpp"
#include "UtilityCost_Qualify.hpp"
#include "UtilityCost_Ratchet.hpp"
#include "UtilityCost_Tariff.hpp"
#include "UtilityCost_Variable.hpp"

// TODO: once UtilityCost objects are wrapped
// #include "UtilityCost_Charge_Block.hpp"
// #include "UtilityCost_Charge_Simple.hpp"
// #include "UtilityCost_Computation.hpp"
// #include "UtilityCost_Qualify.hpp"
// #include "UtilityCost_Ratchet.hpp"
// #include "UtilityCost_Tariff.hpp"
// #include "UtilityCost_Variable.hpp"

#include "Version.hpp"
#include "WaterHeaterMixed.hpp"
#include "WaterHeaterHeatPump.hpp"
Expand Down Expand Up @@ -924,13 +927,16 @@
#include "Timestep_Impl.hpp"
#include "UnitarySystemPerformanceMultispeed_Impl.hpp"
#include "UtilityBill_Impl.hpp"
#include "UtilityCost_Charge_Block_Impl.hpp"
#include "UtilityCost_Charge_Simple_Impl.hpp"
#include "UtilityCost_Computation_Impl.hpp"
#include "UtilityCost_Qualify_Impl.hpp"
#include "UtilityCost_Ratchet_Impl.hpp"
#include "UtilityCost_Tariff_Impl.hpp"
#include "UtilityCost_Variable_Impl.hpp"

// TODO: once UtilityCost objects are wrapped
// #include "UtilityCost_Charge_Block_Impl.hpp"
// #include "UtilityCost_Charge_Simple_Impl.hpp"
// #include "UtilityCost_Computation_Impl.hpp"
// #include "UtilityCost_Qualify_Impl.hpp"
// #include "UtilityCost_Ratchet_Impl.hpp"
// #include "UtilityCost_Tariff_Impl.hpp"
// #include "UtilityCost_Variable_Impl.hpp"

#include "Version_Impl.hpp"
#include "WaterHeaterMixed_Impl.hpp"
#include "WaterHeaterHeatPump_Impl.hpp"
Expand Down
34 changes: 20 additions & 14 deletions openstudiocore/src/model/Model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3008,13 +3008,16 @@ detail::Model_Impl::ModelObjectCreator::ModelObjectCreator() {
REGISTER_CONSTRUCTOR(Timestep);
REGISTER_CONSTRUCTOR(UnitarySystemPerformanceMultispeed);
REGISTER_CONSTRUCTOR(UtilityBill);
REGISTER_CONSTRUCTOR(UtilityCost_Charge_Block);
REGISTER_CONSTRUCTOR(UtilityCost_Charge_Simple);
REGISTER_CONSTRUCTOR(UtilityCost_Computation);
REGISTER_CONSTRUCTOR(UtilityCost_Qualify);
REGISTER_CONSTRUCTOR(UtilityCost_Ratchet);
REGISTER_CONSTRUCTOR(UtilityCost_Tariff);
REGISTER_CONSTRUCTOR(UtilityCost_Variable);

// TODO: once UtilityCost objects are wrapped
// REGISTER_CONSTRUCTOR(UtilityCost_Charge_Block);
// REGISTER_CONSTRUCTOR(UtilityCost_Charge_Simple);
// REGISTER_CONSTRUCTOR(UtilityCost_Computation);
// REGISTER_CONSTRUCTOR(UtilityCost_Qualify);
// REGISTER_CONSTRUCTOR(UtilityCost_Ratchet);
// REGISTER_CONSTRUCTOR(UtilityCost_Tariff);
// REGISTER_CONSTRUCTOR(UtilityCost_Variable);

REGISTER_CONSTRUCTOR(Version);
REGISTER_CONSTRUCTOR(WaterHeaterMixed);
REGISTER_CONSTRUCTOR(WaterHeaterHeatPump);
Expand Down Expand Up @@ -3489,13 +3492,16 @@ detail::Model_Impl::ModelObjectCreator::ModelObjectCreator() {
REGISTER_COPYCONSTRUCTORS(Timestep);
REGISTER_COPYCONSTRUCTORS(UnitarySystemPerformanceMultispeed);
REGISTER_COPYCONSTRUCTORS(UtilityBill);
REGISTER_COPYCONSTRUCTORS(UtilityCost_Charge_Block);
REGISTER_COPYCONSTRUCTORS(UtilityCost_Charge_Simple);
REGISTER_COPYCONSTRUCTORS(UtilityCost_Computation);
REGISTER_COPYCONSTRUCTORS(UtilityCost_Qualify);
REGISTER_COPYCONSTRUCTORS(UtilityCost_Ratchet);
REGISTER_COPYCONSTRUCTORS(UtilityCost_Tariff);
REGISTER_COPYCONSTRUCTORS(UtilityCost_Variable);

// TODO: once UtilityCost objects are wrapped
// REGISTER_COPYCONSTRUCTORS(UtilityCost_Charge_Block);
// REGISTER_COPYCONSTRUCTORS(UtilityCost_Charge_Simple);
// REGISTER_COPYCONSTRUCTORS(UtilityCost_Computation);
// REGISTER_COPYCONSTRUCTORS(UtilityCost_Qualify);
// REGISTER_COPYCONSTRUCTORS(UtilityCost_Ratchet);
// REGISTER_COPYCONSTRUCTORS(UtilityCost_Tariff);
// REGISTER_COPYCONSTRUCTORS(UtilityCost_Variable);

REGISTER_COPYCONSTRUCTORS(Version);
REGISTER_COPYCONSTRUCTORS(WaterHeaterMixed);
REGISTER_COPYCONSTRUCTORS(WaterHeaterHeatPump);
Expand Down
Loading

0 comments on commit 11dff4e

Please sign in to comment.