I missed the hot water issue. From what I see now, it looks as if the hot water is a separate main upstream from your three-phase mains. So adding the hot water makes sense. But the formula is adding everything together, which is associative, so the parenthesis are not needed where you have them. PVoutput will not accept a negative consumption, so you need to enclose the entire addition in one set of parenthesis and add the max 0 function to inhibit negative consumption.