original_docstring: 
          Update consumption for given revision, a dictionary consisting
          of one or more year:modification dictionaries.
          For example: {2014: {'_MPC_xxx': [0.2, 0.1]}}
  
          Note that this method uses the specified revision to update the
          default MPC parameter values and the default BEN parameter values,
          so use this method just once rather than calling it sequentially
          in an attempt to update the parameters in several steps.
          
docstring: Update consumption for given revision, a dictionary consisting
  of one or more year:modification dictionaries.
  
  Note that this method uses the specified revision to update the
  default MPC parameter values and the default BEN parameter values,
  so use this method just once rather than calling it sequentially
  in an attempt to update the parameters in several steps.
docstring_tokens: Update consumption for given revision a dictionary consisting of one or more year : modification dictionaries . Note that this method uses the specified revision to update the default MPC parameter values and the default BEN parameter values so use this method just once rather than calling it sequentially in an attempt to update the parameters in several steps .
code: def update_consumption(self, revision):
          """
          Update consumption for given revision, a dictionary consisting
          of one or more year:modification dictionaries.
          For example: {2014: {'_MPC_xxx': [0.2, 0.1]}}
  
          Note that this method uses the specified revision to update the
          default MPC parameter values and the default BEN parameter values,
          so use this method just once rather than calling it sequentially
          in an attempt to update the parameters in several steps.
          """
          if not isinstance(revision, dict):
              raise ValueError('ERROR: revision is not a dictionary')
          if not revision:
              return  # no revision to update
          precall_current_year = self.current_year
          self.set_default_vals()
          # check that revisions keys are integers
          revision_years = sorted(list(revision.keys()))
          for year in revision_years:
              if not isinstance(year, int):
                  msg = 'ERROR: {} KEY {}'
                  details = 'KEY in revision is not an integer calendar year'
                  raise ValueError(msg.format(year, details))
          # check range of revision_years
          first_revision_year = min(revision_years)
          if first_revision_year < self.start_year:
              msg = 'ERROR: {} YEAR revision provision in YEAR < start_year={}'
              raise ValueError(msg.format(first_revision_year, self.start_year))
          last_revision_year = max(revision_years)
          if last_revision_year > self.end_year:
              msg = 'ERROR: {} YEAR revision provision in YEAR > end_year={}'
              raise ValueError(msg.format(last_revision_year, self.end_year))
          # validate revision parameter names and types
          self._validate_assump_parameter_names_types(revision)
          if self.parameter_errors:
              raise ValueError(self.parameter_errors)
          # implement the revision year by year
          revision_parameters = set()
          for year in revision_years:
              self.set_year(year)
              revision_parameters.update(revision[year].keys())
              self._update({year: revision[year]})
          self.set_year(precall_current_year)
          # validate revision parameter values
          self._validate_assump_parameter_values(revision_parameters)
          if self.parameter_errors:
              raise ValueError('\n' + self.parameter_errors)
code_tokens: def update_consumption ( self , revision ) : if not isinstance ( revision , dict ) : raise ValueError ( 'ERROR: revision is not a dictionary' ) if not revision : return precall_current_year = self . current_year self . set_default_vals ( ) revision_years = sorted ( list ( revision . keys ( ) ) ) for year in revision_years : if not isinstance ( year , int ) : msg = 'ERROR: {} KEY {}' details = 'KEY in revision is not an integer calendar year' raise ValueError ( msg . format ( year , details ) ) first_revision_year = min ( revision_years ) if first_revision_year < self . start_year : msg = 'ERROR: {} YEAR revision provision in YEAR < start_year={}' raise ValueError ( msg . format ( first_revision_year , self . start_year ) ) last_revision_year = max ( revision_years ) if last_revision_year > self . end_year : msg = 'ERROR: {} YEAR revision provision in YEAR > end_year={}' raise ValueError ( msg . format ( last_revision_year , self . end_year ) ) self . _validate_assump_parameter_names_types ( revision ) if self . parameter_errors : raise ValueError ( self . parameter_errors ) revision_parameters = set ( ) for year in revision_years : self . set_year ( year ) revision_parameters . update ( revision [ year ] . keys ( ) ) self . _update ( { year : revision [ year ] } ) self . set_year ( precall_current_year ) self . _validate_assump_parameter_values ( revision_parameters ) if self . parameter_errors : raise ValueError ( '\n' + self . parameter_errors )
short_docstring: Update consumption for given revision, a dictionary consisting
  of one or more year:modification dictionaries.
short_docstring_tokens: Update consumption for given revision a dictionary consisting of one or more year : modification dictionaries .
comment: """
          Update consumption for given revision, a dictionary consisting
          of one or more year:modification dictionaries.
          For example: {2014: {'_MPC_xxx': [0.2, 0.1]}}
  
          Note that this method uses the specified revision to update the
          default MPC parameter values and the default BEN parameter values,
          so use this method just once rather than calling it sequentially
          in an attempt to update the parameters in several steps.
          """$SEP$# no revision to update$SEP$# check that revisions keys are integers$SEP$# check range of revision_years$SEP$# validate revision parameter names and types$SEP$# implement the revision year by year$SEP$# validate revision parameter values