Class: URBANopt::Scenario::SimulationDirBase
- Inherits:
-
Object
- Object
- URBANopt::Scenario::SimulationDirBase
- Defined in:
- lib/urbanopt/scenario/simulation_dir_base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#feature_names ⇒ Object
readonly
:nodoc:.
-
#features ⇒ Object
readonly
:nodoc:.
-
#scenario ⇒ Object
readonly
:nodoc:.
Instance Method Summary collapse
-
#clear ⇒ Object
Clear the directory that this simulation runs in.
-
#create_input_files ⇒ Object
Create run directory and generate simulation inputs, all previous contents of directory are removed.
-
#initialize(scenario, features, feature_names) ⇒ SimulationDirBase
constructor
SimulationDirBase is the agnostic representation of a directory of simulation input files.
-
#out_of_date? ⇒ Boolean
Return true if the simulation is out of date (input files newer than results), false otherwise.
-
#run_dir ⇒ Object
Return the directory that this simulation will run in.
-
#simulation_status ⇒ Object
Returns simulation status one of Started’, ‘Started’, ‘Complete’, ‘Failed’.
Constructor Details
#initialize(scenario, features, feature_names) ⇒ SimulationDirBase
SimulationDirBase is the agnostic representation of a directory of simulation input files.
- parameters:
-
scenario- ScenarioBase - Scenario containing this SimulationDirBase.features- Array - Array of Features that this SimulationDirBase represents.feature_names- Array - Array of scenario specific names for these Features.
41 42 43 44 45 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 41 def initialize(scenario, features, feature_names) @scenario = scenario @features = features @feature_names = feature_names end |
Instance Attribute Details
#feature_names ⇒ Object (readonly)
:nodoc:
51 52 53 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 51 def feature_names @feature_names end |
#features ⇒ Object (readonly)
:nodoc:
49 50 51 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 49 def features @features end |
#scenario ⇒ Object (readonly)
:nodoc:
47 48 49 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 47 def scenario @scenario end |
Instance Method Details
#clear ⇒ Object
Clear the directory that this simulation runs in
78 79 80 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 78 def clear raise 'clear is not implemented for SimulationFileBase, override in your class' end |
#create_input_files ⇒ Object
Create run directory and generate simulation inputs, all previous contents of directory are removed
85 86 87 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 85 def create_input_files raise 'create_input_files is not implemented for SimulationFileBase, override in your class' end |
#out_of_date? ⇒ Boolean
Return true if the simulation is out of date (input files newer than results), false otherwise. Non-existant simulation input files are out of date.
64 65 66 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 64 def out_of_date? raise 'out_of_date? is not implemented for SimulationFileBase, override in your class' end |
#run_dir ⇒ Object
Return the directory that this simulation will run in
56 57 58 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 56 def run_dir raise 'run_dir is not implemented for SimulationFileBase, override in your class' end |
#simulation_status ⇒ Object
Returns simulation status one of Started’, ‘Started’, ‘Complete’, ‘Failed’
71 72 73 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 71 def simulation_status raise 'simulation_status is not implemented for SimulationFileBase, override in your class' end |