OpenStudioCore:runmanager/lib
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Member Functions | List of all members
openstudio::runmanager::ConfigOptions Class Reference

#include <ConfigOptions.hpp>

Public Member Functions

 ConfigOptions (bool t_loadQSettings=false)
 Constructor to set intelligent defaults for the current system Defaults to max parallel local jobs as number of hardware threads - 1. More...
 
void fastFindEnergyPlus ()
 Automatically find EnergyPlus if it is in a well defined, known place, then add to ConfigOptions. More...
 
void fastFindRadiance ()
 Automatically find Radiance if it is in a well defined, known place, then add to ConfigOptions. More...
 
void fastFindRuby ()
 Automatically find Ruby if it is in a well defined, known place, then add to ConfigOptions. More...
 
bool findTools (bool t_showProgressDialog, bool t_onlyIfZeroTools=false, bool t_promptUser=false, bool t_checkQSettings=false)
 Automatically find tools and add them to the ConfigOptions. More...
 
openstudio::path getDefaultEPWLocation () const
 
openstudio::path getDefaultIDFLocation () const
 
int getMaxLocalJobs () const
 
openstudio::path getOutputLocation () const
 
bool getSimpleName () const
 
std::vector< std::pair
< ToolVersion,
ToolLocationInfo > > 
getToolLocations () const
 get all known version / path pairs More...
 
openstudio::runmanager::Tools getTools () const
 get all known tools for passing to jobs More...
 
void reset ()
 Remove all known versions of E+. All other configuration data stays the same. More...
 
void saveQSettings () const
 Saves the tools to the appropriate QSettings location. More...
 
void setDefaultEPWLocation (const openstudio::path &t_loc)
 Sets the default location to open UI dialogs to when opening an EPW. More...
 
void setDefaultIDFLocation (const openstudio::path &t_loc)
 Sets the default location to open UI dialogs to when opening an IDF. More...
 
void setMaxLocalJobs (int t_numjobs)
 Set the maximum number of simultaneous jobs to run locally. More...
 
void setOutputLocation (const openstudio::path &t_loc)
 Sets the configured output location. More...
 
void setSimpleName (bool t_simplename)
 Set the SimpleName state. More...
 
void setToolLocation (const ToolVersion &t_epv, const ToolLocationInfo &t_info)
 Add a tool to the list of known versions. More...
 

Static Public Member Functions

static
openstudio::runmanager::Tools 
makeTools (const ToolType &t_type, const std::pair< ToolVersion, ToolLocationInfo > &t_tool)
 Convert a pair returned from getToolLocation to a ToolInfo object. More...
 
static
openstudio::runmanager::Tools 
makeTools (const openstudio::path &t_energyplus, const openstudio::path &t_xmlpreproc, const openstudio::path &t_radiance, const openstudio::path &t_ruby, const openstudio::path &t_dakota)
 Convert some paths into standard understood ToolInfo objects. More...
 
static
openstudio::runmanager::Tools 
makeTools (const ToolType &t_type, const openstudio::path &t_local, const ToolVersion &t_version)
 Construct a ToolInfo object from the set of information used as a convenience function. More...
 
static
openstudio::runmanager::ToolInfo 
toBasementToolInfo (const std::pair< ToolVersion, ToolLocationInfo > &eplus)
 Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a Basement job. More...
 
static
openstudio::runmanager::ToolInfo 
toDakotaToolInfo (const std::pair< ToolVersion, ToolLocationInfo > &dakota)
 Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a DakotaJob. More...
 
static
openstudio::runmanager::ToolInfo 
toEPlusToolInfo (const std::pair< ToolVersion, ToolLocationInfo > &eplus)
 Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating an EnergyPlusJob. More...
 
static
openstudio::runmanager::ToolInfo 
toEpw2Wea (const std::pair< ToolVersion, ToolLocationInfo > &eplus)
 Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a epw job. More...
 
static
openstudio::runmanager::ToolInfo 
toExpandObjectsToolInfo (const std::pair< ToolVersion, ToolLocationInfo > &eplus)
 Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating an ExpandObjects job. More...
 
static
openstudio::runmanager::ToolInfo 
toIES2RadToolInfo (const std::pair< ToolVersion, ToolLocationInfo > &rad)
 Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating an ies2rad job. More...
 
static
openstudio::runmanager::ToolInfo 
toRadToolInfo (const std::pair< ToolVersion, ToolLocationInfo > &rad)
 Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a rad job. More...
 
static
openstudio::runmanager::ToolInfo 
toRaImageToolInfo (const std::pair< ToolVersion, ToolLocationInfo > &rad)
 Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating an ra_image job. More...
 
static
openstudio::runmanager::ToolInfo 
toRTraceToolInfo (const std::pair< ToolVersion, ToolLocationInfo > &rtrace)
 Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a rtrace job. More...
 
