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.
51 52 53 54 55 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 51 def initialize(scenario, features, feature_names) @scenario = scenario @features = features @feature_names = feature_names end |
Instance Attribute Details
#feature_names ⇒ Object (readonly)
:nodoc:
61 62 63 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 61 def feature_names @feature_names end |
#features ⇒ Object (readonly)
:nodoc:
59 60 61 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 59 def features @features end |
#scenario ⇒ Object (readonly)
:nodoc:
57 58 59 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 57 def scenario @scenario end |
Instance Method Details
#clear ⇒ Object
Clear the directory that this simulation runs in
88 89 90 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 88 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
95 96 97 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 95 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.
74 75 76 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 74 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
66 67 68 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 66 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’
81 82 83 |
# File 'lib/urbanopt/scenario/simulation_dir_base.rb', line 81 def simulation_status raise 'simulation_status is not implemented for SimulationFileBase, override in your class' end |