double brokerExcess = excess * brokerDemand[peak.index]/ netDemand[peak.index]; accounting.addCapacityTransaction(broker, lastAssessmentTimeslot + peak.index, threshold, brokerExcess, cost); accounting.addCapacityTransaction(broker, timeslot, threshold, 0.0, 0.0);