static
openstudio::runmanager::ToolInfo 
toRubyToolInfo (const std::pair< ToolVersion, ToolLocationInfo > &ruby)
 Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a ruby RubyJob. More...
 
static
openstudio::runmanager::ToolInfo 
toSlabToolInfo (const std::pair< ToolVersion, ToolLocationInfo > &eplus)
 Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a Slab job. More...
 
static
openstudio::runmanager::ToolInfo 
toXMLPreprocessorToolInfo (const std::pair< ToolVersion, ToolLocationInfo > &preproc)
 Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating an xmlpreprocessor job. More...
 

Detailed Description

Stores configuration options for the runmanager project.

See also
openstudio::runmanager::Configuration

Constructor & Destructor Documentation

openstudio::runmanager::ConfigOptions::ConfigOptions ( bool  t_loadQSettings = false)
explicit

Constructor to set intelligent defaults for the current system Defaults to max parallel local jobs as number of hardware threads - 1.

Member Function Documentation

void openstudio::runmanager::ConfigOptions::fastFindEnergyPlus ( )

Automatically find EnergyPlus if it is in a well defined, known place, then add to ConfigOptions.

void openstudio::runmanager::ConfigOptions::fastFindRadiance ( )

Automatically find Radiance if it is in a well defined, known place, then add to ConfigOptions.

void openstudio::runmanager::ConfigOptions::fastFindRuby ( )

Automatically find Ruby if it is in a well defined, known place, then add to ConfigOptions.

bool openstudio::runmanager::ConfigOptions::findTools ( bool  t_showProgressDialog,
bool  t_onlyIfZeroTools = false,
bool  t_promptUser = false,
bool  t_checkQSettings = false 
)

Automatically find tools and add them to the ConfigOptions.

openstudio::path openstudio::runmanager::ConfigOptions::getDefaultEPWLocation ( ) const
Returns
default location to open UI dialogs to when opening an EPW
openstudio::path openstudio::runmanager::ConfigOptions::getDefaultIDFLocation ( ) const
Returns
default location to open UI dialogs to when opening an IDF
int openstudio::runmanager::ConfigOptions::getMaxLocalJobs ( ) const
Returns
the maximum number of simultaneous jobs to run locally
openstudio::path openstudio::runmanager::ConfigOptions::getOutputLocation ( ) const
Returns
configured output location to use for jobs
bool openstudio::runmanager::ConfigOptions::getSimpleName ( ) const
Returns
True if jobs created by the RunManager UI should have simple folder names these folder names are more likely to conflict with other jobs
std::vector<std::pair<ToolVersion, ToolLocationInfo> > openstudio::runmanager::ConfigOptions::getToolLocations ( ) const

get all known version / path pairs

openstudio::runmanager::Tools openstudio::runmanager::ConfigOptions::getTools ( ) const

get all known tools for passing to jobs

static openstudio::runmanager::Tools openstudio::runmanager::ConfigOptions::makeTools ( const ToolType t_type,
const std::pair< ToolVersion, ToolLocationInfo > &  t_tool 
)
static

Convert a pair returned from getToolLocation to a ToolInfo object.

Parameters
[in]t_typeType of tool to create
[in]t_toolresults from getToolLocations create ToolInfo from
static openstudio::runmanager::Tools openstudio::runmanager::ConfigOptions::makeTools ( const openstudio::path &  t_energyplus,
const openstudio::path &  t_xmlpreproc,
const openstudio::path &  t_radiance,
const openstudio::path &  t_ruby,
const openstudio::path &  t_dakota 
)
static

Convert some paths into standard understood ToolInfo objects.

The created ToolInfos have version numbers determined by ToolFinder::parseToolVersion.

Parameters
[in]t_energyplusPath to energy plus binaries
[in]t_xmlpreprocPath to xmlpreproc binary
[in]t_radiancePath to radiance binaries
[in]t_rubyPath to ruby binary
[in]t_dakotaPath to dakota binary
static openstudio::runmanager::Tools openstudio::runmanager::ConfigOptions::makeTools ( const ToolType t_type,
const openstudio::path &  t_local,
const ToolVersion t_version 
)
static

Construct a ToolInfo object from the set of information used as a convenience function.

Parameters
[in]t_typeType of tool to create
[in]t_localPath to local binaries for tool
[in]t_versionVersion info to attach to created Tools
void openstudio::runmanager::ConfigOptions::reset ( )

Remove all known versions of E+. All other configuration data stays the same.

void openstudio::runmanager::ConfigOptions::saveQSettings ( ) const

Saves the tools to the appropriate QSettings location.

void openstudio::runmanager::ConfigOptions::setDefaultEPWLocation ( const openstudio::path &  t_loc)

