OpenStudio:utilities
 AllClasses Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages

All OpenStudio code is placed in the openstudio namespace. More...

Namespaces

 filesystem
 idfRegex
 model
 string_conversions

Classes

class  AirState
class  Attribute
struct  AttributeDescription
class  AttributeValueType
struct  baseUnitConversionFactor
class  BCL
class  BCLComponent
struct  BCLComponentNameGreater
struct  BCLComponentNameLess
class  BCLCost
class  BCLFacet
class  BCLFile
class  BCLFileReference
class  BCLMeasure
class  BCLMeasureArgument
class  BCLMeasureOutput
class  BCLMetaSearchResult
class  BCLProvenance
class  BCLSearchResult
class  BCLTaxonomyTerm
class  BCLXML
class  BCLXMLType
class  BoundingBox
struct  BTUExpnt
class  BTUUnit
class  BuildingSector
class  Calendar
class  CalibrationBillingPeriod
class  CalibrationResult
class  CalibrationUtilityBill
class  CelsiusUnit
struct  CFMExpnt
class  CFMUnit
class  Chain
class  CSVFile
class  CustomOutputAdapter
class  DataError
struct  DataErrorLess
class  DataErrorType
class  Date
class  DateCompare
class  DateTime
class  DayOfWeek
class  DocumentFormat
struct  DynamicLibrary
class  Edge
class  EndUseCategoryType
class  EndUseFuelType
class  EndUses
class  EndUseType
class  EnvironmentIdentifier
class  EnvironmentType
class  EpwComputedField
class  EpwDataField
class  EpwDataPoint
class  EpwDesignCondition
class  EpwDesignField
class  EpwFile
class  EpwHoliday
class  EulerAngles
class  Exception
class  Face
class  FaceNode
class  FahrenheitUnit
struct  FieldIndexLess
class  FileLogSink
class  FileReference
class  FileReferenceType
struct  FirstOfPairLess
class  FloorplanJS
class  FloorplanObject
class  FSAssignment
class  FSBase
class  FSBuildingType
class  FSBuildingUnit
class  FSConfig
class  FSConstructionSet
class  FSDaylightingControl
class  FSDaylightingControlDefinition
class  FSDispatchable
class  FSDoor
class  FSDoorDefinition
class  FSEdge
class  FSEdgeReference
class  FSFace
class  FSFiller
class  FSGeometry
class  FSGeometryBase
class  FSGround
class  FSModel
class  FSProject
class  FSShading
class  FSSpace
class  FSSpaceType
class  FSStory
class  FSThermalZone
class  FSVertex
class  FSVisitor
class  FSWindow
class  FSWindowDefinition
class  FuelType
struct  GetFirstOfPair
struct  GetSecondOfPair
struct  GPDExpnt
class  GPDUnit
struct  IcharCompare
class  IddUnitString
class  IdfExtensibleGroup
class  IdfFile
class  IdfObject
class  IdfObjectDiff
struct  IdfObjectImplLess
struct  IdfObjectNameLess
struct  IdfObjectTypeLess
class  IdfObjectWatcher
class  ImfFile
struct  IndexLess
class  InstallLocationType
struct  InterpInfo
class  IntersectionResult
struct  IPExpnt
class  IPUnit
struct  IstringCompare
struct  IstringEqual
struct  IstringFind
struct  IstringPairCompare
class  KeyValueIdentifier
class  LevelEvent
class  LineLinear2d
class  LocalBCL
class  LoggerSingleton
class  LogMessage
class  LogSink
class  MeasureBadgeType
class  MeasureLanguage
class  MeasureStep
class  MeasureType
struct  Misc1Expnt
class  Misc1Unit
class  MonthOfYear
struct  MPHExpnt
class  MPHUnit
class  NameFinder
class  NthDayOfWeekInMonth
class  ObjectOrderBase
struct  ObjectPointer
class  OSOptionalQuantity
class  OSQuantityVector
class  Plane
class  Point3d
struct  Point3dComparer
class  PointLatLon
class  Polygon3d
class  Polyhedron
class  PreparedStatement
class  ProgressBar
class  Quantity
class  QuantityConverterSingleton
class  QuantityFactorySingleton
class  Queue
struct  queue_read_canceled
struct  queue_read_empty
class  QueueEvent
class  Ray2d
class  RemoteBCL
class  RemoteQueryResponse
class  ReportingFrequency
class  RubyException
class  RunOptions
struct  Scale
class  ScaleFactorySingleton
class  Scope
struct  SecondOfPairLess
struct  SIExpnt
class  Singleton
class  SIUnit
class  SplitCandidate
class  SqlFile
class  SqlFileTimeSeriesQuery
class  StandardsJSON
class  StepResult
class  StrictnessLevel
class  StringStreamLogSink
class  StructNameFinder
struct  SummaryData
class  Surface3d
class  Surface3dEdge
class  System
struct  TemperatureConversionRule
class  TemperatureUnit
struct  ThermExpnt
class  ThermUnit
class  ThreeBoundingBox
class  ThreeGeometry
class  ThreeGeometryData
class  ThreeMaterial
class  ThreeModelObjectMetadata
class  ThreeScene
class  ThreeSceneChild
class  ThreeSceneMetadata
class  ThreeSceneObject
class  ThreeUserData
class  Time
class  TimeCompare
class  TimeSeries
class  TimeSeriesIdentifier
class  Transformation
class  Unit
class  UnitFactorySingleton
class  UnitSystem
class  UnzipFile
class  UUID
class  ValidityReport
class  ValueFinder
class  Variant
class  VariantType
class  Vector3d
struct  VectorStruct
class  VersionString
class  Vertex
class  VolumeEnclosedReturnType
struct  WhExpnt
class  WhUnit
class  WorkflowJSON
class  WorkflowStep
class  WorkflowStepResult
class  WorkflowStepValue
class  Workspace
class  WorkspaceExtensibleGroup
class  WorkspaceObject
class  WorkspaceObjectDiff
struct  WorkspaceObjectNameGreater
struct  WorkspaceObjectNameLess
class  WorkspaceObjectOrder
class  WorkspaceObjectWatcher
class  WorkspaceWatcher
class  XMLValidator
struct  YearDescription
class  ZipFile

Typedefs

typedef std::vector< BCLMeasureBCLMeasureVector
typedef std::vector< bool > BoolVector
typedef std::vector< BoundingBoxBoundingBoxVector
typedef std::vector< CalendarCalendarVector
typedef std::vector< DateTimeDateTimeVector
typedef std::vector< DateDateVector
typedef std::set< double > DoubleSet
typedef std::vector< double > DoubleVector
typedef std::vector< EulerAnglesEulerAnglesVector
typedef openstudio::UUID Handle
typedef std::map< Handle, HandleHandleMap
typedef std::set< HandleHandleSet
typedef std::vector< HandleHandleVector
typedef ObjectPointer< Handle,
Handle
HHPointer
typedef std::vector< HHPointerHHPointerVector
typedef ObjectPointer< Handle,
unsigned > 
HUPointer
typedef std::vector< HUPointerHUPointerVector
typedef std::vector< IdfFileIdfFileVector
typedef std::vector< ImfFileImfFileVector
typedef std::set< intIntSet
typedef std::vector< intIntVector
typedef std::set< std::string,
IstringCompare
IStringSet
typedef std::string LogChannel
typedef openstudio::Singleton
< LoggerSingleton
Logger
typedef
boost::log::sources::severity_channel_logger_mt
< LogLevel > 
LoggerType
typedef
boost::log::sinks::synchronous_sink
< boost::log::sinks::text_ostream_backend > 
LogSinkBackend
typedef
boost::numeric::ublas::matrix
< double > 
Matrix
typedef boost::optional
< AttributeValueType
OptionalAttributeValueType
typedef boost::optional
< BCLMeasure
OptionalBCLMeasure
typedef boost::optional
< BCLXMLType
OptionalBCLXMLType
typedef boost::optional
< BoundingBox
OptionalBoundingBox
typedef boost::optional
< BuildingSector
OptionalBuildingSector
typedef boost::optional< CalendarOptionalCalendar
typedef boost::optional
< DataErrorType
OptionalDataErrorType
typedef boost::optional< DateOptionalDate
typedef boost::optional< DateTimeOptionalDateTime
typedef boost::optional
< DayOfWeek
OptionalDayOfWeek
typedef boost::optional
< DocumentFormat
OptionalDocumentFormat
typedef boost::optional< double > OptionalDouble
typedef boost::optional
< EndUseCategoryType
OptionalEndUseCategoryType
typedef boost::optional
< EndUseFuelType
OptionalEndUseFuelType
typedef boost::optional
< EndUseType
OptionalEndUseType
typedef boost::optional
< openstudio::EnvironmentIdentifier
OptionalEnvironmentIdentifier
typedef boost::optional
< EnvironmentType
OptionalEnvironmentType
typedef boost::optional
< EpwComputedField
OptionalEpwComputedField
typedef boost::optional
< EpwDataField
OptionalEpwDataField
typedef boost::optional
< EpwDesignField
OptionalEpwDesignField
typedef boost::optional
< EulerAngles
OptionalEulerAngles
typedef boost::optional
< FileReferenceType
OptionalFileReferenceType
typedef boost::optional< FuelTypeOptionalFuelType
typedef boost::optional< HandleOptionalHandle
typedef boost::optional
< HandleVector
OptionalHandleVector
typedef boost::optional< IdfFileOptionalIdfFile
typedef boost::optional< ImfFileOptionalImfFile
typedef boost::optional
< InstallLocationType
OptionalInstallLocationType
typedef boost::optional< intOptionalInt
typedef boost::optional
< openstudio::KeyValueIdentifier
OptionalKeyValueIdentifier
typedef boost::optional
< MeasureBadgeType
OptionalMeasureBadgeType
typedef boost::optional
< MeasureLanguage
OptionalMeasureLanguage
typedef boost::optional
< MeasureType
OptionalMeasureType
typedef boost::optional
< MonthOfYear
OptionalMonthOfYear
typedef boost::optional
< NthDayOfWeekInMonth
OptionalNthDayOfWeekInMonth
typedef boost::optional< pathOptionalPath
typedef boost::optional< PlaneOptionalPlane
typedef boost::optional< Point3dOptionalPoint3d
typedef boost::optional
< PointLatLon
OptionalPointLatLon
typedef boost::optional
< ReportingFrequency
OptionalReportingFrequency
typedef boost::optional< ScopeOptionalScope
typedef boost::optional< SqlFileOptionalSqlFile
typedef boost::optional
< StepResult
OptionalStepResult
typedef boost::optional
< StrictnessLevel
OptionalStrictnessLevel
typedef boost::optional
< std::string > 
OptionalString
typedef boost::optional< TimeOptionalTime
typedef boost::optional
< TimeSeries
OptionalTimeSeries
typedef boost::optional
< openstudio::TimeSeriesIdentifier
OptionalTimeSeriesIdentifier
typedef boost::optional
< Transformation
OptionalTransformation
typedef boost::optional
< UnitSystem
OptionalUnitSystem
typedef boost::optional< unsigned > OptionalUnsigned
typedef boost::optional< UUIDOptionalUUID
typedef boost::optional
< VariantType
OptionalVariantType
typedef boost::optional< Vector3dOptionalVector3d
typedef boost::optional
< VersionString
OptionalVersionString
using OptionalXMLValidator = boost::optional< XMLValidator >
typedef std::variant
< std::monostate, bool, double,
int, unsigned, std::string,
std::vector< Attribute > > 
OSAttributeVariant
typedef boost::filesystem::path path
typedef std::pair< path, pathPathPair
typedef std::vector< PlanePlaneVector
typedef std::vector< Point3dPoint3dVector
typedef std::vector
< Point3dVector
Point3dVectorVector
typedef std::vector< PointLatLonPointLatLonVector
using PolyhedronVector = std::vector< Polyhedron >
typedef openstudio::Singleton
< QuantityFactorySingleton
QuantityFactory
typedef std::set
< ReportingFrequency
ReportingFrequencySet
typedef std::vector
< ReportingFrequency
ReportingFrequencyVector
typedef
VectorStruct::ScalarVectorType 
ScalarVector
typedef std::function< const
Scale &()> 
ScaleConstant
typedef openstudio::Singleton
< ScaleFactorySingleton
ScaleFactory
typedef std::pair
< ScaleConstant, double > 
ScaleOpReturnType
typedef std::vector
< SqlFileTimeSeriesQuery
SqlFileTimeSeriesQueryVector
typedef std::pair< std::string,
std::string > 
StringPair
typedef std::set< std::string > StringSet
typedef std::vector< std::string > StringVector
using Surface3dEdgeVector = std::vector< Surface3dEdge >
using Surface3dVector = std::vector< Surface3d >
typedef std::vector< TimeSeriesTimeSeriesVector
typedef std::vector< TimeTimeVector
typedef std::vector
< Transformation
TransformationVector
typedef ObjectPointer
< unsigned, Handle
UHPointer
typedef std::vector< UHPointerUHPointerVector
typedef std::set< unsigned > UnsignedSet
typedef std::vector< unsigned > UnsignedVector
typedef std::vector< UUIDUUIDVector
typedef VectorStruct::VectorType Vector
typedef std::vector< Vector3dVector3dVector

Enumerations

enum  FloatFormat { FloatFormat::fixed, FloatFormat::general, FloatFormat::general_capital }
enum  ThreeSide { FrontSide = 0, BackSide = 1, DoubleSide = 2 }
enum  XMLValidatorType { XMLValidatorType::XSD, XMLValidatorType::XSLTSchematron, XMLValidatorType::Schematron }

Functions

