Skip to content

Commit

Permalink
Merge pull request NREL#3463 from NREL/merge_julien_prs
Browse files Browse the repository at this point in the history
Merge julien prs
  • Loading branch information
macumber authored Mar 21, 2019
2 parents 24a1fb1 + a864f86 commit 8bb82c5
Show file tree
Hide file tree
Showing 36 changed files with 255 additions and 3,900 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
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
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 @@ -1441,27 +1441,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 @@ -3016,13 +3016,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 @@ -3497,13 +3500,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 8bb82c5

Please sign in to comment.