Sets the default location to open UI dialogs to when opening an EPW.

Parameters
[in]t_locThe new location
void openstudio::runmanager::ConfigOptions::setDefaultIDFLocation ( const openstudio::path &  t_loc)

Sets the default location to open UI dialogs to when opening an IDF.

Parameters
[in]t_locThe new location
void openstudio::runmanager::ConfigOptions::setMaxLocalJobs ( int  t_numjobs)

Set the maximum number of simultaneous jobs to run locally.

Parameters
[in]t_numjobsthe new max
void openstudio::runmanager::ConfigOptions::setOutputLocation ( const openstudio::path &  t_loc)

Sets the configured output location.

Parameters
[in]t_locThe new location
void openstudio::runmanager::ConfigOptions::setSimpleName ( bool  t_simplename)

Set the SimpleName state.

Parameters
[in]t_simplenameWhether or not the folder names used by the RunManager UI should be more simple
See also
setSimpleName
void openstudio::runmanager::ConfigOptions::setToolLocation ( const ToolVersion t_epv,
const ToolLocationInfo t_info 
)

Add a tool to the list of known versions.

static openstudio::runmanager::ToolInfo openstudio::runmanager::ConfigOptions::toBasementToolInfo ( const std::pair< ToolVersion, ToolLocationInfo > &  eplus)
static

Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a Basement job.

Parameters
[in]eplusresults from getToolLocations create ToolInfo from
static openstudio::runmanager::ToolInfo openstudio::runmanager::ConfigOptions::toDakotaToolInfo ( const std::pair< ToolVersion, ToolLocationInfo > &  dakota)
static

Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a DakotaJob.

Parameters
[in]dakotaresult from getToolLocations create ToolInfo from
static openstudio::runmanager::ToolInfo openstudio::runmanager::ConfigOptions::toEPlusToolInfo ( const std::pair< ToolVersion, ToolLocationInfo > &  eplus)
static

Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating an EnergyPlusJob.

Parameters
[in]eplusresults from getToolLocations create ToolInfo from
static openstudio::runmanager::ToolInfo openstudio::runmanager::ConfigOptions::toEpw2Wea ( const std::pair< ToolVersion, ToolLocationInfo > &  eplus)
static

Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a epw job.

Parameters
[in]eplusresults from getToolLocations create ToolInfo from
static openstudio::runmanager::ToolInfo openstudio::runmanager::ConfigOptions::toExpandObjectsToolInfo ( const std::pair< ToolVersion, ToolLocationInfo > &  eplus)
static

Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating an ExpandObjects job.

Parameters
[in]eplusresults from getToolLocations create ToolInfo from
static openstudio::runmanager::ToolInfo openstudio::runmanager::ConfigOptions::toIES2RadToolInfo ( const std::pair< ToolVersion, ToolLocationInfo > &  rad)
static

Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating an ies2rad job.

Parameters
[in]radresults from getToolLocations create ToolInfo from
static openstudio::runmanager::ToolInfo openstudio::runmanager::ConfigOptions::toRadToolInfo ( const std::pair< ToolVersion, ToolLocationInfo > &  rad)
static

Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a rad job.

Parameters
[in]radresults from getToolLocations create ToolInfo from
static openstudio::runmanager::ToolInfo openstudio::runmanager::ConfigOptions::toRaImageToolInfo ( const std::pair< ToolVersion, ToolLocationInfo > &  rad)
static

Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating an ra_image job.

Parameters
[in]radresults from getToolLocations create ToolInfo from
static openstudio::runmanager::ToolInfo openstudio::runmanager::ConfigOptions::toRTraceToolInfo ( const std::pair< ToolVersion, ToolLocationInfo > &  rtrace)
static

Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a rtrace job.

Parameters
[in]rtraceresults from getToolLocations create ToolInfo from
static openstudio::runmanager::ToolInfo openstudio::runmanager::ConfigOptions::toRubyToolInfo ( const std::pair< ToolVersion, ToolLocationInfo > &  ruby)
static

Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a ruby RubyJob.

Parameters
[in]rubyresults from getToolLocations create ToolInfo from
static openstudio::runmanager::ToolInfo openstudio::runmanager::ConfigOptions::toSlabToolInfo ( const std::pair< ToolVersion, ToolLocationInfo > &  eplus)
static

Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating a Slab job.

Parameters
[in]eplusresults from getToolLocations create ToolInfo from
static openstudio::runmanager::ToolInfo openstudio::runmanager::ConfigOptions::toXMLPreprocessorToolInfo ( const std::pair< ToolVersion, ToolLocationInfo > &  preproc)
static

Convert a pair returned from getToolLocation to a ToolInfo object appropriate for creating an xmlpreprocessor job.

Parameters
[in]preprocresults from getToolLocations create ToolInfo from