Skip to content

Instantly share code, notes, and snippets.

View jmarrec's full-sized avatar

Julien Marrec jmarrec

View GitHub Profile
@jmarrec
jmarrec / diff_eplus_idd.md
Created March 6, 2020 16:08
Difference between Energy+.idd (from NREL/EnergyPlus) and ProposedEnergy+.idd (from NREL/OpenStudio)

Differences

  • \min-fields is missing in a lot of cases (that could be brought over to E+ without too much trouble)
  • \default and \required-field on a bunch of fields (which isn't that big of a deal, and could be brought over to E+ too), eg Boiler:Steam
  • ScheduleTypeLimits is mising some of our keys like ClothingInsulation (that could be brought over to E+ too, but IDF editor would need update to handle them)
  • max-fields was added in our ProposedEnergy+.idd for a few cases like Schedule:Year, \max-fields 267
  • Our parser chokes on a couple of \note that have special characters, and some fields like N13, \field Young's modulus (' is problematic) or \note no spaces or other special characters (-,+,/,\) allowed in name
  • Schedule:File is \url-object
  • Some objects actually do not have the \begin-extensible marker, like MaterialProperty:PhaseChange (actually, pretty much ALL MaterialProperty:XXX at least) (but that could be handled in parsing, and also added to the E+ side). So
#include <benchmark/benchmark.h>
#include <iostream>
#include <fstream>
// #include <fmt/format.h>
#include <vector>
#include <filesystem>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
@jmarrec
jmarrec / dummy.svg
Last active July 29, 2021 08:37
8847_HVAC_Diagram_SVG_NotRendered
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# this script records how much time it takes to run the model_annual_occupied_unmet_cooling_hours_detailed() method on a moderately sized model
# as suggested by Scott Horowitz, I tried toggling the boolean createIndexes argument in the SQL file constructor:
# sql_file = OpenStudio::SqlFile.new(OpenStudio::Path.new(sql_path), false)
# this method takes ~23.6 seconds to run (average of 23.6, 23.8, 23.5) with createIndexes set to false,
# and ~24.5 seconds to run (average of 24.1, 25.7, 23.6) with createIndexes set to true (default)
# there is some time spent requiring ruby gems and loading the model, but the main issue is the time it takes to do SQL calls
# each SQL call is ~.3-.4 seconds, which adds up over many zones
@jmarrec
jmarrec / Crash_after_10min.log
Created August 18, 2021 05:31
Resharper: Crash_after_10min.log
07:20:08.397 |I| AddVsVersionToLogs | :1 | JetBrains ReSharper 2021.2 Build 212.0.20210730.153713
07:20:08.405 |I| AddVsVersionToLogs | :1 | Running under Visual Studio Community 2019 version 16.11.31613.86, Hive: 16.0_901e3441
07:20:29.180 |W| VsReSharperMainMenuFixesSinceVs16| :1 | ReSharper menu is not found in the main VS menu.
07:20:32.142 |I| VsSolutionManager15 | :1 | VSSolutionManager::VsSolutionWrapperLifetimes: Solution instance created 55442836
07:20:34.623 |W| VsWorkspaceListener | :1 | Could not get IVsSolutionWorkspaceService. System.InvalidOperationException. Could not query the service provider for the service ID {66685CD1-6BE5-4285-A1A4-1CEBC413F04F}.
07:20:34.810 |I| UE4AssetAdditionalFilesModuleFactory| :1 | UE4AssetAdditionalFilesModuleFactory is disabled
07:20:36.045 |W| HunspellEngine | :1 | Exception when trying to set H
@jmarrec
jmarrec / .gitignore
Last active June 17, 2022 12:32
.gitignore example for Simulation
# =========================
# eQuest
# =========================
*.CTL
*.DSN
*.erp
*.lcr
*.lin
*.LOG
Version,
22.1; !- Version Identifier
Timestep,
4; !- Number of Timesteps per Hour
LifeCycleCost:Parameters,
Life Cycle Cost Parameters, !- Name
EndOfYear, !- Discounting Convention
Version,
22.2; !- Version Identifier
Timestep,
4; !- Number of Timesteps per Hour
LifeCycleCost:Parameters,
Life Cycle Cost Parameters, !- Name
EndOfYear, !- Discounting Convention
@jmarrec
jmarrec / expanded.cpp
Created January 28, 2023 10:40
better enums expansion
namespace std {
inline namespace __1 {}
} // namespace std
typedef long int ptrdiff_t;
typedef long unsigned int size_t;
typedef long double max_align_t;
namespace std {
typedef decltype(nullptr) nullptr_t;
}
@jmarrec
jmarrec / StdEPWDefFormat.def
Created March 7, 2023 07:11
standard EPW format
&wthdata
NumInHour=1
InputFileType='CUSTOM'
InFormat='DELIMITED'
DataElements=year,month,day,hour,minute,datasource,Dry_Bulb_Temperature,Dew_Point_Temperature,Relative_Humidity,Atmospheric_Pressure,Extraterrestrial_Horizontal_Radiation,Extraterrestrial_Direct_Normal_Radiation,Horizontal_Infrared_Radiation_Intensity_from_Sky,Global_Horizontal_Radiation,Direct_Normal_Radiation,Diffuse_Horizontal_Radiation,Global_Horizontal_Illuminance,Direct_Normal_Illuminance,Diffuse_Horizontal_Illuminance,Zenith_Luminance,Wind_Direction,Wind_Speed,Total_Sky_Cover,Opaque_Sky_Cover,Visibility,Ceiling_Height,Present_Weather_Observation,Present_Weather_Codes,Precipitable_Water,Aerosol_Optical_Depth,Snow_Depth,Days_Since_Last_Snow,Albedo,Liquid_Precipitation_Depth,Liquid_Precipitation_Quantity
DataMissingValues=99999,99,99,99,99,,999,999,999,999999,9999,9999,9999,9999,9999,9999,999900,999900,999900,9999,999,999,99,99,9999,99999,9,999999999,999,0.999,999,99,999,999,99
DataUnits='x','x','x','x','x','x','C','C','%','Pa','Wh/m2','Wh/