static void addFaceBack (std::shared_ptr< Vertex > newVertex, std::shared_ptr< Vertex > va, std::shared_ptr< Vertex > vb, std::vector< std::shared_ptr< Face >> &faces)
static void addFaceLeft (std::shared_ptr< Vertex > newVertex, std::shared_ptr< Vertex > va, std::vector< std::shared_ptr< Face >> &faces)
static void addFaceRight (std::shared_ptr< Vertex > newVertex, std::shared_ptr< Vertex > vb, std::vector< std::shared_ptr< Face >> &faces)
static void addMultiBackFaces (const std::vector< std::shared_ptr< QueueEvent >> &edgeList, std::shared_ptr< Vertex > edgeVertex, std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav, std::vector< std::shared_ptr< QueueEvent >> &queue, std::vector< std::shared_ptr< Face >> &faces)
static void addPush (std::shared_ptr< FaceNode > node, std::shared_ptr< FaceNode > newNode)
static std::shared_ptr< FaceNodeaddSplitFaces (std::shared_ptr< FaceNode > lastFaceNode, const Chain &chainBegin, const Chain &chainEnd, std::shared_ptr< Vertex > newVertex, std::vector< std::shared_ptr< Face >> &faces, std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav)
void addThreeMaterial (std::vector< ThreeMaterial > &materials, std::map< std::string, std::string > &materialMap, const ThreeMaterial &material)
bool applicationIsRunningFromBuildDirectory ()
static void applyGableLogicRidgeTwoAnglesBackward (std::vector< std::vector< Point3d >> &surfaces)
static void applyGableLogicRidgeTwoAnglesForward (std::vector< std::vector< Point3d >> &surfaces)
static void applyGableLogicRidgeTwoAnglesInside (std::vector< std::vector< Point3d >> &surfaces)
static void applyGableLogicTriangles (std::vector< std::vector< Point3d >> &surfaces)
static void applyGableLogicTwoRidgesTwoOppositeAngles (std::vector< std::vector< Point3d >> &surfaces)
static void applyGables (std::vector< std::vector< Point3d >> &surfaces)
Handle applyHandleMap (const Handle &original, const HandleMap &handleMap)
HandleVector applyHandleMap (const HandleVector &original, const HandleMap &handleMap)
bool applyViewAndDaylightingGlassRatios (double viewGlassToWallRatio, double daylightingGlassToWallRatio, double desiredViewGlassSillHeight, double desiredDaylightingGlassHeaderHeight, double exteriorShadingProjectionFactor, double interiorShelfProjectionFactor, const std::vector< Point3d > &surfaceVertices, std::vector< Point3d > &viewVertices, std::vector< Point3d > &daylightingVertices, std::vector< Point3d > &exteriorShadingVertices, std::vector< Point3d > &interiorShelfVertices)
static double area (const std::vector< Point3d > &polygon)
static bool areSameLav (std::vector< std::shared_ptr< Vertex >> &lav1, std::vector< std::shared_ptr< Vertex >> &lav2)
std::string ascii_to_lower_copy (std::string_view input)
std::string_view ascii_trim (std::string_view s)
void ascii_trim (std::string &str)
std::string_view ascii_trim_left (std::string_view s)
std::string_view ascii_trim_right (std::string_view s)
void assertKey (const Json::Value &value, const std::string &key)
void assertKeyAndType (const Json::Value &value, const std::string &key, const Json::ValueType &valueType)
static int assertMaxNumberOfIterations (int count)
void assertType (const Json::Value &value, const std::string &key, const Json::ValueType &valueType)
const Scaleatto ()
boost::optional< std::vector
< Point3d > > 
buffer (const std::vector< Point3d > &polygon1, double amount, double tol)
boost::optional< std::vector
< std::vector< Point3d > > > 
buffer (const std::vector< std::vector< Point3d >> &polygons, double amount, double tol)
std::vector< Polygon3dbufferAll (const std::vector< Polygon3d > &polygons, double tol)
static Ray2d calcBisector (const Point3d &p, std::shared_ptr< Edge > e1, std::shared_ptr< Edge > e2)
static boost::optional
< SplitCandidate
calcCandidatePointForSplit (std::shared_ptr< Vertex > vertex, std::shared_ptr< Edge > edge)
static double calcDistance (const Point3d &intersect, std::shared_ptr< Edge > currentEdge)
static std::vector
< SplitCandidate
calcOppositeEdges (std::shared_ptr< Vertex > vertex, const std::vector< std::shared_ptr< Edge >> &edges)
static Vector3d calcVectorBisector (const Vector3d &norm1, const Vector3d &norm2)
template<typename T , typename U >
std::vector< std::vector< T > > castArray (const std::vector< std::vector< U >> &original)
const Scalecenti ()
const Scalecentimilli ()
bool checkKey (const Json::Value &value, const std::string &key)
bool checkKeyAndType (const Json::Value &value, const std::string &key, const Json::ValueType &valueType)
template<class T >
bool checkPtrVecEqual (const std::vector< std::shared_ptr< T >> &a, const std::vector< std::shared_ptr< T >> &b)
std::string checksum (std::string s)
std::string checksum (std::istream &is)
std::string checksum (const path &p)
bool checkType (const Json::Value &value, const std::string &key, const Json::ValueType &valueType)
static std::shared_ptr< EdgechooseLessParallelVertexEdge (std::shared_ptr< Vertex > vertex, std::shared_ptr< Edge > edge)
static int chooseOppositeEdgeLavIndex (std::vector< std::shared_ptr< Vertex >> &edgeLavs, std::shared_ptr< Edge > oppositeEdge, const Point3d &center, std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav)
bool circularEqual (const std::vector< Point3d > &points1, const std::vector< Point3d > &points2, double tol=0.001)
path completeAndNormalize (const path &p)
path completePathToFile (const path &p, const path &base=path(), const std::string &ext=std::string(), bool warnOnMismatch=false)
std::string componentFileExtension ()
static boost::optional< double > computeCloserEdgeEvent (std::shared_ptr< Vertex > vertex, std::vector< std::shared_ptr< QueueEvent >> &queue, std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav)
static void computeEdgeEvents (std::shared_ptr< Vertex > previousVertex, std::shared_ptr< Vertex > nextVertex, std::vector< std::shared_ptr< QueueEvent >> &queue)
static void computeEvents (std::shared_ptr< Vertex > vertex, std::vector< std::shared_ptr< QueueEvent >> &queue, const std::vector< std::shared_ptr< Edge >> &edges, std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav)
static boost::optional< Point3dcomputeIntersectionBisectors (std::shared_ptr< Vertex > vertexPrevious, std::shared_ptr< Vertex > vertexNext)
static void computeSplitEvents (std::shared_ptr< Vertex > vertex, const std::vector< std::shared_ptr< Edge >> &edges, std::vector< std::shared_ptr< QueueEvent >> &queue, boost::optional< double > distanceSquared)
std::vector< std::vector
< Point3d > > 
computeTriangulation (const std::vector< Point3d > &vertices, const std::vector< std::vector< Point3d >> &holes, double tol=0.001)
static void connectFaces (std::shared_ptr< FaceNode > firstFaceNode, std::shared_ptr< FaceNode > secondFaceNode)
bool containsAtomicUnit (const std::string &s)
bool containsCompoundUnit (const std::string &s)
bool containsDirectScaledUnit (const std::string &s)
bool containsFixedPrecisionValue (const std::string &s)
bool containsQuantity (const std::string &s)
bool containsScaledUnit (const std::string &s)
bool containsScientificNotationValue (const std::string &s)
bool containsUnit (const std::string &s)
std::string convertIddName (const std::string &s)
bool copyDirectory (const path &source, const path &destination)
static void correctBisectorDirection (std::shared_ptr< Ray2d > bisector, std::shared_ptr< Vertex > beginNextVertex, std::shared_ptr< Vertex > endPreviousVertex, std::shared_ptr< Edge > beginEdge, std::shared_ptr< Edge > endEdge)
int crc16 (const char *ptr, int count)
static std::vector< ChaincreateChains (const std::vector< std::shared_ptr< QueueEvent >> &cluster, std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav)
static std::vector
< std::shared_ptr< QueueEvent > > 
createEdgeChain (std::vector< std::shared_ptr< QueueEvent >> &edgeCluster)
static std::shared_ptr
< QueueEvent
createEdgeEvent (const Point3d &point, std::shared_ptr< Vertex > previousVertex, std::shared_ptr< Vertex > nextVertex)
static LevelEvent createLevelEvent (Point3d &eventCenter, double distance, const std::vector< std::shared_ptr< QueueEvent >> &eventCluster, std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav)
static std::shared_ptr< VertexcreateMultiSplitVertex (std::shared_ptr< Edge > nextEdge, std::shared_ptr< Edge > previousEdge, Point3d &center, double distance)
static void createOppositeEdgeChains (std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav, std::vector< Chain > &chains, Point3d &center)
static std::shared_ptr< VertexcreateOppositeEdgeVertex (std::shared_ptr< Vertex > newVertex)
boost::optional< QuantitycreateQuantity (const std::string &quantityString)
boost::optional< QuantitycreateQuantity (const std::string &quantityString, UnitSystem system)
boost::optional< QuantitycreateQuantity (double value, const std::string &unitString)
boost::optional< QuantitycreateQuantity (double value, const std::string &unitString, UnitSystem system)
Transformation createRotation (const Vector3d &axis, double radians)
Transformation createRotation (const Point3d &origin, const Vector3d &axis, double radians)
Transformation createRotation (const EulerAngles &angles)
Transformation createTranslation (const Vector3d &translation)
std::string createUniqueName (const std::string &prefix)
UUID createUUID ()
Vector createVector (const std::vector< double > &values)
Vector createVector (const std::vector< long > &values)
static std::vector
< std::shared_ptr< Vertex > > 
cutLavPart (std::vector< std::shared_ptr< Vertex >> &lav, std::shared_ptr< Vertex > startVertex, std::shared_ptr< Vertex > endVertex)
DayOfWeek dayOfWeek (const std::string &day)
const Scaledeci ()
const Scaledecimilli ()
std::pair< std::string, intdecomposeAtomicUnitString (const std::string &s)
std::pair< std::vector
< std::string >, std::vector
< std::string > > 
decomposeCompoundUnitString (const std::string &s)
std::pair< std::string,
std::pair< unsigned,
std::string > > 
decomposeDirectScaledUnit (const std::string &s)
std::pair< std::string,
std::string > 
decomposeQuantityString (const std::string &s)
std::pair< std::string,
std::string > 
decomposeScaledUnitString (const std::string &s)
double degToRad (double degrees)
const Scaledeka ()
std::string documentFileExtension ()
static std::vector
< std::vector< Point3d > > 
doShedRoof (std::vector< Point3d > &polygon, double roofPitchDegrees, double directionDegrees)
static std::vector
< std::vector< Point3d > > 
doStraightSkeleton (std::vector< Point3d > &polygon, double roofPitchDegrees)
static bool edgeBehindBisector (std::shared_ptr< Ray2d > bisector, const LineLinear2d &edge)
std::set< std::string > environmentPeriods (const std::vector< SqlFileTimeSeriesQuery > &queries)
template<class T >
bool equal (T val1, T val2, T tol=std::numeric_limits< T >::epsilon())
std::vector< std::string > eraseEmptyElements (const std::vector< std::string > &sv)
TimeSeries evaluateTimeSeriesFromTimeSeriesVectorFunctor (const boost::function1< TimeSeries, const std::vector< TimeSeries > & > &functor, const std::vector< TimeSeries > &timeSeriesVector)
const Scaleexa ()
std::pair< std::string,
std::string > 
extractScaleAbbreviation (const std::string &str)
static std::vector
< std::vector< Point3d > > 
facesToPoint3d (const std::vector< std::shared_ptr< Face >> &faces, double roofPitchDegrees, double zcoord)
const Scalefemto ()
template<class T >
bool fieldIndexEqualTo (const T &object, unsigned value)
template<class T >
boost::optional< T > findByName (const std::vector< T > &vec, const std::string &name, bool caseSensitive=false)
template<class T >
std::shared_ptr< T > findByName (const std::vector< std::shared_ptr< T >> &vec, const std::string &name, bool caseSensitive=false)
std::vector< std::vector
< unsigned > > 
findConnectedComponents (const Matrix &matrix)
template<class T >
boost::optional< intfindIndexByName (const std::vector< T > &vec, const std::string &name, bool caseSensitive=false)
path findInSystemPath (const path &p)
template<class T >
std::vector< T >::iterator findIteratorByName (std::vector< T > &vec, const std::string &name, bool caseSensitive=false)
static std::shared_ptr< VertexfindOppositeEdgeLav (std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav, std::shared_ptr< Edge > oppositeEdge, const Point3d &center)
template<class T >
boost::optional< T > findStructByName (const std::vector< T > &vec, const std::string &name, bool caseSensitive=false)
template<class T >
std::shared_ptr< T > findStructByName (const std::vector< std::shared_ptr< T >> &vec, const std::string &name, bool caseSensitive=false)
template<class T >
boost::optional< intfindStructIndexByName (const std::vector< T > &vec, const std::string &name, bool caseSensitive=false)
template<class T >
std::vector< T >::iterator findStructIteratorByName (std::vector< T > &vec, const std::string &name, bool caseSensitive=false)
template<class T , class U >
bool firstOfPairEqual (const std::pair< T, U > &pair, const T &value)
template<class T >
bool firstOfPairIStringEqual (const std::pair< std::string, T > &pair, const std::string &value)
int floor0 (double value)
std::string floorplanToThreeJS (const std::string &json, bool openstudioFormat)
std::string formatSuperAndSubscripts (const std::string &str, DocumentFormat fmt)
std::string formatText (const std::string &str, DocumentFormat fmt)
std::string formatUnderscore (const std::string &str)
std::string formatUnitString (const std::string &str, DocumentFormat fmt)
std::string fromThreeUUID (const std::string &uuid)
Point3dVector fromThreeVector (const std::vector< double > &vertices)
std::vector< std::vector
< Point3d > > 
generateGableRoof (std::vector< Point3d > &polygon, double roofPitchDegrees)
std::vector< std::vector
< Point3d > > 
generateHipRoof (std::vector< Point3d > &polygon, double roofPitchDegrees)
std::vector< std::vector
< Point3d > > 
generateShedRoof (std::vector< Point3d > &polygon, double roofPitchDegrees, double directionDegrees)
double getAngle (const Vector3d &vector1, const Vector3d &vector2)
openstudio::path getApplicationBuildDirectory ()
openstudio::path getApplicationDirectory ()
openstudio::path getApplicationPath ()
openstudio::path getApplicationSourceDirectory ()
boost::optional< double > getArea (const std::vector< Point3d > &points)
boost::optional< Point3dgetCentroid (const std::vector< Point3d > &points)
Point3d getCombinedPoint (const Point3d &point3d, std::vector< Point3d > &allPoints, double tol=0.001)
path getCompanionFolder (const path &osmPath)
boost::optional< BCLComponentgetComponent (const std::string &uid, const std::string &versionId="")
double getDistance (const Point3d &point1, const Point3d &point2)
double getDistanceLatLon (double lat1, double lon1, double lat2, double lon2)
double getDistancePointToLineSegment (const Point3d &point, const std::vector< Point3d > &lineSegment)
double getDistancePointToTriangle (const Point3d &point, const std::vector< Point3d > &triangle)
double getDistanceSquared (const Point3d &point1, const Point3d &point2)
static std::shared_ptr< VertexgetEdgeInLav (std::vector< std::shared_ptr< Vertex >> &lav, std::shared_ptr< Edge > oppositeEdge)
openstudio::path getEnergyPlusDirectory ()
openstudio::path getEnergyPlusExecutable ()
std::string getFileExtension (const path &p)
static std::vector< Point3dgetGableTopAndBottomVertices (std::vector< Point3d > &surface)
path getLastLevelDirectoryName (const path &directory)
boost::optional< BCLMeasuregetMeasure (const std::string &uid, const std::string &versionId="")
boost::optional< Vector3dgetNewellVector (const std::vector< Point3d > &points)
std::string getObjectThreeMaterialName (const std::string &iddObjectType, const std::string &name)
openstudio::path getOpenStudioCLI ()
openstudio::path getOpenStudioModule ()
openstudio::path getOpenStudioModuleDirectory ()
static int getOppositeGableIndex (std::vector< std::vector< Point3d >> &surfaces, std::vector< unsigned > connectedSurfaces, unsigned gableIndexNum)
boost::optional< Vector3dgetOutwardNormal (const std::vector< Point3d > &points)
openstudio::path getPerlExecutable ()
openstudio::path getRadianceDirectory ()
std::string getSharedModuleName (std::string_view basename)
std::string_view getSharedModulePrefix ()
std::string_view getSharedModuleSuffix ()
static std::vector< Point3dgetShedLine (const std::vector< Point3d > &polygon, double directionDegrees)
std::string getSurfaceTypeThreeMaterialName (const std::string &surfaceType)
std::string getThreeMaterialId (const std::string &materialName, std::map< std::string, std::string > &materialMap)
const Scalegiga ()
template<class T >
bool greaterThanOrEqual (T val1, T val2, T tol=std::numeric_limits< T >::epsilon())
static std::vector< LevelEventgroupLevelEvents (std::vector< std::shared_ptr< QueueEvent >> &levelEvents, std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav)
template<class T , class U >
bool handleEquals (const T &object, const U &handle)
const Scalehecto ()
const Scalehectokilo ()
std::string iddObjectNameToIdfObjectName (const std::string &s)
static void initEvents (std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav, std::vector< std::shared_ptr< QueueEvent >> &queue, const std::vector< std::shared_ptr< Edge >> &edges)
static double initPolygon (std::vector< Point3d > &polygon)
static void initSlav (const std::vector< Point3d > &polygon, std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav, std::vector< std::shared_ptr< Edge >> &edges, std::vector< std::shared_ptr< Face >> &faces)
double interp (const Vector &x, const Vector &y, const Matrix &v, double xi, double yi, InterpMethod interpMethod=LinearInterp, ExtrapMethod extrapMethod=NoneExtrap)
Vector interp (const Vector &x, const Vector &y, const Matrix &v, const Vector &xi, double yi, InterpMethod interpMethod=LinearInterp, ExtrapMethod extrapMethod=NoneExtrap)
Vector interp (const Vector &x, const Vector &y, const Matrix &v, double xi, const Vector &yi, InterpMethod interpMethod=LinearInterp, ExtrapMethod extrapMethod=NoneExtrap)
Matrix interp (const Vector &x, const Vector &y, const Matrix &v, const Vector &xi, const Vector &yi, InterpMethod interpMethod=LinearInterp, ExtrapMethod extrapMethod=NoneExtrap)
boost::optional
< IntersectionResult
intersect (const std::vector< Point3d > &polygon1, const std::vector< Point3d > &polygon2, double tol)
bool intersects (const std::vector< Point3d > &polygon1, const std::vector< Point3d > &polygon2, double tol)
template<class T >
bool invert (const boost::numeric::ublas::matrix< T > &input, boost::numeric::ublas::matrix< T > &inverse)
bool isAlmostEqual3dPt (const Point3d &lhs, const Point3d &rhs, double tol=0.0127)
bool isAtomicUnit (const std::string &s)
static bool isClockwisePolygon (const std::vector< Point3d > &polygon)
bool isCompoundUnit (const std::string &s)
bool isDirectScaledUnit (const std::string &s)
bool isEmptyDirectory (const path &dirName)
bool isFixedPrecisionValue (const std::string &s)
static bool isInEdgeChain (std::shared_ptr< QueueEvent > split, const Chain &chain)
static bool isInsidePolygon (const Point3d &point, const std::vector< Point3d > &points)
template<class _enum_name >
bool isMember (const _enum_name &e, const StringVector &strValues)
bool isNetworkPath (const path &p)
bool isNetworkPathAvailable (const path &p)
bool isPointOnLineBetweenPoints (const Point3d &start, const Point3d &end, const Point3d &test, double tol=0.0127)
template<class T >
bool isPrime (T val)
bool isQuantity (const std::string &s)
bool isScaledUnit (const std::string &s)
bool isScientificNotationValue (const std::string &s)
bool istringEqual (const std::string &x, const std::string &y)
bool istringLess (const std::string &x, const std::string &y)
bool isUnit (const std::string &s)
boost::optional< std::vector
< Point3d > > 
join (const std::vector< Point3d > &polygon1, const std::vector< Point3d > &polygon2, double tol)
boost::optional< Polygon3djoin (const Polygon3d &polygon1, const Polygon3d &polygon2)
std::vector< std::vector
< Point3d > > 
joinAll (const std::vector< std::vector< Point3d >> &polygons, double tol)
std::vector< Polygon3djoinAll (const std::vector< Polygon3d > &polygons, double tol)
std::vector< Polygon3djoinAllPolygons (const std::vector< std::vector< Point3d >> &polygons, double tol)
std::vector< std::vector
< Point3d > > 
joinAllWithBuffer (const std::vector< std::vector< Point3d >> &polygons, double offset, double tol)
const Scalekilo ()
template<class T >
bool lessThanOrEqual (T val1, T val2, T tol=std::numeric_limits< T >::epsilon())
static std::vector< LevelEventloadAndGroupLevelEvents (std::vector< std::shared_ptr< QueueEvent >> &queue, std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav)
static std::vector
< std::shared_ptr< QueueEvent > > 
loadLevelEvents (std::vector< std::shared_ptr< QueueEvent >> &queue)
Matrix log (const Matrix &v)
Matrix log (const Matrix &v, double base)
static openstudio::LogChannel logChannel ()
void logFree (LogLevel level, const std::string &channel, const std::string &message)
static void makeCounterClockwise (std::vector< Point3d > &polygon)
bool makeParentFolder (const path &p, const path &base=path(), bool recursive=false)
std::vector< ThreeMaterialmakeStandardThreeMaterials ()
ThreeMaterial makeThreeMaterial (const std::string &name, unsigned color, double opacity, unsigned side, unsigned shininess=50, const std::string &type="MeshPhongMaterial")
double maximum (const Matrix &matrix)
double mean (const Matrix &matrix)
const Scalemega ()
static void mergeBeforeBaseVertex (std::shared_ptr< Vertex > base, std::vector< std::shared_ptr< Vertex >> &baseList, std::shared_ptr< Vertex > merged, std::vector< std::shared_ptr< Vertex >> &mergedList)
const Scalemicro ()
const Scalemilli ()
double minimum (const Matrix &matrix)
std::string modelFileExtension ()
bool moduleIsRunningFromBuildDirectory ()
unsigned month (MonthOfYear monthOfYear)
MonthOfYear monthOfYear (const std::string &month)
MonthOfYear monthOfYear (unsigned month)
static void moveNodes (std::shared_ptr< FaceNode > firstNode, std::shared_ptr< FaceNode > secondNode)
std::vector< Point3dmoveVerticesTowardsPoint (const std::vector< Point3d > &vertices, const Point3d &point, double distance)
static void multiEdgeEvent (LevelEvent &event, std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav, std::vector< std::shared_ptr< QueueEvent >> &queue, const std::vector< std::shared_ptr< Edge >> &edges, std::vector< std::shared_ptr< Face >> &faces)
static void multiSplitEvent (LevelEvent &event, std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav, std::vector< std::shared_ptr< QueueEvent >> &queue, const std::vector< std::shared_ptr< Edge >> &edges, std::vector< std::shared_ptr< Face >> &faces)
const Scalemyria ()
const Scalenano ()
constexpr double normalizeAngle0to360 (double angleDegrees)
const ScalenotDefined ()
NthDayOfWeekInMonth nthDayOfWeekInMonth (const std::string &nth)
NthDayOfWeekInMonth nthDayOfWeekInMonth (const Date &date)
unsigned numFractionalDigits (const std::string &str)
unsigned numFractionalDigits (double value, unsigned numSigFigs)
std::pair< unsigned, unsigned > numFractionalDigits (const std::vector< double > &values, unsigned numSigFigs)
std::string objectName (const IdfObject &obj)
const Scaleone ()
unsigned openstudioFaceFormatId ()
bool operator!= (const Matrix &lhs, const Matrix &rhs)
bool operator!= (const UUID &lhs, const UUID &rhs)
bool operator!= (const Scale &firstScale, const Scale &secondScale)
bool operator!= (const Quantity &lQuantity, const Quantity &rQuantity)
bool operator!= (const Unit &lUnit, const Unit &rUnit)
ScaleOpReturnType operator* (const Scale &firstScale, const Scale &secondScale)
Vector3d operator* (double mult, const Vector3d &vec)
Quantity operator* (const Quantity &lQuantity, const Quantity &rQuantity)
Quantity operator* (const Quantity &lQuantity, double d)
Quantity operator* (double d, const Quantity &rQuantity)
Unit operator* (const Unit &lUnit, const Unit &rUnit)
TimeSeries operator* (double d, const TimeSeries &series)
Quantity operator+ (const Quantity &lQuantity, const Quantity &rQuantity)
Vector3d operator- (const Vector3d &vec)
Quantity operator- (const Quantity &rQuantity)
Quantity operator- (const Quantity &lQuantity, const Quantity &rQuantity)
ScaleOpReturnType operator/ (const Scale &firstScale, const Scale &secondScale)
Quantity operator/ (const Quantity &lQuantity, const Quantity &rQuantity)
Quantity operator/ (const Quantity &lQuantity, double d)
Quantity operator/ (double d, const Quantity &rQuantity)
Unit operator/ (const Unit &lUnit, const Unit &rUnit)
bool operator< (const UUID &lhs, const UUID &rhs)
bool operator< (const Scale &firstScale, const Scale &secondScale)
::std::ostream & operator<< (::std::ostream &os, const path &p)
std::ostream & operator<< (std::ostream &os, const boost::optional< double > &x)
std::ostream & operator<< (std::ostream &os, const boost::optional< unsigned > &x)
std::ostream & operator<< (std::ostream &os, const boost::optional< int > &x)
std::ostream & operator<< (std::ostream &os, const boost::optional< std::string > &x)
std::ostream & operator<< (std::ostream &os, const UUID &uuid)
std::ostream & operator<< (std::ostream &os, const InstallLocationType &e)
std::ostream & operator<< (std::ostream &os, const StrictnessLevel &e)
std::ostream & operator<< (std::ostream &os, const VariantType &e)
std::ostream & operator<< (std::ostream &os, const DocumentFormat &e)
std::ostream & operator<< (std::ostream &os, const OSAttributeVariant &attributeVariant)
std::ostream & operator<< (std::ostream &os, const Scale &s)
std::ostream & operator<< (std::ostream &os, const ReportingFrequency &e)
std::ostream & operator<< (std::ostream &os, const MeasureType &e)
std::ostream & operator<< (std::ostream &os, const BCLXMLType &e)
std::ostream & operator<< (std::ostream &os, const MeasureBadgeType &e)
std::ostream & operator<< (std::ostream &os, const StepResult &e)
std::ostream & operator<< (std::ostream &os, const EulerAngles &angles)
std::ostream & operator<< (std::ostream &os, const DayOfWeek &e)
std::ostream & operator<< (std::ostream &os, const MeasureLanguage &e)
std::ostream & operator<< (std::ostream &os, const FileReferenceType &e)
std::ostream & operator<< (std::ostream &os, const Scope &e)
std::ostream & operator<< (std::ostream &os, const EnvironmentType &e)
std::ostream & operator<< (std::ostream &os, const Point3d &point)
std::ostream & operator<< (std::ostream &os, const StandardsJSON &standardsJSON)
std::ostream & operator<< (std::ostream &os, const std::vector< Point3d > &pointVector)
std::ostream & operator<< (std::ostream &os, const AttributeValueType &e)
std::ostream & operator<< (std::ostream &os, const ScaleFactorySingleton &factory)
std::ostream & operator<< (std::ostream &os, const UnitSystem &e)
std::ostream & operator<< (std::ostream &os, const FuelType &e)
std::ostream & operator<< (std::ostream &os, const Variant &variant)
std::ostream & operator<< (std::ostream &os, const Vector3d &vec)
std::ostream & operator<< (std::ostream &os, const Plane &plane)
std::ostream & operator<< (std::ostream &os, const PointLatLon &point)
std::ostream & operator<< (std::ostream &os, const std::vector< Vector3d > &vecVector)
std::ostream & operator<< (std::ostream &os, const MonthOfYear &e)
std::ostream & operator<< (std::ostream &os, const std::vector< PointLatLon > &pointVector)
std::ostream & operator<< (std::ostream &os, const RunOptions &runOptions)
std::ostream & operator<< (std::ostream &os, const Transformation &t)
std::ostream & operator<< (std::ostream &os, const DataErrorType &e)
std::ostream & operator<< (std::ostream &os, const ImfFile &imfFile)
std::ostream & operator<< (std::ostream &os, const Surface3dEdge &edge)
std::ostream & operator<< (std::ostream &os, const EpwDataField &e)
std::ostream & operator<< (std::ostream &os, const EndUseFuelType &e)
std::ostream & operator<< (std::ostream &os, const NthDayOfWeekInMonth &e)
std::ostream & operator<< (std::ostream &os, const EpwComputedField &e)
std::ostream & operator<< (std::ostream &os, const CSVFile &csvFile)
std::ostream & operator<< (std::ostream &os, const WorkflowStep &workflowStep)
std::ostream & operator<< (std::ostream &os, const DateTime &dateTime)
std::ostream & operator<< (std::ostream &os, const Time &time)
std::ostream & operator<< (std::ostream &os, const VersionString &version)
std::ostream & operator<< (std::ostream &os, const EndUseCategoryType &e)
std::ostream & operator<< (std::ostream &os, const SqlFileTimeSeriesQuery &query)
std::ostream & operator<< (std::ostream &os, const EpwDesignField &e)
std::ostream & operator<< (std::ostream &os, const EndUseType &e)
std::ostream & operator<< (std::ostream &os, const BuildingSector &e)
std::ostream & operator<< (std::ostream &os, const IdfFile &idfFile)
std::ostream & operator<< (std::ostream &os, const WorkflowJSON &workflowJSON)
std::ostream & operator<< (std::ostream &os, const Unit &u)
std::ostream & operator<< (std::ostream &os, const Date &date)
std::ostream & operator<< (std::ostream &os, const WorkflowStepResult &workflowStepResult)
bool operator<= (const Scale &firstScale, const Scale &secondScale)
bool operator== (const Matrix &lhs, const Matrix &rhs)
bool operator== (const UUID &lhs, const UUID &rhs)
bool operator== (const Scale &firstScale, const Scale &secondScale)
bool operator== (const Quantity &lQuantity, const Quantity &rQuantity)
bool operator> (const UUID &lhs, const UUID &rhs)
bool operator> (const Scale &firstScale, const Scale &secondScale)
bool operator>= (const Scale &firstScale, const Scale &secondScale)
static Vector3d orthogonalProjection (const Vector3d &unitVector, const Vector3d &vectorToProject)
Matrix outerProd (const Vector &lhs, const Vector &rhs)
Unit parseUnitString (const std::string &unitString)
bool pathBeginsWith (const openstudio::path &t_shorter, const openstudio::path &t_longer)
const char pathDelimiter ()
template<class T >
std::vector< unsigned > permutation (const T &original, const T &newOrder)
template<class T >
permute (const T &original, const std::vector< unsigned > &order)
const Scalepeta ()
static void pickEvent (LevelEvent &event, std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav, std::vector< std::shared_ptr< QueueEvent >> &queue, std::vector< std::shared_ptr< Edge >> &edges, std::vector< std::shared_ptr< Face >> &faces)
const Scalepico ()
bool pointInPolygon (const Point3d &point, const std::vector< Point3d > &polygon, double tol)
bool polygonInPolygon (std::vector< Point3d > &points, const std::vector< Point3d > &polygon, double tol)
ScaleOpReturnType pow (const Scale &scale, int expNum, int expDenom=1)
Quantity pow (const Quantity &rQuantity, int expNum, int expDenom=1)
Unit pow (const Unit &rUnit, int expNum, int expDenom=1)
std::ostream & printPathInformation (std::ostream &os, const path &p)
std::string printScales ()
static void processTwoNodeLavs (std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav, std::vector< std::shared_ptr< QueueEvent >> &queue, std::vector< std::shared_ptr< Face >> &faces)
Matrix prod (const Matrix &lop, const Matrix &rop)
Vector prod (const Matrix &m, const Vector &v)
double radToDeg (double radians)
Matrix randMatrix (double a, double b, unsigned M, unsigned N)
const boost::regex & regexAtomicUnit ()
const boost::regex & regexBaseUnit ()
const boost::regex & regexCompoundUnit ()
const boost::regex & regexDirectScaledUnit ()
const boost::regex & regexEmbeddedAtomicUnit ()
const boost::regex & regexEmbeddedCompoundUnit ()
const boost::regex & regexEmbeddedDirectScaledUnit ()
const boost::regex & regexEmbeddedFixedPrecisionValue ()
const boost::regex & regexEmbeddedQuantity ()
const boost::regex & regexEmbeddedScaledUnit ()
const boost::regex & regexEmbeddedScientificNotationValue ()
const boost::regex & regexEmbeddedUnit ()
const boost::regex & regexExponent ()
const boost::regex & regexFixedPrecisionValue ()
const boost::regex & regexQuantity ()
const boost::regex & regexScaledUnit ()
const boost::regex & regexScientificNotationValue ()
const boost::regex & regexUnit ()
template<class T >
double relativeError (T expected, T actual, T tol=std::numeric_limits< T >::epsilon())
path relativePath (const path &p, const path &base)
path relocatePath (const path &originalPath, const path &originalBase, const path &newBase)
std::string removeBraces (const UUID &uuid)
std::vector< Point3dremoveCollinear (const std::vector< Point3d > &points, double tol=0.001)
std::vector< Point3dremoveCollinearLegacy (const std::vector< Point3d > &points, double tol=0.001)
bool removeDirectory (const path &dirName)
static void removeEmptyLav (std::vector< std::vector< std::shared_ptr< Vertex >>> &sLav)
static void removeEventsUnderHeight (std::vector< std::shared_ptr< QueueEvent >> &queue, double levelHeight)
std::vector< Point3dremoveSpikes (const std::vector< Point3d > &polygon, double tol)
std::vector< Point3dreorderULC (const std::vector< Point3d > &points)
std::string replace (std::string input, const std::string &before, const std::string &after)
std::set
< openstudio::ReportingFrequency
reportingFrequencies (const std::vector< openstudio::SqlFileTimeSeriesQuery > &queries)
std::vector< Point3dreverse (const std::vector< Point3d > &vertices)
std::string rulesetFileExtension ()
ScaleOpReturnType scaleOpHelperFunction (int desiredExponent)
template<class T , class U >
bool secondOfPairEqual (const std::pair< T, U > &pair, const U &value)
template<class T >
bool secondOfPairIStringEqual (const std::pair< T, std::string > &pair, const std::string &value)
bool selfIntersects (const std::vector< Point3d > &polygon, double tol)
path setFileExtension (const path &p, const std::string &ext, bool replaceOnMismatch=false, bool warnOnMismatch=true)
static void setZcoordsToZero (std::vector< Point3d > &polygon)
std::vector< Point3dsimplify (const std::vector< Point3d > &vertices, bool removeCollinear, double tol)
template<typename T >
std::vector< T > sortByObjectName (std::vector< T > objects)
std::vector< std::string > splitEMSLineToTokens (const std::string &line, const std::string &delimiters=" +-*/^=<>&|")
std::vector< std::string > splitString (const std::string &string, char delimiter)
boost::regex subscript ()
std::vector< std::vector
< Point3d > > 
subtract (const std::vector< Point3d > &polygon, const std::vector< std::vector< Point3d >> &holes, double tol)
double sum (const Matrix &matrix)
TimeSeries sum (const std::vector< TimeSeries > &timeSeriesVector)
boost::function1< TimeSeries,
const std::vector< TimeSeries > & > 
sumTimeSeriesFunctor ()
boost::regex superscript ()
std::string tableFileExtension ()
path tempDir ()
const Scaletera ()
std::set< std::string > timeSeriesNames (const std::vector< SqlFileTimeSeriesQuery > &queries)
std::string toCamelCase (const std::string &s)
IdfObject toIdfObject (const EpwFile &epwFile)
std::string toLowerCamelCase (const std::string &s)
std::string toNeatString (double value, unsigned numFractionalDigits=0, bool applyCommas=true)
std::string toNeatStringBySigFigs (double value, unsigned numSigFigs=3, bool applyCommas=true)
double toNumSigFigs (double value, unsigned numSigFigs)
path toPath (const char *s)
path toPath (const std::string &s)
path toPath (std::string_view s)
std::vector< double > toStandardVector (const Vector &values)
std::string toString (const std::string &s)
std::string toString (const char *s)
std::string toString (const path &p)
std::string toString (const UUID &uuid)
std::string toString (const std::wstring &utf16_string)
std::string toString (const wchar_t *w)
std::string toString (double v)
std::string toString (std::istream &s)
std::string toSystemFilename (const path &p)
unsigned toThreeColor (unsigned r, unsigned g, unsigned b)
unsigned toThreeColor (const std::string &s)
std::vector< double > toThreeMatrix (const Transformation &matrix)
Transformation toThreeMatrix (const std::vector< double > &matrix)
std::string toThreeUUID (const std::string &uuid)
std::vector< double > toThreeVector (const Point3dVector &vertices)
std::string toUnderscoreCase (const std::string &s)
std::string toUpperCamelCase (const std::string &s)
UUID toUUID (const std::string &str)
std::wstring toWString (const std::string &s)
template<class T , class U >
bool uuidEquals (const T &object, const U &uuid)
const boost::regex & uuidInString ()
template<class T , class U >
bool uuidsAndVersionsEqual (const T &left, const U &right)
template<class T , class U >
bool uuidsEqual (const T &left, const U &right)
boost::optional< std::string > windowsDriveLetter (const path &p)
bool within (const Point3d &point1, const std::vector< Point3d > &polygon2, double tol)
bool within (const std::vector< Point3d > &geometry1, const std::vector< Point3d > &polygon2, double tol)
const Scaleyocto ()
const Scaleyotta ()
const Scalezepto ()
const Scalezetta ()
bool operator== (const Vector &lhs, const Vector &rhs)
bool operator!= (const Vector &lhs, const Vector &rhs)
GPDUnit createGPDCycle ()
GPDUnit createGPDCurrency ()
IPUnit createIPCycle ()
IPUnit createIPCurrency ()
Misc1Unit createMisc1Cycle ()
Misc1Unit createMisc1Currency ()

