Package org.powertac.common.msg
Class VariableRateUpdate
- java.lang.Object
- 
- org.powertac.common.state.XStreamStateLoggable
- 
- org.powertac.common.TariffMessage
- 
- org.powertac.common.msg.TariffUpdate
- 
- org.powertac.common.msg.VariableRateUpdate
 
 
 
 
- 
- All Implemented Interfaces:
- ValidatableMessage
 
 @Domain(fields={"broker","tariffId","payload","rateId"}) public class VariableRateUpdate extends TariffUpdate Conveys an HourlyCharge instance, labeled by its Tariff and Rate. When received by the server, the HourlyCharge simply needs to be added to its Rate. State log fields for readResolve():
 new(long brokerId, long tariffId, long hourlyChargeId, long rateId)- Author:
- John Collins
 
- 
- 
Field Summary- 
Fields inherited from class org.powertac.common.TariffMessagebroker, id
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedVariableRateUpdate()VariableRateUpdate(Broker broker, Rate rate, HourlyCharge hourlyCharge)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description HourlyChargegetHourlyCharge()longgetHourlyChargeId()HourlyChargegetPayload()conventional getter to satisfy beanutilslonggetRateId()booleanisValid()By default, these are invalid.booleanisValid(Rate rate)Given a Rate, a VRU is valid if it has the correct ID, if the Rate is not fixed, and if the HourlyCharge specifies a value between the minValue and maxValue of the Rate.- 
Methods inherited from class org.powertac.common.msg.TariffUpdategetTariffId
 - 
Methods inherited from class org.powertac.common.TariffMessagegetBroker, getId
 - 
Methods inherited from class org.powertac.common.state.XStreamStateLoggablereadResolve
 
- 
 
- 
- 
- 
Constructor Detail- 
VariableRateUpdatepublic VariableRateUpdate(Broker broker, Rate rate, HourlyCharge hourlyCharge) 
 - 
VariableRateUpdateprotected VariableRateUpdate() 
 
- 
 - 
Method Detail- 
getHourlyChargepublic HourlyCharge getHourlyCharge() 
 - 
getPayloadpublic HourlyCharge getPayload() conventional getter to satisfy beanutils
 - 
getHourlyChargeIdpublic long getHourlyChargeId() 
 - 
getRateIdpublic long getRateId() 
 - 
isValidpublic boolean isValid() By default, these are invalid. You have to supply the Rate to test validity.- Specified by:
- isValidin interface- ValidatableMessage
- Overrides:
- isValidin class- TariffMessage
 
 - 
isValidpublic boolean isValid(Rate rate) Given a Rate, a VRU is valid if it has the correct ID, if the Rate is not fixed, and if the HourlyCharge specifies a value between the minValue and maxValue of the Rate.
 
- 
 
-