idaholab / raven

RAVEN is a flexible and multi-purpose probabilistic risk analysis, validation and uncertainty quantification, parameter optimization, model reduction and data knowledge-discovering framework.
https://raven.inl.gov/
Apache License 2.0
219 stars 133 forks source link

distInit input error on Monte Carlo sampler needs improved error message #235

Closed tedb314 closed 2 years ago

tedb314 commented 7 years ago

In my monte carlo sampler, I had a distInit tag block, though it was not needed since I was not creating dependencies between parameters.

It is not clear in the manual that this block is only needed for n-dimensional arrays, so I left it in, expecting normal sampling from my uniform distribution

What did you see instead?

( 0.10 sec) SIMULATION : Message -> -- Beginning step MCrun of type: MultiRun -- ( 0.10 sec) STEP MULTIRUN : Message -> Beginning initialization ( 0.10 sec) STEP MULTIRUN : DEBUG -> jobHandler initialized ( 0.10 sec) EnsembleModel : Message -> Model Execution list: construct_dispatch -> ARMA_price -> CashFlowPreP -> Cash_Flow ( 0.10 sec) EnsembleModel : Message -> EnsembleModel connections determined a linear system. Picard's iterations not activated! ( 0.10 sec) EnsembleModel : Message -> Specs of Graph Network represented by EnsembleModel: ( 0.10 sec) EnsembleModel : Message -> Graph Degree Sequence is : (1, 1, 1, 0) ( 0.10 sec) EnsembleModel : Message -> Graph Minimum/Maximum degree: (0, 1) ( 0.10 sec) EnsembleModel : Message -> Graph density/diameter : (0.5, 3) ( 0.10 sec) STEP MULTIRUN : DEBUG -> for the role Model the item of class EnsembleModel and name MyEnsemble has been initialized ( 0.10 sec) STEP MULTIRUN : DEBUG -> for the role Output the item of class PointSet and name MCoutput has been initialized ( 0.10 sec) MonteCarlo : Message -> No restart for MonteCarlo Traceback (most recent call last): File "/home/bakete/projects/hybrid/raven/framework/Driver.py", line 278, in raven() File "/home/bakete/projects/hybrid/raven/framework/Driver.py", line 231, in raven simulation.run() File "/home/bakete/projects/hybrid/raven/framework/Simulation.py", line 1051, in run stepInstance.takeAstep(stepInputDict) File "/home/bakete/projects/hybrid/raven/framework/Steps.py", line 235, in takeAstep self._initializeStep(inDictionary) File "/home/bakete/projects/hybrid/raven/framework/Steps.py", line 191, in _initializeStep self._localInitializeStep(inDictionary) File "/home/bakete/projects/hybrid/raven/framework/Steps.py", line 465, in _localInitializeStep self._initializeSampler(inDictionary) File "/home/bakete/projects/hybrid/raven/framework/Steps.py", line 448, in _initializeSampler inDictionary[self.samplerType].initialize(**self._samplerInitDict) File "/home/bakete/projects/hybrid/raven/framework/Samplers/Sampler.py", line 508, in initialize self.distDict[temp].updateRNGParam(params) AttributeError: 'Uniform' object has no attribute 'updateRNGParam'

Do you have a suggested fix for the development team?

Possibly update the manual and/or the error message to suggest that if you are not using n-dimensional arrays, that this block should not be included.

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

`

. read_ARMA_prices,MCrun,printMCfile 24 True 1 ARMA_prices.pk batE1,batE2,batE3,batE4,batE5,batE6,batE7,batE8, batE9,batE10,batE11,batE12,batE13,batE14,batE15,batE16, batE17,batE18,batE19,batE20,batE21,batE22,batE23,batE24 batteryEnergy, batteryPower batteryPower, price batteryRevenue, batteryPowerSold, battery_AVG_fuel, battery_AVG_CO2 batteryCapacity, batteryPowerSold, batteryRevenue, battery_AVG_fuel, battery_AVG_CO2 IRR, NPV, PI, HYB_fuel_tot, HYB_CO2_tot price,seconds scaling_price seconds 6 6 1 1 none 31536000,604800,86400, 1080 12, 2, 6, 3 GRO_construct_dispatch_in, GRO_construct_dispatch_out GRO_CashFlowPreP_in, GRO_CashFlowPreP_out GRO_CashFlow_in, GRO_CashFlow_out ARMA_price SET_ARMA_prices_in SET_ARMA_prices_out construct_dispatch SET_construct_dispatch_in SET_construct_dispatch_out CashFlowPreP SET_CashFlowPreP_in SET_CashFlowPreP_out Cash_Flow SET_CashFlow_in SET_CashFlow_out 150000000 0 20 200286 false 10 0.2 energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib energy_distrib GRO_construct_dispatch_in OutputPlaceHolder GRO_construct_dispatch_in NPV scaling_price OutputPlaceHolder scaling_price price,seconds GRO_construct_dispatch_in OutputPlaceHolder GRO_construct_dispatch_in GRO_construct_dispatch_out GRO_CashFlowPreP_in OutputPlaceHolder GRO_CashFlowPreP_in GRO_CashFlowPreP_out GRO_CashFlow_in OutputPlaceHolder GRO_CashFlow_in GRO_CashFlow_out GRO_CashFlow_in GRO_CashFlow_out batteryCapacity, GRO_construct_dispatch_in IRR, NPV, PI, batteryRevenue batteryCapacity,GRO_construct_dispatch_in NPV trajID NPV caisoPrice ARMA_price SET_ARMA_prices_in SET_construct_dispatch_in SET_CashFlowPreP_in SET_CashFlow_in MyEnsemble opt_smp optData optOutput SET_ARMA_prices_in SET_construct_dispatch_in SET_CashFlowPreP_in SET_CashFlow_in MyEnsemble energyMC MCoutput MCoutput dumpCSVMC optOutput optData dumpCSV dumpCSVall csv SET_IRR_out csv optData csv optOutput csv MCoutput scatter optOutput|Input|IP_capacity optOutput|Output|IRR IP_capacity (W) IRR (p.u.) png <text>Optimization Points</text> scatter optData|Output|IP_capacity optData|Output|IRR IP_capacity (W) IRR (p.u.) 8000000000 0 1 png <text>Optimization Trajectory</text> 5000 max 30 optOutput 150 1.E-3 1E-4 1e-5 24 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 150000000.0 0 150000000.0,100000000.0,050000000.0,001000000.0 1.0 150000000.0 NPV


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.

PaulTalbot-INL commented 2 years ago

Clarifying this error does not constitute an operational change and doesn't requite a specific email. Approved to close via #1864.