Variables

constexpr double DAYS_PER_SECOND = HOURS_PER_SECOND / 24.0
constexpr double EPSILON = 1E-10
constexpr unsigned HOURS_PER_DAY = 24
constexpr double HOURS_PER_SECOND = MINUTES_PER_SECOND / 60.0
constexpr unsigned MINUTES_PER_HOUR = 60
constexpr double MINUTES_PER_SECOND = 1.0 / 60.0
constexpr unsigned SECONDS_PER_MINUTE = 60

Interpolation

enum  InterpMethod { LinearInterp, NearestInterp, HoldLastInterp, HoldNextInterp }
enum  ExtrapMethod { NoneExtrap, NearestExtrap }
InterpInfo interpInfo (const Vector &x, double xi)
double interp (const Vector &x, const Vector &y, double xi, InterpMethod interpMethod=LinearInterp, ExtrapMethod extrapMethod=NoneExtrap)
Vector interp (const Vector &x, const Vector &y, const Vector &xi, InterpMethod interpMethod=LinearInterp, ExtrapMethod extrapMethod=NoneExtrap)

Common Methods and Vector Operations

std::function< double(const
Vector &)> 
sumVectorFunctor ()
std::function< double(const
Vector &)> 
maximumVectorFunctor ()
std::function< double(const
Vector &)> 
minimumVectorFunctor ()
std::function< double(const
Vector &)> 
meanVectorFunctor ()
std::function< double(const
Vector &)> 
varianceVectorFunctor ()
std::function< double(const
Vector &)> 
stdDevVectorFunctor ()
Vector randVector (double a, double b, unsigned N)
Vector linspace (double a, double b, unsigned N)
Vector deltaSpace (double a, double b, double delta)
Vector logspace (double a, double b, unsigned N, double base=10.0)
Vector log (const Vector &x)
Vector log (const Vector &x, double base)
Vector cumsum (const Vector &x, double runningSum=0.0)
double dot (const Vector &lhs, const Vector &rhs)
double sum (const Vector &vector)
double maximum (const Vector &vector)
double minimum (const Vector &vector)
double mean (const Vector &vector)
double variance (const Vector &vector)
double stdDev (const Vector &vector)
double evaluateDoubleFromVectorFunctor (const std::function< double(const Vector &)> &functor, const Vector &vector)

