0 votes
38 views

I am receiving a relatively large number of errors when I run my Monte Carlo assessment, all or most of which have the following form (image below):

Examining the parameters mentioned in this log entry I see no issues (i.e. all the formulas are evaluating appropriately). A little more background, the Monte Carlo proceeds and I get a result. When I create a new product system for specific processes that call these parameters (within my larger product system), every simulation beyond the first one produces an identical result. 

A few questions:

  • Any general suggestions on errors of this form would be useful.
  • Can you recommend any specific resources for interpreting and resolving Errors catalogued in the console? For example, the error defines locations such as "line 1, column 40 at line 1". To what is this referring and can it be used to resolve errors?
  • Is there a script or other command that I can use to export a copy of all parameter values for for each simulation within a monte carlo run? I would like to see if certain parameters are not evaluating and maybe trace that back to a source.

My apologies if I am missing something simple. Thank you in advance for your help!

in openLCA by (130 points)

1 Answer

0 votes
by (68.5k points)

The screenshot is somewhat hard to read (you could also copy as text, e.g., that would be easier) but I think I see sth like "evaluation of expression NO2ground failed". These errors should be fixed. You can see all incorrect formulas (and other issues in the database) by running a database validation, and can then jump to the listed incorrect formulas directly.

Common mistakes are commas instead of dots for decimal separators, but also typos in parameter names, or missing parameters that are input somewhere. The parameters are a bit tricky since the formula field is just text, and parsed afterwards, which means that you can initially enter also incorrect formulas. You see this though in the process by switching from formula view to amount view, the amount view shows then 0:

(entering independent and dependent parameter)

(entering in the process amounts)

(formula is evaluated and an incorrect formula is flagged but you can proceed)

From the formula view to the values view

and vice versa. So with the incorrect formula:

I hope this helps!

Best wishes,

Andreas

by (130 points)
Thank you Andreas for the suggestions.

I performed a database validation and no issues were identified. I also went through all of my processes and switched between formula and value view and checked to see that everything was evaluating, and it appears to be. I also went through all global dependent parameters to see that they were evaluating to a number, and they are.

Following is the text from one of my error messages. All follow the same basic form. Apologies that the original image was of poor quality.

This particular text from the error message has me wondering if there is some deeper issue beyond just an incorrectly entered formula: "Second evaluation call on variable digestate_n. Cyclic dependencies?" It seems to speak to the issue that I am seeing where the first simulation produces a unique result, while all subsequent simulations produce identical values.

Thanks!

Error Message:
org.openlca.expressions.InterpreterException: Evaluation of expression Avoided_Urea/Compost failed: Evaluation of variable avoided_urea failed: Evaluation of variable nitrogen failed: Evaluation of variable digestate_n_share failed: Second evaluation call on variable digestate_n. Cyclic dependencies? at line 1, column 40 at line 1, column 45 at line 1, column 1 at line 1, column 1
     at org.openlca.expressions.Scope.eval(Scope.java:61)
     at org.openlca.core.matrix.CalcExchange.matrixValue(CalcExchange.java:83)
     at org.openlca.core.matrix.uncertainties.UExchangeCell.next(UExchangeCell.java:39)
     at org.openlca.core.matrix.uncertainties.UMatrix.generate(UMatrix.java:88)
     at org.openlca.core.matrix.MatrixData.simulate(MatrixData.java:73)
     at org.openlca.core.math.Simulator.generateData(Simulator.java:209)
     at org.openlca.core.math.Simulator.nextRun(Simulator.java:153)
     at org.openlca.app.results.simulation.SimulationProgress.doNextRun(SimulationProgress.java:57)
     at org.openlca.app.results.simulation.SimulationProgress.run(SimulationProgress.java:41)
     at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
    Caused by: org.openlca.expressions.ExpressionException: Evaluation of variable avoided_urea failed: Evaluation of variable nitrogen failed: Evaluation of variable digestate_n_share failed: Second evaluation call on variable digestate_n. Cyclic dependencies? at line 1, column 40 at line 1, column 45 at line 1, column 1 at line 1, column 1
     at org.openlca.expressions.VariableFunction.evaluate(VariableFunction.java:35)
     at org.openlca.expressions.OpDivision.evaluate(OpDivision.java:7)
     at org.openlca.expressions.Scope.tryEval(Scope.java:71)
     at org.openlca.expressions.Scope.eval(Scope.java:58)
...