- Posts: 2
- Thank you received: 0
At least one error occurred in calculation!
1 year 7 months ago #536
by loisl
At least one error occurred in calculation! was created by loisl
Hi,
I am working on a plant-level MFA for which I have a system of 20 processes and about 60 flows. I ran a Monte-Carlo analysis and then wanted to perform a data reconciliation in STAN. To do so, I defined my system and input all mean and standard deviation values from the MC simulation. For the flows that are calculated based on mass balance, I put zero as a value and a standard deviation about 10000 higher that the highest standard deviation of the system.
Still, the model is validated, but not working when calculating. I get a cancelled calculation error after 100 iterations, with this box message 'At least one error occurred in calculation!'. Would any of this community know where that mistake could come from? I couldn't find anything on the online manual.
Thank you very much!
Best
I am working on a plant-level MFA for which I have a system of 20 processes and about 60 flows. I ran a Monte-Carlo analysis and then wanted to perform a data reconciliation in STAN. To do so, I defined my system and input all mean and standard deviation values from the MC simulation. For the flows that are calculated based on mass balance, I put zero as a value and a standard deviation about 10000 higher that the highest standard deviation of the system.
Still, the model is validated, but not working when calculating. I get a cancelled calculation error after 100 iterations, with this box message 'At least one error occurred in calculation!'. Would any of this community know where that mistake could come from? I couldn't find anything on the online manual.
Thank you very much!
Best
Please Log in or Create an account to join the conversation.
1 year 7 months ago #537
by adminST
Replied by adminST on topic At least one error occurred in calculation!
(1) Why are you setting the flows to be calculated to zero? That's not necessary, simply leave them empty. STAN will compute the missing values.
(2) If you initially ran an ordinary MCS, than your system is not overdetermined. Thus, no data reconciliation can be performed.
KR
(2) If you initially ran an ordinary MCS, than your system is not overdetermined. Thus, no data reconciliation can be performed.
KR
Please Log in or Create an account to join the conversation.
1 year 7 months ago #538
by loisl
Replied by loisl on topic At least one error occurred in calculation!
Thank you for answering. I am not sure I understand your second point though, I don't really see how my system is overdetermined or not. However, when I deleted the zeros and leave it empty, the reconciliation works! Also here not sure why, because since I put a huge standard deviation, the zero values should evolve freely to respect the mass balance principle...
Thank you again for your reactivity.
LL
Thank you again for your reactivity.
LL
Please Log in or Create an account to join the conversation.
1 year 7 months ago #539
by adminST
Replied by adminST on topic At least one error occurred in calculation!
When you run a MCS, it is required to have one equation for each variable that you want to compute. This is a so called exactly determined system of equations In order to be able to perform data reconciliation you would need more equations than variables, which is called an overdetermined system of equations. This could be reached by e.g. measuring/estimating some of the originally unknown variables.
Because you simply transferred the input data of your MCS to STAN, the system is still exactly determined. Thus, after computation, the originally given data should not have changed with respect to their mean value and standard uncertainty. The only thing that happens is that the unknown variables will be computed by mass balances and their uncertainty by error propagation. If you set the unknown values to zero with a large uncertainty, then actually data reconciliation is performed (btw. you are right, this should work). However, you will not notice it because of the large uncertainty these values are the only ones that will be reconciled leading to the same results as before.
Hope this makes things clearer.
Because you simply transferred the input data of your MCS to STAN, the system is still exactly determined. Thus, after computation, the originally given data should not have changed with respect to their mean value and standard uncertainty. The only thing that happens is that the unknown variables will be computed by mass balances and their uncertainty by error propagation. If you set the unknown values to zero with a large uncertainty, then actually data reconciliation is performed (btw. you are right, this should work). However, you will not notice it because of the large uncertainty these values are the only ones that will be reconciled leading to the same results as before.
Hope this makes things clearer.
Please Log in or Create an account to join the conversation.
Time to create page: 0.192 seconds