accounting.getCurrentSupplyDemandByBroker(); double consumption = brokerTotals.get(TariffTransaction.Type.CONSUME); double production = brokerTotals.get(TariffTransaction.Type.PRODUCE); double imports = accounting.getCurrentMarketPosition(broker) * 1000.0; distroCharge += transport * distributionFee; accounting.addDistributionTransaction(broker, nSmall, nLarge, transport, distroCharge);
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);
/** * Returns the difference between a broker's current market position and its * net load. Note: market position is computed in MWh and net load is computed * in kWh, conversion is needed to compute the difference in kWh. * * @return a broker's current energy balance within its market. Pos for * over-production, neg for under-production */ @Override public double getMarketBalance (Broker broker) { double result = accountingService.getCurrentMarketPosition(broker) * 1000.0 + accountingService.getCurrentNetLoad(broker); log.info("market balance for " + broker.getUsername() + ": " + result); return result; }
" has " + activeSubscriptions.size() + " active subscriptions"); accountingService.addTariffTransaction(TariffTransaction.Type.REVOKE, tariff, null, 0, 0.0, revocationFee);
double balanceCharge = info.getBalanceChargeP1(); if (balanceCharge != 0.0) { accountingService.addBalancingTransaction(info.getBroker(), info.getNetLoadKWh(), balanceCharge);
accountingService.addMarketTransaction(trade.from, timeslot, -trade.mWh, clearingPrice); accountingService.addMarketTransaction(trade.to, timeslot, trade.mWh, -clearingPrice);
new BalancingControlEvent(tariff.getTariffSpec(), kwh, payment, timeslotRepo.currentTimeslot().getSerialNumber()); accountingService.postBalancingControl(bce); brokerProxy.sendMessage(tariff.getBroker(), bce);
getAccounting().addRegulationTransaction(tariff, customer, customersCommitted, kwh, customersCommitted *
getAccounting().addTariffTransaction(txType, tariff, customer, customersCommitted, -actualKwh, customersCommitted * -tariff.getUsageCharge(actualKwh / customersCommitted, totalUsage, true)); getAccounting().addTariffTransaction(TariffTransaction.Type.PERIODIC, tariff, customer, customersCommitted, 0.0, customersCommitted * -tariff.getPeriodicPayment() / 24.0);
getAccounting().addTariffTransaction(TariffTransaction.Type.SIGNUP, tariff, customer, customerCount, 0.0,
withdrawPayment = 0.0; getAccounting().addTariffTransaction(TariffTransaction.Type.WITHDRAW, tariff, customer, customerCount, 0.0, penaltyCount * withdrawPayment); if (tariff.getSignupPayment() < 0.0) { getAccounting().addTariffTransaction(TariffTransaction.Type.REFUND, tariff, customer, customerCount, 0.0,
accountingService.addTariffTransaction(TariffTransaction.Type.PUBLISH, tariff, null, 0, 0.0, publicationFee); send(new TariffStatus(spec.getBroker(),