public class PeakShavingConcentrator extends Concentrator implements TransformingConcentrator
This class represents a PeakShavingConcentrator component where several instances can be created.
The PeakShavingConcentrator receives Bid from the agents and forwards this in an aggregate
Bid up in the hierarchy to a PeakShavingConcentrator or to the Auctioneer. It will receive
price updates from the Auctioneer and forward them to its connected agents. TODO: add PeakShavingConcentrator
comment.
| Modifier and Type | Class and Description |
|---|---|
static interface |
PeakShavingConcentrator.Config |
BaseAgentEndpoint.ConnectedAgentEndpoint.Status| Modifier and Type | Field and Description |
|---|---|
protected double |
allocatedFlow
The allocated flow as calculated from the aggregated bidcurve
|
protected double |
ceiling
Maximum power level applied in 'peak shaving'
|
protected double |
floor
Minimum power level applied in 'peak shaving'
|
protected double |
measuredFlow
Measured flow as reported via the peak shaving interface
|
configNOT_CONNECTED| Constructor and Description |
|---|
PeakShavingConcentrator() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(java.util.Map<java.lang.String,?> properties)
OSGi calls this method to activate a managed service.
|
void |
activate(PeakShavingConcentrator.Config config)
Convenient activate method that takes a
PeakShavingConcentrator.Config object. |
void |
deactivate()
OSGi calls this method to deactivate a managed service.
|
protected double |
getUncontrolledFlow() |
void |
setMeasuredFlow(javax.measure.Measurable<javax.measure.quantity.Power> measuredFlow)
Sets the current measured flow for a transformer.
|
protected Bid |
transformBid(Bid aggregatedBid)
This method should be overridden when the bid that will be sent has to be changed.
|
protected Price |
transformPrice(Price price,
SentBidInformation info)
This method should be overridden when the price that will be sent down has to be changed.
|
activate, addObserver, agentEndpointDisconnected, connectToAgent, connectToMatcher, handleBidUpdate, handlePriceUpdate, matcherEndpointDisconnected, removeObserver, setContextgetAgentId, getDesiredParentId, getLastBidUpdate, getStatus, init, publishBidnow, publishEventclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectToMatcher, getDesiredParentId, getStatus, handlePriceUpdate, matcherEndpointDisconnectedagentEndpointDisconnected, connectToAgent, handleBidUpdategetAgentId, setContextprotected double floor
protected double ceiling
protected volatile double measuredFlow
protected volatile double allocatedFlow
public void activate(java.util.Map<java.lang.String,?> properties)
activate in class Concentratorproperties - the configuration propertiespublic void activate(PeakShavingConcentrator.Config config)
PeakShavingConcentrator.Config object. This also makes subclassing easier.config - The PeakShavingConcentrator.Config object that configures this concentratorpublic void deactivate()
deactivate in class Concentratorprotected Bid transformBid(Bid aggregatedBid)
ConcentratortransformBid in class ConcentratoraggregatedBid - The (input) aggregated bid as calculated normally (the sum of all the bids of the agents).Concentrator.protected Price transformPrice(Price price, SentBidInformation info)
ConcentratortransformPrice in class Concentratorprice - The input price update as received from the connected matcher.info - The information about the bid that has been sendPrice as it has to be sent to the connected agents.protected double getUncontrolledFlow()
public void setMeasuredFlow(javax.measure.Measurable<javax.measure.quantity.Power> measuredFlow)
TransformingConcentratorsetMeasuredFlow in interface TransformingConcentratormeasuredFlow - The current power flow.