Detailed Description

All OpenStudio code is placed in the openstudio namespace.

OpenStudio utilities are placed directly in the openstudio namespace; higher level sub-projects are placed in sub-namespaces (e.g. openstudio::model).

Typedef Documentation

typedef std::vector<bool> openstudio::BoolVector
typedef std::vector<Calendar> openstudio::CalendarVector

vector of Calendar

typedef std::vector<DateTime> openstudio::DateTimeVector

vector of DateTime

typedef std::vector<Date> openstudio::DateVector

vector of Date

typedef std::set<double> openstudio::DoubleSet
typedef std::vector<double> openstudio::DoubleVector

Objects can be identified by Handle.

typedef std::map<Handle, Handle> openstudio::HandleMap

Maps Handles to Handles.

typedef std::set<Handle> openstudio::HandleSet

Set of Handles. Enforces uniqueness within a list.

typedef std::vector<Handle> openstudio::HandleVector

Vector of Handles.

ObjectPointer with source and target as Handles.

For Workspace, both objects must be in a workspace.

typedef std::vector<HHPointer> openstudio::HHPointerVector

ObjectPointer with source as Handle, target as index in IdfObjectVector.

For Workspace, source will be within workspace, target will be outside of workspace.

typedef std::vector<HUPointer> openstudio::HUPointerVector
typedef std::vector<IdfFile> openstudio::IdfFileVector

vector of idf file

typedef std::vector<ImfFile> openstudio::ImfFileVector

vector of imf file

typedef std::set<int> openstudio::IntSet
typedef std::vector<int> openstudio::IntVector
typedef std::set<std::string, IstringCompare> openstudio::IStringSet

Set of strings with case-insensitive comparison.

typedef std::string openstudio::LogChannel

LogChannel identifies a logger.

typedef boost::log::sources::severity_channel_logger_mt<LogLevel> openstudio::LoggerType

Type of logger used.

typedef boost::log::sinks::synchronous_sink<boost::log::sinks::text_ostream_backend> openstudio::LogSinkBackend

Type of stream sink used.

typedef boost::numeric::ublas::matrix<double> openstudio::Matrix

Matrix.

typedef boost::optional<BCLMeasure> openstudio::OptionalBCLMeasure
typedef boost::optional< BCLXMLType > openstudio::OptionalBCLXMLType
typedef boost::optional<BoundingBox> openstudio::OptionalBoundingBox
typedef boost::optional<Calendar> openstudio::OptionalCalendar

optional Calendar

typedef boost::optional<Date> openstudio::OptionalDate

optional Date

typedef boost::optional<DateTime> openstudio::OptionalDateTime

optional DateTime

typedef boost::optional< DayOfWeek > openstudio::OptionalDayOfWeek
typedef boost::optional<double> openstudio::OptionalDouble
typedef boost::optional< EndUseType > openstudio::OptionalEndUseType
typedef boost::optional< EpwDataField > openstudio::OptionalEpwDataField
typedef boost::optional<EulerAngles> openstudio::OptionalEulerAngles
typedef boost::optional< FuelType > openstudio::OptionalFuelType
related
typedef boost::optional<Handle> openstudio::OptionalHandle

Optional Handle.

Optional HandleVector.

typedef boost::optional<IdfFile> openstudio::OptionalIdfFile

optional idf file

typedef boost::optional<ImfFile> openstudio::OptionalImfFile

optional imf file

typedef boost::optional<int> openstudio::OptionalInt
typedef boost::optional< MeasureType > openstudio::OptionalMeasureType
typedef boost::optional< MonthOfYear > openstudio::OptionalMonthOfYear
typedef boost::optional<path> openstudio::OptionalPath

Optional path.

typedef boost::optional<Plane> openstudio::OptionalPlane

optional Plane

typedef boost::optional<Point3d> openstudio::OptionalPoint3d
typedef boost::optional<PointLatLon> openstudio::OptionalPointLatLon
typedef boost::optional< Scope > openstudio::OptionalScope
typedef boost::optional<SqlFile> openstudio::OptionalSqlFile

optional SqlFile

typedef boost::optional< StepResult > openstudio::OptionalStepResult
typedef boost::optional<std::string> openstudio::OptionalString
typedef boost::optional<Time> openstudio::OptionalTime

optional Time

typedef boost::optional<TimeSeries> openstudio::OptionalTimeSeries
typedef boost::optional< UnitSystem > openstudio::OptionalUnitSystem
typedef boost::optional<unsigned> openstudio::OptionalUnsigned
typedef boost::optional<UUID> openstudio::OptionalUUID

optional UUID

typedef boost::optional< VariantType > openstudio::OptionalVariantType
typedef boost::optional<Vector3d> openstudio::OptionalVector3d
using openstudio::OptionalXMLValidator = typedef boost::optional<XMLValidator>

optional XMLValidator

typedef std::variant<std::monostate, bool, double, int, unsigned, std::string, std::vector<Attribute> > openstudio::OSAttributeVariant
typedef boost::filesystem::path openstudio::path
typedef std::pair<path, path> openstudio::PathPair
typedef std::vector<Plane> openstudio::PlaneVector

vector of Plane

typedef std::vector<Point3d> openstudio::Point3dVector
using openstudio::PolyhedronVector = typedef std::vector<Polyhedron>

ScalarVector.

typedef std::function<const Scale&()> openstudio::ScaleConstant

Function pointer to a constant scale object.

Implemented as function pointer to ensure timely instantiation.

typedef std::pair<ScaleConstant, double> openstudio::ScaleOpReturnType

Return type for scale multiplication and division.

See the corresponding operators for its use.

typedef std::pair<std::string, std::string> openstudio::StringPair
typedef std::set<std::string> openstudio::StringSet
typedef std::vector<std::string> openstudio::StringVector
using openstudio::Surface3dEdgeVector = typedef std::vector<Surface3dEdge>
using openstudio::Surface3dVector = typedef std::vector<Surface3d>
typedef std::vector<Time> openstudio::TimeVector

vector of Time

ObjectPointer with source as index in IdfObjectVector, target as Handle.

For Workspace, source will be outside of workspace, target will be within workspace.

typedef std::vector<UHPointer> openstudio::UHPointerVector
typedef std::set<unsigned> openstudio::UnsignedSet
typedef std::vector<unsigned> openstudio::UnsignedVector
typedef std::vector<UUID> openstudio::UUIDVector

vector of UUID

Vector.

typedef std::vector<Vector3d> openstudio::Vector3dVector

Enumeration Type Documentation

Enum to specify the extrapolation method.

Enumerator
NoneExtrap 
NearestExtrap 
Enumerator
fixed 
general 
general_capital 

Enum to specify the interpolation method.

Enumerator
LinearInterp 
NearestInterp 
HoldLastInterp 
HoldNextInterp 

enum for materials

Enumerator
FrontSide 
BackSide 
DoubleSide 
Enumerator
XSD 
XSLTSchematron 
Schematron 

Function Documentation

static void openstudio::addFaceBack ( std::shared_ptr< Vertex >  newVertex,
std::shared_ptr< Vertex >  va,
std::shared_ptr< Vertex >  vb,
std::vector< std::shared_ptr< Face >> &  faces 
)
static
static void openstudio::addFaceLeft ( std::shared_ptr< Vertex >  newVertex,
std::shared_ptr< Vertex >  va,
std::vector< std::shared_ptr< Face >> &  faces 
)
static
static void openstudio::addFaceRight ( std::shared_ptr< Vertex >  newVertex,
std::shared_ptr< Vertex >  vb,
std::vector< std::shared_ptr< Face >> &  faces 
)
static
static void openstudio::addMultiBackFaces ( const std::vector< std::shared_ptr< QueueEvent >> &  edgeList,
std::shared_ptr< Vertex >  edgeVertex,
std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav,
std::vector< std::shared_ptr< QueueEvent >> &  queue,
std::vector< std::shared_ptr< Face >> &  faces 
)
static
static void openstudio::addPush ( std::shared_ptr< FaceNode >  node,
std::shared_ptr< FaceNode >  newNode 
)
static
static std::shared_ptr<FaceNode> openstudio::addSplitFaces ( std::shared_ptr< FaceNode >  lastFaceNode,
const Chain &  chainBegin,
const Chain &  chainEnd,
std::shared_ptr< Vertex >  newVertex,
std::vector< std::shared_ptr< Face >> &  faces,
std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav 
)
static
void openstudio::addThreeMaterial ( std::vector< ThreeMaterial > &  materials,
std::map< std::string, std::string > &  materialMap,
const ThreeMaterial &  material 
)

Add a ThreeMaterial to a list of materials and map of material name to material.

bool openstudio::applicationIsRunningFromBuildDirectory ( )
Returns
True if the application is running from the build directory
static void openstudio::applyGableLogicRidgeTwoAnglesBackward ( std::vector< std::vector< Point3d >> &  surfaces)
static
static void openstudio::applyGableLogicRidgeTwoAnglesForward ( std::vector< std::vector< Point3d >> &  surfaces)
static
static void openstudio::applyGableLogicRidgeTwoAnglesInside ( std::vector< std::vector< Point3d >> &  surfaces)
static
static void openstudio::applyGableLogicTriangles ( std::vector< std::vector< Point3d >> &  surfaces)
static
static void openstudio::applyGableLogicTwoRidgesTwoOppositeAngles ( std::vector< std::vector< Point3d >> &  surfaces)
static
static void openstudio::applyGables ( std::vector< std::vector< Point3d >> &  surfaces)
static
Handle openstudio::applyHandleMap ( const Handle &  original,
const HandleMap &  handleMap 
)

Returns the handle that corresponds to original, where original is a handleMap key and the returned value is the corresponding value.

If original is not a handleMap key, then the return value .isNull().

HandleVector openstudio::applyHandleMap ( const HandleVector &  original,
const HandleMap &  handleMap 
)

Returns the HandleVector equivalent to original, where original is a vector of handleMap keys, and the return vector consists of the corresponding handleMap values.

Handles in original that are not listed in handleMap are discarded (silently–compare .size() if all values should be preserved).

bool openstudio::applyViewAndDaylightingGlassRatios ( double  viewGlassToWallRatio,
double  daylightingGlassToWallRatio,
double  desiredViewGlassSillHeight,
double  desiredDaylightingGlassHeaderHeight,
double  exteriorShadingProjectionFactor,
double  interiorShelfProjectionFactor,
const std::vector< Point3d > &  surfaceVertices,
std::vector< Point3d > &  viewVertices,
std::vector< Point3d > &  daylightingVertices,
std::vector< Point3d > &  exteriorShadingVertices,
std::vector< Point3d > &  interiorShelfVertices 
)

Sets view and daylighting window, overhang and light shelf vertices by reference. Returns true if successful, false otherwise.

static double openstudio::area ( const std::vector< Point3d > &  polygon)
static
static bool openstudio::areSameLav ( std::vector< std::shared_ptr< Vertex >> &  lav1,
std::vector< std::shared_ptr< Vertex >> &  lav2 
)
static
std::string openstudio::ascii_to_lower_copy ( std::string_view  input)
inline
std::string_view openstudio::ascii_trim ( std::string_view  s)
inline
void openstudio::ascii_trim ( std::string &  str)
inline
std::string_view openstudio::ascii_trim_left ( std::string_view  s)
inline
std::string_view openstudio::ascii_trim_right ( std::string_view  s)
inline
void openstudio::assertKey ( const Json::Value &  value,
const std::string &  key 
)

assert key is present, throws if key is not found

void openstudio::assertKeyAndType ( const Json::Value &  value,
const std::string &  key,
const Json::ValueType &  valueType 
)

assert key is present and type is correct, throws if key not found or type is not correct

static int openstudio::assertMaxNumberOfIterations ( int  count)
static
void openstudio::assertType ( const Json::Value &  value,
const std::string &  key,
const Json::ValueType &  valueType 
)

assert type is correct if key is present, throws if type is not correct

const Scale& openstudio::atto ( )

Static constant defining SI prefix for 10^{-18)

boost::optional<std::vector<Point3d> > openstudio::buffer ( const std::vector< Point3d > &  polygon1,
double  amount,
double  tol 
)
boost::optional<std::vector<std::vector<Point3d> > > openstudio::buffer ( const std::vector< std::vector< Point3d >> &  polygons,
double  amount,
double  tol 
)
std::vector<Polygon3d> openstudio::bufferAll ( const std::vector< Polygon3d > &  polygons,
double  tol 
)

compute the union of many polygons using boost::buffer

static Ray2d openstudio::calcBisector ( const Point3d &  p,
std::shared_ptr< Edge >  e1,
std::shared_ptr< Edge >  e2 
)
static
static boost::optional<SplitCandidate> openstudio::calcCandidatePointForSplit ( std::shared_ptr< Vertex >  vertex,
std::shared_ptr< Edge >  edge 
)
static
static double openstudio::calcDistance ( const Point3d &  intersect,
std::shared_ptr< Edge >  currentEdge 
)
static
static std::vector<SplitCandidate> openstudio::calcOppositeEdges ( std::shared_ptr< Vertex >  vertex,
const std::vector< std::shared_ptr< Edge >> &  edges 
)
static
static Vector3d openstudio::calcVectorBisector ( const Vector3d &  norm1,
const Vector3d &  norm2 
)
static
template<typename T , typename U >
std::vector<std::vector<T> > openstudio::castArray ( const std::vector< std::vector< U >> &  original)
const Scale& openstudio::centi ( )

