org.powertac.visualizer.domain.broker
Class BrokerModel
java.lang.Object
org.powertac.visualizer.domain.broker.BrokerModel
- All Implemented Interfaces:
- DisplayableBroker, TimeslotModelUpdate, VisualBroker
public class BrokerModel
- extends Object
- implements VisualBroker, DisplayableBroker, TimeslotModelUpdate
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BrokerModel
public BrokerModel(String name,
Appearance appearance)
updateCashBalance
public void updateCashBalance(double balance)
- Specified by:
updateCashBalance in interface VisualBroker
updateEnergyBalance
public void updateEnergyBalance(double balance)
- Method for updating energy balance in case broker didn't receive
balancing transaction
- Parameters:
balance -
addBalancingTransaction
public void addBalancingTransaction(org.powertac.common.BalancingTransaction balancingTransaction)
- Specified by:
addBalancingTransaction in interface VisualBroker
addTariffSpecification
public void addTariffSpecification(org.powertac.common.TariffSpecification tariffSpecification)
- Specified by:
addTariffSpecification in interface VisualBroker
addTariffTransaction
public void addTariffTransaction(org.powertac.common.TariffTransaction tariffTransaction)
- Specified by:
addTariffTransaction in interface VisualBroker
setCustomerModels
public void setCustomerModels(Set<CustomerModel> customerModels)
- Specified by:
setCustomerModels in interface VisualBroker
getName
public String getName()
- Specified by:
getName in interface DisplayableBroker- Specified by:
getName in interface VisualBroker
setName
public void setName(String name)
getAppearance
public Appearance getAppearance()
- Specified by:
getAppearance in interface DisplayableBroker- Specified by:
getAppearance in interface VisualBroker
setAppereance
public void setAppereance(Appearance appearance)
buildCustomersBubble
public void buildCustomersBubble()
- Builds customers bubble JSON Array. Visibility is set to public to
enhance testability.
getCashBalance
public double getCashBalance()
- Specified by:
getCashBalance in interface VisualBroker
setCashBalance
public void setCashBalance(double cashBalance)
getEnergyBalance
public double getEnergyBalance()
- Specified by:
getEnergyBalance in interface VisualBroker
setEnergyBalance
public void setEnergyBalance(double energyBalance)
getDisplayableDayState
public DayState getDisplayableDayState()
- Specified by:
getDisplayableDayState in interface DisplayableBroker
getOfferedTarrifsCount
public long getOfferedTarrifsCount()
- Specified by:
getOfferedTarrifsCount in interface VisualBroker
getTariffSpecifications
public List<org.powertac.common.TariffSpecification> getTariffSpecifications()
- Specified by:
getTariffSpecifications in interface VisualBroker
getTariffTransactions
public List<org.powertac.common.TariffTransaction> getTariffTransactions()
getBalancingTransactions
public List<org.powertac.common.BalancingTransaction> getBalancingTransactions()
getCustomerModels
public Set<CustomerModel> getCustomerModels()
getDayStates
public HashMap<Integer,DayState> getDayStates()
getId
public String getId()
- Specified by:
getId in interface DisplayableBroker
getCustomerCount
public int getCustomerCount()
getCurrentDayState
public DayState getCurrentDayState()
update
public void update(int timeslotIndex)
- Specified by:
update in interface TimeslotModelUpdate
- Parameters:
timeslotIndex - update will be run for this timeslot index.
getJson
public BrokerJSON getJson()
Copyright © 2012 Power TAC. All Rights Reserved.