idaholab / HERON

Holistic Energy Resource Optimization Network (HERON) is a modeling toolset and plugin for RAVEN to accelerate stochastic technoeconomic assessment of the economic viability of various grid-energy system configurations, especially with application to electrical grids and integrated energy systems (IES).
Apache License 2.0
24 stars 38 forks source link

[DEFECT] Error when running opt mode, templates need an update #318

Closed GabrielSoto-INL closed 1 year ago

GabrielSoto-INL commented 1 year ago

Defect Description

Describe the defect Running optimization mode causes an error due to a recent RAVEN update (https://github.com/idaholab/raven/pull/2177)

What did you expect to see happen?

Running the optimization_settings integration test should have passed running HERON tests via Rook.

What did you see instead?
Traceback (most recent call last):
  File "C:\Users\sotogj\projects\raven\raven_framework.py", line 25, in <module>
    sys.exit(main(True))
  File "C:\Users\sotogj\projects\raven\ravenframework\Driver.py", line 151, in main
    simulation.XMLread(root,runInfoSkip=set(["DefaultInputFile"]),xmlFilename=inputFile)
  File "C:\Users\sotogj\projects\raven\ravenframework\Simulation.py", line 381, in XMLread
    self.instantiateEntities(xmlNode, runInfoSkip, xmlFilename)
  File "C:\Users\sotogj\projects\raven\ravenframework\Simulation.py", line 494, in instantiateEntities
    entity.readXML(block, varGroups, globalAttributes=globalAttributes)
  File "C:\Users\sotogj\projects\raven\ravenframework\BaseClasses\BaseEntity.py", line 99, in readXML
    self._readMoreXML(xmlNode)
  File "C:\Users\sotogj\projects\raven\ravenframework\Steps\Step.py", line 148, in _readMoreXML
    self._handleInput(paramInput)
  File "C:\Users\sotogj\projects\raven\ravenframework\Steps\Step.py", line 195, in _handleInput
    self._localInputAndCheckParam(paramInput)
  File "C:\Users\sotogj\projects\raven\ravenframework\Steps\MultiRun.py", line 59, in _localInputAndCheckParam
    SingleRun._localInputAndCheckParam(self,paramInput)
  File "C:\Users\sotogj\projects\raven\ravenframework\Steps\SingleRun.py", line 99, in _localInputAndCheckParam
    Models.validate(self.parList[modelIndex][2], role, toBeTested[role])
  File "C:\Users\sotogj\projects\raven\ravenframework\Models\Factory.py", line 50, in validate
    return factory.returnClass(className).localValidateMethod(role, what)
  File "C:\Users\sotogj\projects\raven\ravenframework\Models\Model.py", line 190, in localValidateMethod
    raise IOError('The number of times class = '+str(tester['class'])+' type= ' +str(tester['type'])+' is used as '+str(who)+' is improper. Number of allowable times is '+str(tester['multiplicity'])+'.Got '+str(tester['tempCounter']))
OSError: The number of times class = Optimizers type= ['GradientDescent', 'GeneticAlgorithm', 'SimulatedAnnealing', 'BayesianOptimizer'] is used as Optimizer is improper. Number of allowable times is 1.Got 0
Do you have a suggested fix for the development team?

Switch the Optimizer class type from 'FiniteDifference' to 'GradientDescent' in the outer XML template.

Describe how to Reproduce Steps to reproduce the behavior:

Screenshots and Input Files Please attach the input file(s) that generate this error. The simpler the input, the faster we can find the issue.

Platform (please complete the following information):


For Change Control Board: Issue Review

This review should occur before any development is performed as a response to this issue.


For Change Control Board: Issue Closure

This review should occur when the issue is imminently going to be closed.

dylanjm commented 1 year ago

This issue was addressed as part of #315