Static constant defining SI prefix for 10^{-2}.

const Scale& openstudio::centimilli ( )

Static constant defining SI prefix for 10^{-5}.

bool openstudio::checkKey ( const Json::Value &  value,
const std::string &  key 
)

check key is present, return false if key is not found

bool openstudio::checkKeyAndType ( const Json::Value &  value,
const std::string &  key,
const Json::ValueType &  valueType 
)

check key is present and type is correct, return false if key not found or type is not correct

template<class T >
bool openstudio::checkPtrVecEqual ( const std::vector< std::shared_ptr< T >> &  a,
const std::vector< std::shared_ptr< T >> &  b 
)

Test equality between objects in two vectors of pointers.

std::string openstudio::checksum ( std::string  s)

return 8 character hex checksum of string. Pass by copy since we strip the

std::string openstudio::checksum ( std::istream &  is)

return 8 character hex checksum of istream

std::string openstudio::checksum ( const path &  p)

return 8 character hex checksum of file contents

bool openstudio::checkType ( const Json::Value &  value,
const std::string &  key,
const Json::ValueType &  valueType 
)

check type is correct if key is present, return false if type is not correct

static std::shared_ptr<Edge> openstudio::chooseLessParallelVertexEdge ( std::shared_ptr< Vertex >  vertex,
std::shared_ptr< Edge >  edge 
)
static
static int openstudio::chooseOppositeEdgeLavIndex ( std::vector< std::shared_ptr< Vertex >> &  edgeLavs,
std::shared_ptr< Edge >  oppositeEdge,
const Point3d &  center,
std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav 
)
static
bool openstudio::circularEqual ( const std::vector< Point3d > &  points1,
const std::vector< Point3d > &  points2,
double  tol = 0.001 
)

check if two vectors of points are equal (within tolerance) irregardless of initial ordering.

path openstudio::completeAndNormalize ( const path &  p)
path openstudio::completePathToFile ( const path &  p,
const path &  base = path(),
const std::string &  ext = std::string(),
bool  warnOnMismatch = false 
)

Returns completed path if p is a path to a file on this system.

Otherwise, returns an empty path. If base is not empty, completion is done relative to base. If ext is not empty, and p has no extension, then p's extension is set to ext. If ext is not empty and p has an extension, then a warning may be logged if they do not match.

std::string openstudio::componentFileExtension ( )

Single location for storing the default extension for Component serialization files.

(That is, the file extension to be used for Idf files following the IddFileType::OpenStudio Idd, and containing a single Component.)

static boost::optional<double> openstudio::computeCloserEdgeEvent ( std::shared_ptr< Vertex >  vertex,
std::vector< std::shared_ptr< QueueEvent >> &  queue,
std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav 
)
static
static void openstudio::computeEdgeEvents ( std::shared_ptr< Vertex >  previousVertex,
std::shared_ptr< Vertex >  nextVertex,
std::vector< std::shared_ptr< QueueEvent >> &  queue 
)
static
static void openstudio::computeEvents ( std::shared_ptr< Vertex >  vertex,
std::vector< std::shared_ptr< QueueEvent >> &  queue,
const std::vector< std::shared_ptr< Edge >> &  edges,
std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav 
)
static
static boost::optional<Point3d> openstudio::computeIntersectionBisectors ( std::shared_ptr< Vertex >  vertexPrevious,
std::shared_ptr< Vertex >  vertexNext 
)
static
static void openstudio::computeSplitEvents ( std::shared_ptr< Vertex >  vertex,
const std::vector< std::shared_ptr< Edge >> &  edges,
std::vector< std::shared_ptr< QueueEvent >> &  queue,
boost::optional< double >  distanceSquared 
)
static
std::vector<std::vector<Point3d> > openstudio::computeTriangulation ( const std::vector< Point3d > &  vertices,
const std::vector< std::vector< Point3d >> &  holes,
double  tol = 0.001 
)

compute triangulation of vertices, holes are removed in the triangulation requires that vertices and holes are in clockwise order on the z = 0 plane (i.e.

in face coordinates but reversed)

static void openstudio::connectFaces ( std::shared_ptr< FaceNode >  firstFaceNode,
std::shared_ptr< FaceNode >  secondFaceNode 
)
static
bool openstudio::containsAtomicUnit ( const std::string &  s)

Returns true if s contains an atomic unit.

Other text is tolerated as long as it is separated from the unit by whitespace, *, /, (, or )

bool openstudio::containsCompoundUnit ( const std::string &  s)

Returns true if s contains a compound unit.

Other text is tolerated as long as the compound unit is set off by whitespace or parentheses.

bool openstudio::containsDirectScaledUnit ( const std::string &  s)

Returns true if s contains a direct scaled unit.

Other text is tolerated as long as the direct scaled unit is set off by spaces, newline characters, or matching parentheses or brackes. May be terminated with a '. ', ', ', or ';'.

bool openstudio::containsFixedPrecisionValue ( const std::string &  s)

Returns true if s contains a FixedPrecisionValue.

Other text separated by whitespace is tolerated, but ScientificNotationValues and the like are not.

bool openstudio::containsQuantity ( const std::string &  s)

Returns true if s contains a quantity.

Other text is tolerated as long as the scaled unit is set off by spaces or newline characters. May be terminated with a '. ', ', ', or ';'.

bool openstudio::containsScaledUnit ( const std::string &  s)

Returns true if s contains a scaled unit.

Other text is tolerated as long as the scaled unit is set off by spaces or newline characters. May be terminated with a '. ', ', ', or ';'.

bool openstudio::containsScientificNotationValue ( const std::string &  s)

Returns true if s contains a ScientificNotationValue.

Other text is tolerated as long as it is separated from the value by whitespace.

bool openstudio::containsUnit ( const std::string &  s)

Returns true if s contains a scaled unit.

Other text is tolerated as long as the scaled unit is set off by spaces or newline characters. May be terminated with a '. ', ', ', or ';'.

std::string openstudio::convertIddName ( const std::string &  s)

Convert IDD object and field names to something reasonable for computers.

bool openstudio::copyDirectory ( const path &  source,
const path &  destination 
)

Recursively copy a directory, not subject to MAX_PATH.

static void openstudio::correctBisectorDirection ( std::shared_ptr< Ray2d >  bisector,
std::shared_ptr< Vertex >  beginNextVertex,
std::shared_ptr< Vertex >  endPreviousVertex,
std::shared_ptr< Edge >  beginEdge,
std::shared_ptr< Edge >  endEdge 
)
static
int openstudio::crc16 ( const char *  ptr,
int  count 
)

returns the CRC-16 checksum of the first len bytes of data. Replaces Qt implementation qChecksum.

static std::vector<Chain> openstudio::createChains ( const std::vector< std::shared_ptr< QueueEvent >> &  cluster,
std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav 
)
static
static std::vector<std::shared_ptr<QueueEvent> > openstudio::createEdgeChain ( std::vector< std::shared_ptr< QueueEvent >> &  edgeCluster)
static
static std::shared_ptr<QueueEvent> openstudio::createEdgeEvent ( const Point3d &  point,
std::shared_ptr< Vertex >  previousVertex,
std::shared_ptr< Vertex >  nextVertex 
)
static
GPDUnit openstudio::createGPDCurrency ( )

relates GPDUnit

GPDUnit openstudio::createGPDCycle ( )

relates GPDUnit

IPUnit openstudio::createIPCurrency ( )

relates IPUnit

IPUnit openstudio::createIPCycle ( )

relates IPUnit

static LevelEvent openstudio::createLevelEvent ( Point3d &  eventCenter,
double  distance,
const std::vector< std::shared_ptr< QueueEvent >> &  eventCluster,
std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav 
)
static
Misc1Unit openstudio::createMisc1Currency ( )

relates Misc1Unit

Misc1Unit openstudio::createMisc1Cycle ( )

relates Misc1Unit

static std::shared_ptr<Vertex> openstudio::createMultiSplitVertex ( std::shared_ptr< Edge >  nextEdge,
std::shared_ptr< Edge >  previousEdge,
Point3d &  center,
double  distance 
)
static
static void openstudio::createOppositeEdgeChains ( std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav,
std::vector< Chain > &  chains,
Point3d &  center 
)
static
static std::shared_ptr<Vertex> openstudio::createOppositeEdgeVertex ( std::shared_ptr< Vertex >  newVertex)
static
boost::optional<Quantity> openstudio::createQuantity ( const std::string &  quantityString)

Creates a Quantity object from quantityString (a string that matches openstudio::regexQuantity()).

boost::optional<Quantity> openstudio::createQuantity ( const std::string &  quantityString,
UnitSystem  system 
)
boost::optional<Quantity> openstudio::createQuantity ( double  value,
const std::string &  unitString 
)

Creates a general Quantity object corresponding to value * unitString.

boost::optional<Quantity> openstudio::createQuantity ( double  value,
const std::string &  unitString,
UnitSystem  system 
)
Transformation openstudio::createRotation ( const Vector3d &  axis,
double  radians 
)

create rotation about origin defined by axis and angle (radians)

Transformation openstudio::createRotation ( const Point3d &  origin,
const Vector3d &  axis,
double  radians 
)

create rotation about point defined by axis and angle (radians)

Transformation openstudio::createRotation ( const EulerAngles &  angles)

create rotation specified by Euler angles

Transformation openstudio::createTranslation ( const Vector3d &  translation)

create translation along vector

std::string openstudio::createUniqueName ( const std::string &  prefix)

create a unique name, prefix << " " << UUID.

UUID openstudio::createUUID ( )

create a UUID

Vector openstudio::createVector ( const std::vector< double > &  values)

Helper function to construct Vector from std::vector<double>.

Vector openstudio::createVector ( const std::vector< long > &  values)

Helper function to construct Vector from std::vector<long>

Vector openstudio::cumsum ( const Vector &  x,
double  runningSum = 0.0 
)

Compute the cumulative sum of a Vector.

static std::vector<std::shared_ptr<Vertex> > openstudio::cutLavPart ( std::vector< std::shared_ptr< Vertex >> &  lav,
std::shared_ptr< Vertex >  startVertex,
std::shared_ptr< Vertex >  endVertex 
)
static
DayOfWeek openstudio::dayOfWeek ( const std::string &  day)

Convert string to DayOfWeek. Accepts full string or first three letters.

const Scale& openstudio::deci ( )

Static constant defining SI prefix for 10^{-1}.

const Scale& openstudio::decimilli ( )

Static constant defining SI prefix for 10^{-4}.

std::pair<std::string, int> openstudio::decomposeAtomicUnitString ( const std::string &  s)

Returns baseUnit string and integer exponent.

Precondition: isAtomicUnit(s) == true. Throws otherwise.

std::pair<std::vector<std::string>, std::vector<std::string> > openstudio::decomposeCompoundUnitString ( const std::string &  s)

Returns vectors of strings, where each string contains atomic unit.

First vector is numerator, second is denominator. Precondition: isCompoundUnit(s) == true. Throws otherwise.

std::pair<std::string, std::pair<unsigned, std::string> > openstudio::decomposeDirectScaledUnit ( const std::string &  s)

Decomposes a direct scaled unit string into numerator, exponent of scale in denominator (3 for /1000), and denominator.

std::pair<std::string, std::string> openstudio::decomposeQuantityString ( const std::string &  s)

Returns value string as .first and unit string as .second.

Precondition: isQuantity(s) == true. Throws otherwise.

std::pair<std::string, std::string> openstudio::decomposeScaledUnitString ( const std::string &  s)

Returns scale abbreviation as .first and compoundUnitString as .second.

Precondition: isScaledUnit(s) == true. Throws otherwise.

double openstudio::degToRad ( double  degrees)

convert degrees to radians

const Scale& openstudio::deka ( )

Static constant defining SI prefix for 10^1.

Vector openstudio::deltaSpace ( double  a,
double  b,
double  delta 
)

Generates a Vector linearly spaced points starting at a and ending before or at b with interval delta.

std::string openstudio::documentFileExtension ( )
static std::vector<std::vector<Point3d> > openstudio::doShedRoof ( std::vector< Point3d > &  polygon,
double  roofPitchDegrees,
double  directionDegrees 
)
static
static std::vector<std::vector<Point3d> > openstudio::doStraightSkeleton ( std::vector< Point3d > &  polygon,
double  roofPitchDegrees 
)
static
double openstudio::dot ( const Vector &  lhs,
const Vector &  rhs 
)

Returns the dot product between lhs and rhs.

static bool openstudio::edgeBehindBisector ( std::shared_ptr< Ray2d >  bisector,
const LineLinear2d &  edge 
)
static
std::set<std::string> openstudio::environmentPeriods ( const std::vector< SqlFileTimeSeriesQuery > &  queries)

If all queries have been vetted, returns the set of unique environment names.

Otherwise, returns an empty set.

template<class T >
bool openstudio::equal ( val1,
val2,
tol = std::numeric_limits<T>::epsilon() 
)
std::vector<std::string> openstudio::eraseEmptyElements ( const std::vector< std::string > &  sv)
double openstudio::evaluateDoubleFromVectorFunctor ( const std::function< double(const Vector &)> &  functor,
const Vector &  vector 
)

Evaluates functor(vector).

For use in SWIG bindings.

TimeSeries openstudio::evaluateTimeSeriesFromTimeSeriesVectorFunctor ( const boost::function1< TimeSeries, const std::vector< TimeSeries > & > &  functor,
const std::vector< TimeSeries > &  timeSeriesVector 
)

Evaluates functor(timeSeriesVector).

For use in SWIG bindings.

const Scale& openstudio::exa ( )

Static constant defining SI prefix for 10^18.

std::pair<std::string, std::string> openstudio::extractScaleAbbreviation ( const std::string &  str)

If possible, extracts scale abbreviation from the front of str, returning abbreviation in .first and remainder of string in .second.

Otherwise, returns empty strings.

static std::vector<std::vector<Point3d> > openstudio::facesToPoint3d ( const std::vector< std::shared_ptr< Face >> &  faces,
double  roofPitchDegrees,
double  zcoord 
)
static
const Scale& openstudio::femto ( )

Static constant defining SI prefix for 10^{-15}.

template<class T >
bool openstudio::fieldIndexEqualTo ( const T &  object,
unsigned  value 
)
template<class T >
boost::optional<T> openstudio::findByName ( const std::vector< T > &  vec,
const std::string &  name,
bool  caseSensitive = false 
)

Template function for finding objects in a vector T by name.

template<class T >
std::shared_ptr<T> openstudio::findByName ( const std::vector< std::shared_ptr< T >> &  vec,
const std::string &  name,
bool  caseSensitive = false 
)

Template function for finding objects in a vector of shared_ptr<T> by name.

std::vector<std::vector<unsigned> > openstudio::findConnectedComponents ( const Matrix &  matrix)

get the connected components from an NxN adjacency matrix (1.0 for i-j connected, 0.0 for i-j not connected)

template<class T >
boost::optional<int> openstudio::findIndexByName ( const std::vector< T > &  vec,
const std::string &  name,
bool  caseSensitive = false 
)

Template function for finding index of object in a vector<T> by name.

path openstudio::findInSystemPath ( const path &  p)

Tries to locate a file in your PATH, returning unchanged if p isn't just a filename (has a parent_path) or if not found.

template<class T >
std::vector<T>::iterator openstudio::findIteratorByName ( std::vector< T > &  vec,
const std::string &  name,
bool  caseSensitive = false 
)

Template function for finding index of object in a vector<T> by name.

static std::shared_ptr<Vertex> openstudio::findOppositeEdgeLav ( std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav,
std::shared_ptr< Edge >  oppositeEdge,
const Point3d &  center 
)
static
template<class T >
boost::optional<T> openstudio::findStructByName ( const std::vector< T > &  vec,
const std::string &  name,
bool  caseSensitive = false 
)

Template function for finding objects in a vector T by name.

template<class T >
std::shared_ptr<T> openstudio::findStructByName ( const std::vector< std::shared_ptr< T >> &  vec,
const std::string &  name,
bool  caseSensitive = false 
)

Template function for finding objects in a vector of shared_ptr<T> by name.

template<class T >
boost::optional<int> openstudio::findStructIndexByName ( const std::vector< T > &  vec,
const std::string &  name,
bool  caseSensitive = false 
)

Template function for finding index of object in a vector<T> by name.

template<class T >
std::vector<T>::iterator openstudio::findStructIteratorByName ( std::vector< T > &  vec,
const std::string &  name,
bool  caseSensitive = false 
)

