+1 vote
1.2k views

I have modified the example here to select multiple product systems (instead of processes) and export simple results to csv file. However, each product system is showing the same results (based on the first product system selected). These product systems rely on the same processes but different parameter values.

Is there something about this section of the code where something needs to be reset, perhaps in the calculator or the cache?

            # run the calculation
            print('Calculate system: %s' % d.name)
            calculator = SystemCalculator(
                Cache.getMatrixCache(), App.getSolver())
            setup = CalculationSetup(
                CalculationType.SIMPLE_CALCULATION, system)
            setup.impactMethod = method
            result = calculator.calculateSimple(setup)
in openLCA by (2.5k points)
by (190 points)
Hi, is it possible to have the full code to run directly calculation on product systems, as Byoung did? Possibly without using IPC or OLCA. My knowledge of python is limited.

1 Answer

0 votes
by (14.0k points)

When you have a product system with parameter redefinitions, you need to add these parameter redefinitions from the system to the calculation setup before you run the calculation:

setup.parameterRedefs.addAll(system.parameterRedefs)

Otherwise these parameter redefinitions are not applied in the calculation. You also need to do this when you run the calculation via the IPC interface: https://github.com/GreenDelta/olca-ipc.py#parameterized-calculation-setups

...