@@ -0,0 +1,673 @@
+package org.openlca.core.math;%0A%0Aimport org.openlca.core.database.IDatabase;%0Aimport org.openlca.core.matrix.MatrixData;%0Aimport org.openlca.core.matrix.ParameterTable;%0Aimport org.openlca.core.matrix.ProcessProduct;%0Aimport org.openlca.core.matrix.solvers.IMatrixSolver;%0A%0Aclass SimulationGraph %7B%0A%0A%09private static class Node %7B%0A%09%09ProcessProduct product;%0A%09%09MatrixData data;%0A%09%09ParameterTable parameters;%0A%09%7D%0A%0A%09private final IDatabase db;%0A%09private final CalculationSetup setup;%0A%09private final IMatrixSolver solver;%0A%0A%09private SimulationGraph(%0A%09%09%09IDatabase db,%0A%09%09%09CalculationSetup setup,%0A%09%09%09IMatrixSolver solver) %7B%0A%09%09this.db = db;%0A%09%09this.setup = setup;%0A%09%09this.solver = solver;%0A%09%7D%0A%0A%0A%0A%7D%0A

## Monte Carlo Simulation with Sub-Systems When running the Monte Carlo simulation on a product system $s_r$ that has a sub-system (which again can have sub-systems etc.) we need to first run the number generation and calculation for that sub-system and integrate these results into the matrices of $s_r$ in each iteration step of the simulation. In general, we have to do this for each relation $s_i \prec s_j$, where $s_i$ is a sub-system of $s_j$, of all product systems $S$ of the recursively expanded sub-system dependencies.