Template function for finding index of object in a vector<T> by name.

template<class T , class U >
bool openstudio::firstOfPairEqual ( const std::pair< T, U > &  pair,
const T &  value 
)

Test equality of provided value with first element in a pair.

template<class T >
bool openstudio::firstOfPairIStringEqual ( const std::pair< std::string, T > &  pair,
const std::string &  value 
)

Test istringEqual of provided string with first element in a pair.

int openstudio::floor0 ( double  value)

round towards zero, need to move this

std::string openstudio::floorplanToThreeJS ( const std::string &  json,
bool  openstudioFormat 
)

convienence method, converts a FloorplanJS JSON string to a ThreeJS JSON string

std::string openstudio::formatSuperAndSubscripts ( const std::string &  str,
DocumentFormat  fmt 
)
std::string openstudio::formatText ( const std::string &  str,
DocumentFormat  fmt 
)
std::string openstudio::formatUnderscore ( const std::string &  str)

Ensures that underscores will remain as underscores (not changed to subscripts).

std::string openstudio::formatUnitString ( const std::string &  str,
DocumentFormat  fmt 
)

Applies formatSuperAndSubscripts, and replaces '*' with small dot.

Does nothing for fmt == DocumentFormat::COUT.

std::string openstudio::fromThreeUUID ( const std::string &  uuid)
Point3dVector openstudio::fromThreeVector ( const std::vector< double > &  vertices)
std::vector<std::vector<Point3d> > openstudio::generateGableRoof ( std::vector< Point3d > &  polygon,
double  roofPitchDegrees 
)

Generate gable roof polygons.

std::vector<std::vector<Point3d> > openstudio::generateHipRoof ( std::vector< Point3d > &  polygon,
double  roofPitchDegrees 
)

Generate hip roof polygons.

std::vector<std::vector<Point3d> > openstudio::generateShedRoof ( std::vector< Point3d > &  polygon,
double  roofPitchDegrees,
double  directionDegrees 
)

Generate shed roof polygons.

double openstudio::getAngle ( const Vector3d &  vector1,
const Vector3d &  vector2 
)

return angle (in radians) between two vectors

openstudio::path openstudio::getApplicationBuildDirectory ( )
Returns
The directory the application was built in
openstudio::path openstudio::getApplicationDirectory ( )
Returns
The directory of the current executable application
openstudio::path openstudio::getApplicationPath ( )
Returns
The path to the current executable application
openstudio::path openstudio::getApplicationSourceDirectory ( )
Returns
The source directory the application was built from
boost::optional<double> openstudio::getArea ( const std::vector< Point3d > &  points)

compute area from surface as Point3dVector

boost::optional<Point3d> openstudio::getCentroid ( const std::vector< Point3d > &  points)

compute centroid from surface as Point3dVector

Point3d openstudio::getCombinedPoint ( const Point3d &  point3d,
std::vector< Point3d > &  allPoints,
double  tol = 0.001 
)

if point3d is within tol of any existing points then returns existing point otherwise adds point3d to allPoints and returns point3d

path openstudio::getCompanionFolder ( const path &  osmPath)
boost::optional<BCLComponent> openstudio::getComponent ( const std::string &  uid,
const std::string &  versionId = "" 
)

Uses LocalBCL and RemoteBCL to get a component from the BCL.

Will update LocalBCL with the downloaded component if that is appropriate. Ultimately returns a BCLComponent from the LocalBCL (existing or just downloaded).

double openstudio::getDistance ( const Point3d &  point1,
const Point3d &  point2 
)

return distance between two points

double openstudio::getDistanceLatLon ( double  lat1,
double  lon1,
double  lat2,
double  lon2 
)

compute distance in meters between two points on the Earth's surface lat and lon are specified in degrees

double openstudio::getDistancePointToLineSegment ( const Point3d &  point,
const std::vector< Point3d > &  lineSegment 
)

return distance between a point and a line segment returns 0 if lineSegment does not have length 2

double openstudio::getDistancePointToTriangle ( const Point3d &  point,
const std::vector< Point3d > &  triangle 
)

return distance between a point and a triangle returns 0 if triangle does not have length 3

double openstudio::getDistanceSquared ( const Point3d &  point1,
const Point3d &  point2 
)

return distance squared between two points faster than getDistance; can be used to compare distances

static std::shared_ptr<Vertex> openstudio::getEdgeInLav ( std::vector< std::shared_ptr< Vertex >> &  lav,
std::shared_ptr< Edge >  oppositeEdge 
)
static
openstudio::path openstudio::getEnergyPlusDirectory ( )
Returns
The packaged EnergyPlus installation if it exists.
openstudio::path openstudio::getEnergyPlusExecutable ( )
Returns
The path to the EnergyPlus executable if it exists.
std::string openstudio::getFileExtension ( const path &  p)

Get p's extension as a string with the dot removed.

static std::vector<Point3d> openstudio::getGableTopAndBottomVertices ( std::vector< Point3d > &  surface)
static
path openstudio::getLastLevelDirectoryName ( const path &  directory)
boost::optional<BCLMeasure> openstudio::getMeasure ( const std::string &  uid,
const std::string &  versionId = "" 
)

Uses LocalBCL and RemoteBCL to get a measure from the BCL.

Will update LocalBCL with the downloaded measure if that is appropriate. Ultimately returns a BCLMeasure from the LocalBCL (existing or just downloaded).

boost::optional<Vector3d> openstudio::getNewellVector ( const std::vector< Point3d > &  points)

compute Newell vector from surface as Point3dVector, direction is same as outward normal magnitude is twice the area

std::string openstudio::getObjectThreeMaterialName ( const std::string &  iddObjectType,
const std::string &  name 
)

convert object name to material name

openstudio::path openstudio::getOpenStudioCLI ( )
Returns
The path to the OpenStudio Command Line Interface if it exists.
openstudio::path openstudio::getOpenStudioModule ( )
Returns
Will return path to the binary containing OpenStudio Utilities, could be openstudio.exe, openstudio.so, etc.
openstudio::path openstudio::getOpenStudioModuleDirectory ( )
Returns
Will return dir containing the binary containing OpenStudio Utilities, could be openstudio.exe, openstudio.so, etc.
static int openstudio::getOppositeGableIndex ( std::vector< std::vector< Point3d >> &  surfaces,
std::vector< unsigned >  connectedSurfaces,
unsigned  gableIndexNum 
)
static
boost::optional<Vector3d> openstudio::getOutwardNormal ( const std::vector< Point3d > &  points)

compute outward normal from surface as Point3dVector

openstudio::path openstudio::getPerlExecutable ( )
Returns
The path to the Perl executable if it exists.
openstudio::path openstudio::getRadianceDirectory ( )
Returns
The path to the Radiance installation if it exists.
std::string openstudio::getSharedModuleName ( std::string_view  basename)
Returns
The platform specific shared module name, concatenates the prefix and suffix to the given basename
std::string_view openstudio::getSharedModulePrefix ( )
Returns
The platform specific file prefix for shared modules. "lib" on Linux.
std::string_view openstudio::getSharedModuleSuffix ( )
Returns
The platform specific suffix for shared modules. "dll" on Windows, ".so" on Linux, etc.
static std::vector<Point3d> openstudio::getShedLine ( const std::vector< Point3d > &  polygon,
double  directionDegrees 
)
static
std::string openstudio::getSurfaceTypeThreeMaterialName ( const std::string &  surfaceType)

convert surface type to material name

std::string openstudio::getThreeMaterialId ( const std::string &  materialName,
std::map< std::string, std::string > &  materialMap 
)

Get a material id out of material map.

const Scale& openstudio::giga ( )

Static constant defining SI prefix for 10^9.

template<class T >
bool openstudio::greaterThanOrEqual ( val1,
val2,
tol = std::numeric_limits<T>::epsilon() 
)
static std::vector<LevelEvent> openstudio::groupLevelEvents ( std::vector< std::shared_ptr< QueueEvent >> &  levelEvents,
std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav 
)
static
template<class T , class U >
bool openstudio::handleEquals ( const T &  object,
const U &  handle 
)
const Scale& openstudio::hecto ( )

Static constant defining SI prefix for 10^2.

const Scale& openstudio::hectokilo ( )

Static constant defining SI prefix for 10^5.

std::string openstudio::iddObjectNameToIdfObjectName ( const std::string &  s)

Convert IDD object name to default name for IDF objects of this type.

static void openstudio::initEvents ( std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav,
std::vector< std::shared_ptr< QueueEvent >> &  queue,
const std::vector< std::shared_ptr< Edge >> &  edges 
)
static
static double openstudio::initPolygon ( std::vector< Point3d > &  polygon)
static
static void openstudio::initSlav ( const std::vector< Point3d > &  polygon,
std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav,
std::vector< std::shared_ptr< Edge >> &  edges,
std::vector< std::shared_ptr< Face >> &  faces 
)
static
double openstudio::interp ( const Vector &  x,
const Vector &  y,
const Matrix &  v,
double  xi,
double  yi,
InterpMethod  interpMethod = LinearInterp,
ExtrapMethod  extrapMethod = NoneExtrap 
)

common methods

linear interpolation of the function v = f(x, y) at point xi, yi assumes that x and y are strictly increasing

Vector openstudio::interp ( const Vector &  x,
const Vector &  y,
const Matrix &  v,
const Vector &  xi,
double  yi,
InterpMethod  interpMethod = LinearInterp,
ExtrapMethod  extrapMethod = NoneExtrap 
)

linear interpolation of the function v = f(x, y) at points xi, yi assumes that x and y are strictly increasing

Vector openstudio::interp ( const Vector &  x,
const Vector &  y,
const Matrix &  v,
double  xi,
const Vector &  yi,
InterpMethod  interpMethod = LinearInterp,
ExtrapMethod  extrapMethod = NoneExtrap 
)

linear interpolation of the function v = f(x, y) at points xi, yi assumes that x and y are strictly increasing

Matrix openstudio::interp ( const Vector &  x,
const Vector &  y,
const Matrix &  v,
const Vector &  xi,
const Vector &  yi,
InterpMethod  interpMethod = LinearInterp,
ExtrapMethod  extrapMethod = NoneExtrap 
)

linear interpolation of the function v = f(x, y) at points xi, yi assumes that x and y are strictly increasing

double openstudio::interp ( const Vector &  x,
const Vector &  y,
double  xi,
InterpMethod  interpMethod = LinearInterp,
ExtrapMethod  extrapMethod = NoneExtrap 
)

Linear interpolation of the function y = f(x) at point xi.

Assumes that x is strictly increasing

Vector openstudio::interp ( const Vector &  x,
const Vector &  y,
const Vector &  xi,
InterpMethod  interpMethod = LinearInterp,
ExtrapMethod  extrapMethod = NoneExtrap 
)

Linear interpolation of the function y = f(x) at points xi.

Assumes that x is strictly increasing.

InterpInfo openstudio::interpInfo ( const Vector &  x,
double  xi 
)

Linear interpolation of the function y = f(x) at point xi.

Assumes that x is strictly increasing.

boost::optional<IntersectionResult> openstudio::intersect ( const std::vector< Point3d > &  polygon1,
const std::vector< Point3d > &  polygon2,
double  tol 
)

intersect two polygons, requires that all vertices are in clockwise order on the z = 0 plane (i.e. in face coordinates but reversed)

bool openstudio::intersects ( const std::vector< Point3d > &  polygon1,
const std::vector< Point3d > &  polygon2,
double  tol 
)

returns true if polygon1 intersects polygon2, requires that all vertices are in clockwise order on the z = 0 plane (i.e.

in face coordinates but reversed) returns false if either polygon has less than three vertices

template<class T >
bool openstudio::invert ( const boost::numeric::ublas::matrix< T > &  input,
boost::numeric::ublas::matrix< T > &  inverse 
)

Matrix inversion routine, using lu_factorize and lu_substitute in uBLAS to invert a matrix */.

bool openstudio::isAlmostEqual3dPt ( const Point3d &  lhs,
const Point3d &  rhs,
double  tol = 0.0127 
)
bool openstudio::isAtomicUnit ( const std::string &  s)

Returns true if s is an atomic unit.

No other text is tolerated, including whitespace.

static bool openstudio::isClockwisePolygon ( const std::vector< Point3d > &  polygon)
static
bool openstudio::isCompoundUnit ( const std::string &  s)

Returns true if s is a compound unit.

No other text is tolerated, including whitespace.

bool openstudio::isDirectScaledUnit ( const std::string &  s)

Returns true if s is a direct scaled unit.

No other text is tolerated, including whitespaces.

bool openstudio::isEmptyDirectory ( const path &  dirName)

Determines if a directory is empty, returns false if directory does not exist, not subject to MAX_PATH.

bool openstudio::isFixedPrecisionValue ( const std::string &  s)

Returns true if s is a FixedPrecisionValue.

No other text is tolerated, including whitespace.

static bool openstudio::isInEdgeChain ( std::shared_ptr< QueueEvent >  split,
const Chain &  chain 
)
static
static bool openstudio::isInsidePolygon ( const Point3d &  point,
const std::vector< Point3d > &  points 
)
static

Test if point is inside polygon.

template<class _enum_name >
bool openstudio::isMember ( const _enum_name &  e,
const StringVector &  strValues 
)
bool openstudio::isNetworkPath ( const path &  p)

Determines if a path is on a network drive.

Returns false if path is not absolute. Currently only implemented for Windows, returns false on other platforms.

bool openstudio::isNetworkPathAvailable ( const path &  p)

Determines if a path is on a network drive and if that network resources is available.

Returns false if path is not absolute or if path is not a network path. Currently only implemented for Windows, returns false on other platforms.

bool openstudio::isPointOnLineBetweenPoints ( const Point3d &  start,
const Point3d &  end,
const Point3d &  test,
double  tol = 0.0127 
)
template<class T >
bool openstudio::isPrime ( val)
bool openstudio::isQuantity ( const std::string &  s)

Returns true if s is a quantity.

No other text is tolerated, including whitespace.

bool openstudio::isScaledUnit ( const std::string &  s)

Returns true if s is a scaled unit.

No other text is tolerated, including whitespace.

bool openstudio::isScientificNotationValue ( const std::string &  s)

Returns true if s is a ScientificNotationValue.

No other text is tolerated, including whitespace.

bool openstudio::istringEqual ( const std::string &  x,
const std::string &  y 
)
inline

Test equality between two strings without regard to case.

bool openstudio::istringLess ( const std::string &  x,
const std::string &  y 
)
inline

Compare two strings without regard to case.

bool openstudio::isUnit ( const std::string &  s)

Returns true if s is a unit.

No other text is tolerated, including whitespace.

boost::optional<std::vector<Point3d> > openstudio::join ( const std::vector< Point3d > &  polygon1,
const std::vector< Point3d > &  polygon2,
double  tol 
)

compute the union of two overlapping polygons, requires that all vertices are in clockwise order on the z = 0 plane (i.e. in face coordinates but reversed)

boost::optional<Polygon3d> openstudio::join ( const Polygon3d &  polygon1,
const Polygon3d &  polygon2 
)
std::vector<std::vector<Point3d> > openstudio::joinAll ( const std::vector< std::vector< Point3d >> &  polygons,
double  tol 
)

compute the union of many polygons, requires that all vertices are in clockwise order on the z = 0 plane (i.e. in face coordinates but reversed)

std::vector<Polygon3d> openstudio::joinAll ( const std::vector< Polygon3d > &  polygons,
double  tol 
)

compute the union of many polygons, requires that all vertices are in clockwise order on the z = 0 plane (i.e. in face coordinates but reversed)

std::vector<Polygon3d> openstudio::joinAllPolygons ( const std::vector< std::vector< Point3d >> &  polygons,
double  tol 
)

compute the union of many polygons, requires that all vertices are in clockwise order on the z = 0 plane (i.e. in face coordinates but reversed)

std::vector<std::vector<Point3d> > openstudio::joinAllWithBuffer ( const std::vector< std::vector< Point3d >> &  polygons,
double  offset,
double  tol 
)
const Scale& openstudio::kilo ( )

Static constant defining SI prefix for 10^3.

template<class T >
bool openstudio::lessThanOrEqual ( val1,
val2,
tol = std::numeric_limits<T>::epsilon() 
)
Vector openstudio::linspace ( double  a,
double  b,
unsigned  N 
)

Generates a Vector of N points linearly spaced between and including a and b.

static std::vector<LevelEvent> openstudio::loadAndGroupLevelEvents ( std::vector< std::shared_ptr< QueueEvent >> &  queue,
std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav 
)
static
static std::vector<std::shared_ptr<QueueEvent> > openstudio::loadLevelEvents ( std::vector< std::shared_ptr< QueueEvent >> &  queue)
static
Matrix openstudio::log ( const Matrix &  v)

take the natural logarithm of Matrix elements, componentwise

Matrix openstudio::log ( const Matrix &  v,
double  base 
)

