public CapacityTransaction makeCapacityTransaction (Broker broker, int peakTimeslot, double threshold, double kWh, double fee) { return new CapacityTransaction(broker, getTimeslotIndex(), peakTimeslot, threshold, kWh, fee); } }
double computeSignupCost (Tariff tariff) { if (tariff.getSignupPayment() < 0.0) { // penalize negative signup fees return tariff.getSignupPayment() * preferredDuration * TimeService.DAY / signupFeePeriod; } else { return tariff.getSignupPayment() * getScaleFactor(); } }
public BalancingTransaction makeBalancingTransaction (Broker broker, double kWh, double charge) { return new BalancingTransaction(broker, getTimeslotIndex(), kWh, charge); }
@Override public double getTariffChoiceSample () { return evalSeed.nextDouble(); }
/** * You need a CustomerInfo and a Tariff to create one of these. */ public TariffSubscription (CustomerInfo customer, Tariff tariff) { super(); this.customer = customer; this.tariff = tariff; this.tariffId = tariff.getId(); expirations = new ArrayList<ExpirationRecord>(); setRegulationCap(new RegulationAccumulator(0.0, 0.0)); }
@Override public String toString () { return ("CI(" + broker.getUsername() + "): p1=" + balanceChargeP1 + ", p2=" + balanceChargeP2); } }
Weather (WeatherForecastPrediction prediction) { temperature = prediction.getTemperature(); windSpeed = prediction.getWindSpeed(); windDirection = prediction.getWindDirection(); cloudCover = prediction.getCloudCover(); }
/** * Ensures that regulationAccumulator is non-null - * needed for non-regulatable customer models */ public void ensureRegulationCapacity () { if (null == regulationAccumulator) { setRegulationCap(new RegulationAccumulator(0.0, 0.0)); } }
public StepInfo (Timeslot slot, TariffSubscription sub) { super(); timeslot = slot; subscription = sub; regulationAccumulator = new RegulationAccumulator(0.0, 0.0); }
public DistributionTransaction makeDistributionTransaction (Broker broker, int nSmall, int nLarge, double transport, double distroCharge) { return new DistributionTransaction(broker, getTimeslotIndex(), nSmall, nLarge, transport, distroCharge); }
public MarketTransaction makeMarketTransaction (Broker broker, Timeslot timeslot, double mWh, double price) { return new MarketTransaction(broker, getTimeslotIndex(), timeslot, mWh, price); }
public CashPosition makeCashPosition (Broker broker, double balance) { return new CashPosition(broker, balance, getTimeslotIndex()); }
public BankTransaction makeBankTransaction (Broker broker, double amount) { return new BankTransaction(broker, amount, getTimeslotIndex()); }
/** * Creates a tariff transaction that is not a regulation transaction. */ public TariffTransaction makeTariffTransaction(Broker broker, TariffTransaction.Type txType, TariffSpecification spec, CustomerInfo customer, int customerCount, double kWh, double charge) { return new TariffTransaction (broker, getTimeslotIndex(), txType, spec, customer, customerCount, kWh, charge, false); }
/** * True just in case this subscription allows regulation. */ public boolean hasRegulationRate () { return this.tariff.hasRegulationRate(); }
/** * Adds the capacities in the given RegulationAccumulator instance to this * instance. */ public void add (RegulationAccumulator rc) { setUpRegulationCapacity(upRegulationCapacity + rc.upRegulationCapacity); setDownRegulationCapacity(downRegulationCapacity + rc.downRegulationCapacity); }
/** * Delegates profile cost factors to helper. */ public void initializeCostFactors (double wtExpected, double wtMax, double wtRealized, double soldThreshold) { helper.initializeCostFactors(wtExpected, wtMax, wtRealized, soldThreshold); }
/** * Constructor to re-create a random seed with a given value. */ public RandomSeed (String classname, long requesterId, String purpose, long value) { super(); init(classname, requesterId, purpose, value); }
@Override public double getInertiaSample () { return gen.nextDouble(); }
@Override public double getTariffChoiceSample () { return tariffSelector.nextDouble(); }