The loss factor is applied to bth capacity_factor and total_system_generation, however, the latter is generated only if 'capacity' is given as an attribute in the input. Even if it might be possible to allow the workflow execution only for inputs with 'capacity' information, the execution should then fail at the beginning already so one does not waste time for the full simulation only to get an error at one of the last steps. To fix that, an assert should be added at the beginning of the workflow.
However, I suggest to allow execution also without capacity information since only cpacity_factors are also meaningful, plus total_system_generation can easily be calulated later on when one has capacity factors and then adds a capacity. Therefore, I suggest to apply the loss factors only onto these vars that have actually been generated in the sim.
This issue was originally created by: @chrisjwin