take the logarithm of Matrix elements with respect to base, componentwise

Vector openstudio::log ( const Vector &  x)

Take the natural logarithm of elements of a Vector.

Vector openstudio::log ( const Vector &  x,
double  base 
)

Take the logarithm of elements of a Vector with certain base.

static openstudio::LogChannel openstudio::logChannel ( )
static
void openstudio::logFree ( LogLevel  level,
const std::string &  channel,
const std::string &  message 
)

convenience function for SWIG, prefer macros in C++

Vector openstudio::logspace ( double  a,
double  b,
unsigned  N,
double  base = 10.0 
)

Generates a Vector of N points logarithmically spaced between and including base^a and base^b.

static void openstudio::makeCounterClockwise ( std::vector< Point3d > &  polygon)
static
bool openstudio::makeParentFolder ( const path &  p,
const path &  base = path(),
bool  recursive = false 
)

As necessary, makes the parent folder for path p.

If recursive == false, only one folder may be constructed. If recursive == true, any number of folders may be constructed. Returns false if parent folder does not exist after calling this function.

std::vector<ThreeMaterial> openstudio::makeStandardThreeMaterials ( )

Create the standard ThreeMaterials.

ThreeMaterial openstudio::makeThreeMaterial ( const std::string &  name,
unsigned  color,
double  opacity,
unsigned  side,
unsigned  shininess = 50,
const std::string &  type = "MeshPhongMaterial" 
)

Create a ThreeMaterial.

double openstudio::maximum ( const Matrix &  matrix)

maximum of all elements

double openstudio::maximum ( const Vector &  vector)

Returns the largest element of vector.

double openstudio::mean ( const Matrix &  matrix)

mean of all elements

double openstudio::mean ( const Vector &  vector)

Returns the mean of vector's values.

const Scale& openstudio::mega ( )

Static constant defining SI prefix for 10^6.

static void openstudio::mergeBeforeBaseVertex ( std::shared_ptr< Vertex >  base,
std::vector< std::shared_ptr< Vertex >> &  baseList,
std::shared_ptr< Vertex >  merged,
std::vector< std::shared_ptr< Vertex >> &  mergedList 
)
static

Add all vertex from "merged" lav into "base" lav.

Vertex are added before base vertex. Merged vertex order is reversed.

const Scale& openstudio::micro ( )

Static constant defining SI prefix for 10^{-6}.

const Scale& openstudio::milli ( )

Static constant defining SI prefix for 10^{-3}.

double openstudio::minimum ( const Matrix &  matrix)

minimum of all elements

double openstudio::minimum ( const Vector &  vector)

Returns the smallest element of vector.

std::string openstudio::modelFileExtension ( )

Single location for storing the default extension for Model serialization files.

(That is, the file extension to be used for Idf files following the IddFileType::OpenStudio Idd, or a subset thereof.)

bool openstudio::moduleIsRunningFromBuildDirectory ( )
Returns
True if the OpenStudio Module is running from the build directory
unsigned openstudio::month ( MonthOfYear  monthOfYear)

convert MonthOfYear to unsigned

MonthOfYear openstudio::monthOfYear ( const std::string &  month)

Converts string to MonthOfYear. Accepts full string or first three letters.

MonthOfYear openstudio::monthOfYear ( unsigned  month)

convert unsigned to MonthOfYear

static void openstudio::moveNodes ( std::shared_ptr< FaceNode >  firstNode,
std::shared_ptr< FaceNode >  secondNode 
)
static
std::vector<Point3d> openstudio::moveVerticesTowardsPoint ( const std::vector< Point3d > &  vertices,
const Point3d &  point,
double  distance 
)

move all vertices towards point by distance, pass negative distance to move away from point no guarantee that resulting polygon will be valid

static void openstudio::multiEdgeEvent ( LevelEvent &  event,
std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav,
std::vector< std::shared_ptr< QueueEvent >> &  queue,
const std::vector< std::shared_ptr< Edge >> &  edges,
std::vector< std::shared_ptr< Face >> &  faces 
)
static
static void openstudio::multiSplitEvent ( LevelEvent &  event,
std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav,
std::vector< std::shared_ptr< QueueEvent >> &  queue,
const std::vector< std::shared_ptr< Edge >> &  edges,
std::vector< std::shared_ptr< Face >> &  faces 
)
static
const Scale& openstudio::myria ( )

Static constant defining SI prefix for 10^4.

const Scale& openstudio::nano ( )

Static constant defining SI prefix for 10^{-9}.

constexpr double openstudio::normalizeAngle0to360 ( double  angleDegrees)
const Scale& openstudio::notDefined ( )

Static constant indicating that the scale was not found.

NthDayOfWeekInMonth openstudio::nthDayOfWeekInMonth ( const std::string &  nth)

Convert string to NthDayOfWeekInMonth. Accepts full string, also accepts 1, 1st, 2, 2nd, etc.

NthDayOfWeekInMonth openstudio::nthDayOfWeekInMonth ( const Date &  date)

return nthDayOfWeekInMonth for given date

unsigned openstudio::numFractionalDigits ( const std::string &  str)

Returns the number of digits past the decimal point in str.

unsigned openstudio::numFractionalDigits ( double  value,
unsigned  numSigFigs 
)

Returns the number of significant digits past the decimal point in value, given numSigFigs.

Throws if numSigFigs == 0.

std::pair<unsigned, unsigned> openstudio::numFractionalDigits ( const std::vector< double > &  values,
unsigned  numSigFigs 
)

Returns the minimum and maximum number of significant digits past the decimal point in values, given numSigFigs.

Throws if numSigFigs == 0.

std::string openstudio::objectName ( const IdfObject &  obj)

Returns obj.name().get() if it exists.

Otherwise, returns the IddObject.name(), which is a good choice for unique objects.

const Scale& openstudio::one ( )

Static constant defining no scale (1.0).

unsigned openstudio::openstudioFaceFormatId ( )

identifies ThreeJS faces in OpenStudio format (e.g. unlimited number of vertices)

bool openstudio::operator!= ( const Matrix &  lhs,
const Matrix &  rhs 
)
bool openstudio::operator!= ( const UUID &  lhs,
const UUID &  rhs 
)
bool openstudio::operator!= ( const Scale &  firstScale,
const Scale &  secondScale 
)

Inequality operator for Scales.

Checks exponent and abbreviation.

bool openstudio::operator!= ( const Vector &  lhs,
const Vector &  rhs 
)
bool openstudio::operator!= ( const Quantity &  lQuantity,
const Quantity &  rQuantity 
)
bool openstudio::operator!= ( const Unit &  lUnit,
const Unit &  rUnit 
)

Inequality for units.

Does not compare scales or prettyStrings.

ScaleOpReturnType openstudio::operator* ( const Scale &  firstScale,
const Scale &  secondScale 
)

Multiplication of scales.

If result implied by adding exponents is not available, .second is amount multiplication of values should be multiplied by so result will be correct when using .first.

Vector3d openstudio::operator* ( double  mult,
const Vector3d &  vec 
)

multiplication by a scalar

Quantity openstudio::operator* ( const Quantity &  lQuantity,
const Quantity &  rQuantity 
)

Multiply Quantities.

Used with base class Quantities and mixed Quantity types.

Quantity openstudio::operator* ( const Quantity &  lQuantity,
double  d 
)

Multiply a Quantity by a double.

Quantity openstudio::operator* ( double  d,
const Quantity &  rQuantity 
)

Multiply a Quantity by a double.

Unit openstudio::operator* ( const Unit &  lUnit,
const Unit &  rUnit 
)

Unit multiplication.

Adds exponents on baseUnits and scales. Returned scale exponent may differ from expectation based on initialization of openstudio::ScaleFactory, see Scale operators declared in ScaleFactory.hpp.

TimeSeries openstudio::operator* ( double  d,
const TimeSeries &  series 
)

double * TimeSeries

Quantity openstudio::operator+ ( const Quantity &  lQuantity,
const Quantity &  rQuantity 
)

Add Quantities.

Used with base class Quantities and mixed Quantity types.

Vector3d openstudio::operator- ( const Vector3d &  vec)

negation

Quantity openstudio::operator- ( const Quantity &  rQuantity)

Negate a Quantity.

Quantity openstudio::operator- ( const Quantity &  lQuantity,
const Quantity &  rQuantity 
)

Subtract Quantities.

Used with base class Quantities and mixed Quantity types.

ScaleOpReturnType openstudio::operator/ ( const Scale &  firstScale,
const Scale &  secondScale 
)

Division of scales.

If result implied by subtracting exponents is not available, .second is amount final value should be multiplied by so result will be correct when using .first.

Quantity openstudio::operator/ ( const Quantity &  lQuantity,
const Quantity &  rQuantity 
)

Divide Quantities.

Used with base class Quantities and mixed Quantity types.

Quantity openstudio::operator/ ( const Quantity &  lQuantity,
double  d 
)

Divide a Quantity by a double.

Quantity openstudio::operator/ ( double  d,
const Quantity &  rQuantity 
)

Divide a double by a Quantity.

Unit openstudio::operator/ ( const Unit &  lUnit,
const Unit &  rUnit 
)

Unit division.

Subtracts exponents on rUnit's baseUnits and scales from lUnits's. Returned scale exponent may differ from expectation based on initialization of openstudio::ScaleFactory, see Scale operators declared in ScaleFactory.hpp.

bool openstudio::operator< ( const UUID &  lhs,
const UUID &  rhs 
)
bool openstudio::operator< ( const Scale &  firstScale,
const Scale &  secondScale 
)

Less than operator for Scales.

Compares exponents.

::std::ostream& openstudio::operator<< ( ::std::ostream &  os,
const path &  p 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const boost::optional< double > &  x 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const boost::optional< unsigned > &  x 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const boost::optional< int > &  x 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const boost::optional< std::string > &  x 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const UUID &  uuid 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const InstallLocationType &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const StrictnessLevel &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const VariantType &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const DocumentFormat &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const OSAttributeVariant &  attributeVariant 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const Scale &  s 
)

Outputs all information about Scale s.

Examples:

  Scale s = {"T", "tera",12,1.0E12};
  std::cout << s;
  boost::ofstream f(path);
  f << s;
  LOG_FREE(Info,"channel",s); 
std::ostream& openstudio::operator<< ( std::ostream &  os,
const ReportingFrequency &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const MeasureType &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const BCLXMLType &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const MeasureBadgeType &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const StepResult &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const EulerAngles &  angles 
)

ostream operator

std::ostream& openstudio::operator<< ( std::ostream &  os,
const DayOfWeek &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const MeasureLanguage &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const FileReferenceType &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const Scope &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const EnvironmentType &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const Point3d &  point 
)

ostream operator

std::ostream& openstudio::operator<< ( std::ostream &  os,
const StandardsJSON &  standardsJSON 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const std::vector< Point3d > &  pointVector 
)

ostream operator

std::ostream& openstudio::operator<< ( std::ostream &  os,
const AttributeValueType &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const ScaleFactorySingleton &  factory 
)

Prints scales that are registered in the factory (and thus available for use in Units and Quantities).

Outputs the scales registered in the factory.

std::ostream& openstudio::operator<< ( std::ostream &  os,
const UnitSystem &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const FuelType &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const Variant &  variant 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const Vector3d &  vec 
)

ostream operator

std::ostream& openstudio::operator<< ( std::ostream &  os,
const PointLatLon &  point 
)

ostream operator

std::ostream& openstudio::operator<< ( std::ostream &  os,
const std::vector< Vector3d > &  vecVector 
)

ostream operator

std::ostream& openstudio::operator<< ( std::ostream &  os,
const Plane &  plane 
)

ostream operator

std::ostream& openstudio::operator<< ( std::ostream &  os,
const MonthOfYear &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const std::vector< PointLatLon > &  pointVector 
)

ostream operator

std::ostream& openstudio::operator<< ( std::ostream &  os,
const RunOptions &  runOptions 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const Transformation &  t 
)

ostream operator

std::ostream& openstudio::operator<< ( std::ostream &  os,
const DataErrorType &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const ImfFile &  imfFile 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const Surface3dEdge &  edge 
)

ostream operator

std::ostream& openstudio::operator<< ( std::ostream &  os,
const EpwDataField &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const EndUseFuelType &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const NthDayOfWeekInMonth &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const EpwComputedField &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const CSVFile &  csvFile 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const WorkflowStep &  workflowStep 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const DateTime &  dateTime 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const Time &  time 
)

std::ostream operator<<

std::ostream& openstudio::operator<< ( std::ostream &  os,
const VersionString &  version 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const EndUseCategoryType &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const SqlFileTimeSeriesQuery &  query 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const EpwDesignField &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const EndUseType &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const BuildingSector &  e 
)
inline
std::ostream& openstudio::operator<< ( std::ostream &  os,
const IdfFile &  idfFile 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const WorkflowJSON &  workflowJSON 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const Unit &  u 
)

Print u to a stream.

Scale abbreviation, if any, is printed before prettyString (if non-empty) or standardString.

std::ostream& openstudio::operator<< ( std::ostream &  os,
const Date &  date 
)
std::ostream& openstudio::operator<< ( std::ostream &  os,
const WorkflowStepResult &  workflowStepResult 
)
bool openstudio::operator<= ( const Scale &  firstScale,
const Scale &  secondScale 
)

Less than or equal operator for Scales.

Compares exponents.

bool openstudio::operator== ( const Matrix &  lhs,
const Matrix &  rhs 
)

new operators

bool openstudio::operator== ( const UUID &  lhs,
const UUID &  rhs 
)
bool openstudio::operator== ( const Scale &  firstScale,
const Scale &  secondScale 
)

Equality operator for Scales.

Checks exponent and abbreviation.

bool openstudio::operator== ( const Vector &  lhs,
const Vector &  rhs 
)
bool openstudio::operator== ( const Quantity &  lQuantity,
const Quantity &  rQuantity 
)
bool openstudio::operator> ( const UUID &  lhs,
const UUID &  rhs 
)
bool openstudio::operator> ( const Scale &  firstScale,
const Scale &  secondScale 
)

Greater than operator for Scales.

Compares exponents.

bool openstudio::operator>= ( const Scale &  firstScale,
const Scale &  secondScale 
)

Greater than or equal operator for Scales.

Compares exponents.

static Vector3d openstudio::orthogonalProjection ( const Vector3d &  unitVector,
const Vector3d &  vectorToProject 
)
static
Matrix openstudio::outerProd ( const Vector &  lhs,
const Vector &  rhs 
)

outer product

Unit openstudio::parseUnitString ( const std::string &  unitString)

Parses unit string into a Unit object.

Precondition: isUnit == true. Otherwise, throws. Be forewarned–this does dumb parsing. Doesn't work to extract scales from expressions like "kN", doesn't match base units up with unit systems.

Postcondition: prettyString() == "".

See also
UnitFactory
bool openstudio::pathBeginsWith ( const openstudio::path t_shorter,
const openstudio::path t_longer 
)

Helper to determine if a path begins with another path.

const char openstudio::pathDelimiter ( )

Returns the delimiter for the $PATH env variable.

Basically ";" on windows, ":" otherwise

template<class T >
std::vector<unsigned> openstudio::permutation ( const T &  original,
const T &  newOrder 
)

Returns the permutation that transforms sequence container original into newOrder.

T is required to have .size() and [i] defined. The type of element held by T must have == defined. original and newOrder should contain the same elements, jut in a different order.

template<class T >
T openstudio::permute ( const T &  original,
const std::vector< unsigned > &  order 
)

Returns the contents of original reorders as per order.

That is, result[order[i]] = original[i]. T is required to have .size() and [i] defined. T must also be constructable from .size().

const Scale& openstudio::peta ( )

Static constant defining SI prefix for 10^15.

static void openstudio::pickEvent ( LevelEvent &  event,
std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav,
std::vector< std::shared_ptr< QueueEvent >> &  queue,
std::vector< std::shared_ptr< Edge >> &  edges,
std::vector< std::shared_ptr< Face >> &  faces 
)
static
const Scale& openstudio::pico ( )

Static constant defining SI prefix for 10^{-12}.

bool openstudio::pointInPolygon ( const Point3d &  point,
const std::vector< Point3d > &  polygon,
double  tol 
)

returns true if point is inside polygon, requires that all vertices are in clockwise order on the z = 0 plane (i.e. in face coordinates but reversed)

bool openstudio::polygonInPolygon ( std::vector< Point3d > &  points,
const std::vector< Point3d > &  polygon,
double  tol 
)

returns true if any point is inside polygon, requires that all vertices are in clockwise order on the z = 0 plane (i.e. in face coordinates but reversed)

ScaleOpReturnType openstudio::pow ( const Scale &  scale,
int  expNum,
int  expDenom = 1 
)

Raise scale to an integer power.

If result implied by the operation is not available, .second is amount final value should be multiplied by so result will be correct when using .first.

Quantity openstudio::pow ( const Quantity &  rQuantity,
int  expNum,
int  expDenom = 1 
)

