Sha256: 1647ed64e5308eecab77a3ac79c32f9014c13ce5656f1ad2d4d20d79f29d93d6

Contents?: true

Size: 1.64 KB

Versions: 2

Compression:

Stored size: 1.64 KB

Contents

# *********************************************************************************
# URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
# See also https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/LICENSE.md
# *********************************************************************************

module URBANopt
  module Scenario
    class ScenarioRunnerBase
      ##
      # ScenarioRunnerBase is the agnostic interface for a class which can create and run SimulationFiles.
      ##
      def initialize; end

      ##
      # Create all SimulationDirs for Scenario.
      ##
      # [parameters:]
      # * +scenario+ - _ScenarioBase_ - Scenario to create simulation input files for scenario.
      # * +force_clear+ - _Bool_ - Clear Scenario before creating simulation input files
      ##
      # [return:] _Array_ Returns an array of all SimulationDirs, even those created previously, for Scenario.
      def create_simulation_files(scenario, force_clear = false)
        raise 'create_input_files is not implemented for ScenarioRunnerBase, override in your class'
      end

      ##
      # Create and run all SimulationFiles for Scenario.
      ##
      # [parameters:]
      # * +scenario+ - _ScenarioBase_ - Scenario to create and run simulation input files for.
      # * +force_clear+ - _Bool_ - Clear Scenario before creating Simulation input files.
      ##
      # [return:] _Array_ Returns an array of all SimulationDirs, even those created previously, for Scenario.
      def run(scenario, force_clear = false, options = {})
        raise 'run is not implemented for ScenarioRunnerBase, override in your class'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
urbanopt-scenario-0.11.0 lib/urbanopt/scenario/scenario_runner_base.rb
urbanopt-scenario-0.10.0 lib/urbanopt/scenario/scenario_runner_base.rb