fastga_he.models.environmental_impacts.lca_core_normalization module

class fastga_he.models.environmental_impacts.lca_core_normalization.LCACoreNormalisation(**kwargs)[source]

Bases: ExplicitComponent

We’ll use here a particularity of the OpenMDAO framework. We actually can’t have to define a setup function right away here because we don’t (and can’t) know the inputs, since they are outputs of the LCACore components and that thy will be defined whn running the code after parsing the LCA Configuration file (We could parse it here but it will take too long).

Instead, as suggested by the magnificent @felixpollet, we will use the configure function of the parent group which runs after the setup of all subsystem of that parent group.

Store some bound methods so we can detect runtime overrides.

compute(inputs, outputs, discrete_inputs=None, discrete_outputs=None)[source]

Compute outputs given inputs. The model is assumed to be in an unscaled state.

An inherited component may choose to either override this function or to define a compute_primal function.

Parameters:
  • inputs (Vector) – Unscaled, dimensional input variables read via inputs[key].

  • outputs (Vector) – Unscaled, dimensional output variables read via outputs[key].

  • discrete_inputs (dict-like or None) – If not None, dict-like object containing discrete input values.

  • discrete_outputs (dict-like or None) – If not None, dict-like object containing discrete output values.