Raise rQuantity to a rational power.

Throws openstudio::Exception if the scale exponent or any base unit exponent is not cleanly divisible by expDenom.

Unit openstudio::pow ( const Unit &  rUnit,
int  expNum,
int  expDenom = 1 
)

Calculate rUnit^(expNum/expDenom).

Throws openstudio::Exception if expDenom is not a common divisor for all baseUnit and scale exponents. Returned scale exponent may differ from expectation based on initialization of openstudio::ScaleFactory, see Scale operators declared in ScaleFactory.hpp.

std::ostream& openstudio::printPathInformation ( std::ostream &  os,
const path &  p 
)

Print information about path p available through openstudio::filesystem.

std::string openstudio::printScales ( )

Wrapper around << for SWIG bindings.

Prints each scale registered in ScaleFactory, and thus available for use in Units, Quantities, and bare Scale operations.

static void openstudio::processTwoNodeLavs ( std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav,
std::vector< std::shared_ptr< QueueEvent >> &  queue,
std::vector< std::shared_ptr< Face >> &  faces 
)
static
Matrix openstudio::prod ( const Matrix &  lop,
const Matrix &  rop 
)

matrix product

Vector openstudio::prod ( const Matrix &  m,
const Vector &  v 
)

vector product

double openstudio::radToDeg ( double  radians)

convert radians to degrees

Matrix openstudio::randMatrix ( double  a,
double  b,
unsigned  M,
unsigned  N 
)

generates a M x N Matrix whose elements come from the uniform distribution on [a,b].

Vector openstudio::randVector ( double  a,
double  b,
unsigned  N 
)

Generates a Vector of N points randomly drawn between and including a and b.

const boost::regex& openstudio::regexAtomicUnit ( )

Atomic unit: kN^2, s, ms. Limits unit strings to 10 characters.

const boost::regex& openstudio::regexBaseUnit ( )

Base unit: kg, kN, etc. Limits unit strings to 10 characters.

const boost::regex& openstudio::regexCompoundUnit ( )

Compound unit: kg*m^2/s^2, kN, s, 1/s.

An atomic unit is a compound unit. A compound unit is not surrounded by Scale.abbr( ).

const boost::regex& openstudio::regexDirectScaledUnit ( )

Textual scaled unit: people/1000 ft^2.

A compound unit with 10+ embedded in the denominator.

match[1] = "numerator units/" match[2] = "10+" match[3] = "denominator units"

const boost::regex& openstudio::regexEmbeddedAtomicUnit ( )

Atomic unit embedded in larger string.

Must be set off with spaces, newline characters, *, /, (, or )

const boost::regex& openstudio::regexEmbeddedCompoundUnit ( )

Compound unit embedded in larger string.

Must be set off with spaces, newline characters, or ( ). May be terminated with a '. ', ', ', or ';'.

const boost::regex& openstudio::regexEmbeddedDirectScaledUnit ( )

Textual scaled unit embedded in larger string.

Must be set off with spaces, newline characters, or matching parentheses or brackets. Match will be in [1], [5], [9], or [13].

const boost::regex& openstudio::regexEmbeddedFixedPrecisionValue ( )

Fixed precision value embedded in larger string.

Must be set off with spaces or newline characters. May be terminated with a '. ', ', ', or ';'.

const boost::regex& openstudio::regexEmbeddedQuantity ( )

Quantity embedded in larger string.

Must be set off with spaces or newline characters. May be terminated with a '. ', ', ', or ';'.

const boost::regex& openstudio::regexEmbeddedScaledUnit ( )

Scaled unit embedded in larger string.

Must be set off with spaces or newline characters. May be terminated with a '. ', ', ', or ';'.

const boost::regex& openstudio::regexEmbeddedScientificNotationValue ( )
const boost::regex& openstudio::regexEmbeddedUnit ( )

Unit embedded in larger string.

Must be set off with spaces, newline characters, or matching parentheses or brackets. May be terminated with a '. ', ', ', or ';'.

const boost::regex& openstudio::regexExponent ( )

Exponent: 0, 1, -2, etc.

const boost::regex& openstudio::regexFixedPrecisionValue ( )

Fixed precision values: 23, 0.126, .1.

const boost::regex& openstudio::regexQuantity ( )

Quantity: 3 kN, -1.021D-2 k(m^2), 2 Hz, 3.0 1/ms, 3.0/ms.

A value (fixed precision, or scientific noation) and a unit separated by a space or a '/'.

  • matches[1] - value
  • matches[2] - one character–space or '/'
  • matches[3] - unit string
const boost::regex& openstudio::regexScaledUnit ( )

Scaled unit: k(kg^2/m^2).

A compound unit surrounded by Scale.abbr().

const boost::regex& openstudio::regexScientificNotationValue ( )

Scientific notation values: 23E10, 1.2E+0, 0.361D-32, .3E100.

const boost::regex& openstudio::regexUnit ( )

Unit: kg/s, kBtu/h, k(m^2), 1/m^2.

A compound unit (which includes atomic units) or a scaled unit.

template<class T >
double openstudio::relativeError ( expected,
actual,
tol = std::numeric_limits<T>::epsilon() 
)
path openstudio::relativePath ( const path &  p,
const path &  base 
)

Determines the relative path to p from base, if possible.

Otherwise, returns empty path.

path openstudio::relocatePath ( const path &  originalPath,
const path &  originalBase,
const path &  newBase 
)
std::string openstudio::removeBraces ( const UUID &  uuid)

create a std::string without curly brackets from a UUID

std::vector<Point3d> openstudio::removeCollinear ( const std::vector< Point3d > &  points,
double  tol = 0.001 
)

removes collinear points

std::vector<Point3d> openstudio::removeCollinearLegacy ( const std::vector< Point3d > &  points,
double  tol = 0.001 
)

removes collinear points, tolerance is for length of cross product after normalizing each line segment

bool openstudio::removeDirectory ( const path &  dirName)

Recursively remove a directory, not subject to MAX_PATH.

static void openstudio::removeEmptyLav ( std::vector< std::vector< std::shared_ptr< Vertex >>> &  sLav)
static
static void openstudio::removeEventsUnderHeight ( std::vector< std::shared_ptr< QueueEvent >> &  queue,
double  levelHeight 
)
static
std::vector<Point3d> openstudio::removeSpikes ( const std::vector< Point3d > &  polygon,
double  tol 
)

removes spikes from a polygon, requires that all vertices are in clockwise order on the z = 0 plane (i.e. in face coordinates but reversed)

std::vector<Point3d> openstudio::reorderULC ( const std::vector< Point3d > &  points)

reorder points to upper-left-corner convention

std::string openstudio::replace ( std::string  input,
const std::string &  before,
const std::string &  after 
)
std::set<openstudio::ReportingFrequency> openstudio::reportingFrequencies ( const std::vector< openstudio::SqlFileTimeSeriesQuery > &  queries)

If all queries have been vetted, returns the set of unique ReportingFrequencies .

Otherwise, returns an empty set.

std::vector<Point3d> openstudio::reverse ( const std::vector< Point3d > &  vertices)

reverse order of vertices

std::string openstudio::rulesetFileExtension ( )

Single location for storing the default extension for rulesengine::Ruleset serialization files.

ScaleOpReturnType openstudio::scaleOpHelperFunction ( int  desiredExponent)

Returns scale with desiredExponent, if possible.

Otherwise backtracks to nearby scale, and returns that scale along with a factor that the value should be multiplied by to make the end result consistent with the returned scale.

template<class T , class U >
bool openstudio::secondOfPairEqual ( const std::pair< T, U > &  pair,
const U &  value 
)

Test equality of provided value with second element in a pair.

template<class T >
bool openstudio::secondOfPairIStringEqual ( const std::pair< T, std::string > &  pair,
const std::string &  value 
)

Test equality of provided value with second element in a pair.

bool openstudio::selfIntersects ( const std::vector< Point3d > &  polygon,
double  tol 
)

returns true polygon intersects iteself, requires that all vertices are in clockwise order on the z = 0 plane (i.e.

in face coordinates but reversed) returns false if polygon has less than three vertices

path openstudio::setFileExtension ( const path &  p,
const std::string &  ext,
bool  replaceOnMismatch = false,
bool  warnOnMismatch = true 
)

Set p's extension to ext.

If p has an extension not equal to ext, p's extension can be replaced and/or a warning can be issued. Returns an empty path if there is a mismatch and replaceOnMismatch == false.

static void openstudio::setZcoordsToZero ( std::vector< Point3d > &  polygon)
static
std::vector<Point3d> openstudio::simplify ( const std::vector< Point3d > &  vertices,
bool  removeCollinear,
double  tol 
)

simplify a list of vertices, requires that all vertices are in clockwise order on the z = 0 plane (i.e. in face coordinates)

template<typename T >
std::vector<T> openstudio::sortByObjectName ( std::vector< T >  objects)
std::vector<std::string> openstudio::splitEMSLineToTokens ( const std::string &  line,
const std::string &  delimiters = " +-*/^=<>&|" 
)

This takes the line of an EMS Program or Subroutine, and will split it into tokens, Before returning, it filters out the reserved keywords (IF, WHILE, RETURN, RUN, etc) and any function (starts with '@') As a result, what is returned is the only "words" that could be potential objects for UUID substitution.

Note: JM 2018-08-16: The second parameters defaults to the operators currently accepted as of 8.9.0. The reserved keywords are hardcoded per the same 8.9.0 version.

std::vector<std::string> openstudio::splitString ( const std::string &  string,
char  delimiter 
)

Split a string into a vector of strings given a delimiter character.

An empty string results in an empty vector, strings that begin or end with the delimiter will result in a vector beginning or ending with an empty string, and non-empty strings with no delimiters returns a vector with the input string as the only element.

double openstudio::stdDev ( const Vector &  vector)

Returns the standard deviation of vector's values.

boost::regex openstudio::subscript ( )
std::vector<std::vector<Point3d> > openstudio::subtract ( const std::vector< Point3d > &  polygon,
const std::vector< std::vector< Point3d >> &  holes,
double  tol 
)

subtract all holes from polygon, requires that all vertices are in clockwise order on the z = 0 plane (i.e. in face coordinates but reversed)

double openstudio::sum ( const Matrix &  matrix)

sum of all elements

double openstudio::sum ( const Vector &  vector)

Returns the sum of vector's values.

TimeSeries openstudio::sum ( const std::vector< TimeSeries > &  timeSeriesVector)
boost::function1<TimeSeries, const std::vector<TimeSeries>&> openstudio::sumTimeSeriesFunctor ( )

Returns std::function pointer to sum(const std::vector<TimeSeries>&).

boost::regex openstudio::superscript ( )
std::string openstudio::tableFileExtension ( )
path openstudio::tempDir ( )

path to a temporary directory.

const Scale& openstudio::tera ( )

Static constant defining SI prefix for 10^12.

std::set<std::string> openstudio::timeSeriesNames ( const std::vector< SqlFileTimeSeriesQuery > &  queries)

If all queries have been vetted, returns the set of unique time series names.

Otherwise, returns an empty set.

std::string openstudio::toCamelCase ( const std::string &  s)

Replace all non-letters and digits with spaces, and then remove spaces by to make camel case.

IdfObject openstudio::toIdfObject ( const EpwFile &  epwFile)
std::string openstudio::toLowerCamelCase ( const std::string &  s)

Make camel case then downcase the first letter.

std::string openstudio::toNeatString ( double  value,
unsigned  numFractionalDigits = 0,
bool  applyCommas = true 
)

Prints value with numFractionalDigits, inserting commas to separate into thousands, millions, etc.

if desired.

std::string openstudio::toNeatStringBySigFigs ( double  value,
unsigned  numSigFigs = 3,
bool  applyCommas = true 
)

Prints value in numSigFigs, inserting commas to separate into thousands, millions, etc.

if desired.

double openstudio::toNumSigFigs ( double  value,
unsigned  numSigFigs 
)

Rounds value to a number of significant figures (rather than to a particular decimal place).

Throws if numSigFigs == 0.

path openstudio::toPath ( const char *  s)

UTF-8 encoded char* to path.

path openstudio::toPath ( const std::string &  s)

UTF-8 encoded std::string to path.

path openstudio::toPath ( std::string_view  s)
std::vector<double> openstudio::toStandardVector ( const Vector &  values)
std::string openstudio::toString ( const std::string &  s)

string to std::string.

std::string openstudio::toString ( const char *  s)

char* to std::string.

std::string openstudio::toString ( const path &  p)

path to std::string.

std::string openstudio::toString ( const UUID &  uuid)

create a std::string from a UUID

std::string openstudio::toString ( const std::wstring &  utf16_string)

wstring to std::string.

std::string openstudio::toString ( const wchar_t *  w)

wchar_t* to std::string.

std::string openstudio::toString ( double  v)

Double to std::string at full precision.

std::string openstudio::toString ( std::istream &  s)

Load data in istream into string.

std::string openstudio::toSystemFilename ( const path &  p)

UTF-8 encoded std::string for opening fstreams.

unsigned openstudio::toThreeColor ( unsigned  r,
unsigned  g,
unsigned  b 
)

convert RGB to unsigned

unsigned openstudio::toThreeColor ( const std::string &  s)

convert string to unsigned

std::vector<double> openstudio::toThreeMatrix ( const Transformation &  matrix)

format a Transformation matrix

Transformation openstudio::toThreeMatrix ( const std::vector< double > &  matrix)
std::string openstudio::toThreeUUID ( const std::string &  uuid)

format a UUID, to limit dependencies UUIDs must be generated outside of this code

std::vector<double> openstudio::toThreeVector ( const Point3dVector &  vertices)

format a list of vertices

std::string openstudio::toUnderscoreCase ( const std::string &  s)

Make underscore case.

std::string openstudio::toUpperCamelCase ( const std::string &  s)

Make camel case then upcase the first letter.

UUID openstudio::toUUID ( const std::string &  str)

create a UUID from a std::string, does not throw, may return a null UUID

std::wstring openstudio::toWString ( const std::string &  s)

string to std::wstring.

template<class T , class U >
bool openstudio::uuidEquals ( const T &  object,
const U &  uuid 
)
const boost::regex& openstudio::uuidInString ( )

Find version 4 UUIDs in a string.

template<class T , class U >
bool openstudio::uuidsAndVersionsEqual ( const T &  left,
const U &  right 
)
template<class T , class U >
bool openstudio::uuidsEqual ( const T &  left,
const U &  right 
)
double openstudio::variance ( const Vector &  vector)

Returns the sample variance of vector's values.

boost::optional<std::string> openstudio::windowsDriveLetter ( const path &  p)

Returns the drive letter, e.g.

if path is "C:\temp" returns "C".

bool openstudio::within ( const Point3d &  point1,
const std::vector< Point3d > &  polygon2,
double  tol 
)

returns true if geometry1 is completely within polygon2, requires that all vertices are in clockwise order on the z = 0 plane (i.e.

in face coordinates but reversed) geometry1 can be a point or a polygon currently only tests that all points of geometry1 are within polygon2, better support when upgrade to boost 1.57

bool openstudio::within ( const std::vector< Point3d > &  geometry1,
const std::vector< Point3d > &  polygon2,
double  tol 
)
const Scale& openstudio::yocto ( )

Static constant defining SI prefix for 10^{-24}.

const Scale& openstudio::yotta ( )

Static constant defining SI prefix for 10^24.

const Scale& openstudio::zepto ( )

Static constant defining SI prefix for 10^{-21}.

const Scale& openstudio::zetta ( )

Static constant defining SI prefix for 10^21.

Variable Documentation

constexpr double openstudio::DAYS_PER_SECOND = HOURS_PER_SECOND / 24.0
constexpr double openstudio::EPSILON = 1E-10
constexpr unsigned openstudio::HOURS_PER_DAY = 24
constexpr double openstudio::HOURS_PER_SECOND = MINUTES_PER_SECOND / 60.0
std::function<double(const Vector&)> openstudio::maximumVectorFunctor()

Returns std::function pointer to maximum(const Vector&).

std::function<double(const Vector&)> openstudio::meanVectorFunctor()

Returns std::function pointer to mean(const Vector&).

std::function<double(const Vector&)> openstudio::minimumVectorFunctor()

Returns std::function pointer to minimum(const Vector&).

constexpr unsigned openstudio::MINUTES_PER_HOUR = 60
constexpr double openstudio::MINUTES_PER_SECOND = 1.0 / 60.0
constexpr unsigned openstudio::SECONDS_PER_MINUTE = 60
std::function<double(const Vector&)> openstudio::stdDevVectorFunctor()

Returns std::function pointer to stdDev(const Vector&).

std::function<double(const Vector&)> openstudio::sumVectorFunctor()

Returns std::function pointer to sum(const Vector&).

std::function<double(const Vector&)> openstudio::varianceVectorFunctor()

Returns std::function pointer to variance(const Vector&).