Class AverageDemandRelocationListener
- java.lang.Object
-
- org.matsim.contrib.carsharing.relocation.infrastructure.AverageDemandRelocationListener
-
- All Implemented Interfaces:
EventListener
,DispatchRelocationsEventHandler
,org.matsim.core.api.internal.MatsimExtensionPoint
,org.matsim.core.controler.listener.ControlerListener
,org.matsim.core.controler.listener.IterationStartsListener
,org.matsim.core.events.handler.EventHandler
public class AverageDemandRelocationListener extends Object implements org.matsim.core.controler.listener.IterationStartsListener, DispatchRelocationsEventHandler
-
-
Constructor Summary
Constructors Constructor Description AverageDemandRelocationListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,Map<Double,org.matsim.matrices.Matrices>>
addODMatrices(Map<String,Map<Double,org.matsim.matrices.Matrices>> ODMatrices1, Map<String,Map<Double,org.matsim.matrices.Matrices>> ODMatrices2)
protected Map<String,Map<Double,org.matsim.matrices.Matrices>>
calculateAvgODMAtrices(List<Map<String,Map<Double,org.matsim.matrices.Matrices>>> ODMatricesList)
protected ArrayList<RelocationInfo>
calculateRelocations(Double start, Double end, String companyId, List<RelocationZone> relocationZones)
protected Map<String,Map<Double,org.matsim.matrices.Matrices>>
divideODMatrices(Map<String,Map<Double,org.matsim.matrices.Matrices>> ODMatrices, double divisor)
Map<String,Map<Double,org.matsim.matrices.Matrices>>
getAvgODMatrices()
Map<Double,org.matsim.matrices.Matrices>
getAvgODMatrices(String companyId)
org.matsim.matrices.Matrices
getAvgODMatrices(String companyId, Double time)
org.matsim.matrices.Matrix
getAvgODMatrix(String companyId, Double time, String eventType)
protected RelocationAgent
getRelocationAgent(String companyId)
void
handleEvent(DispatchRelocationsEvent event)
void
notifyIterationStarts(org.matsim.core.controler.events.IterationStartsEvent event)
void
reset(int iteration)
protected void
writeAvgODMatrices()
protected void
writeAvgODMatricesMap()
-
-
-
Constructor Detail
-
AverageDemandRelocationListener
public AverageDemandRelocationListener()
-
-
Method Detail
-
notifyIterationStarts
public void notifyIterationStarts(org.matsim.core.controler.events.IterationStartsEvent event)
- Specified by:
notifyIterationStarts
in interfaceorg.matsim.core.controler.listener.IterationStartsListener
-
reset
public void reset(int iteration)
- Specified by:
reset
in interfaceorg.matsim.core.events.handler.EventHandler
-
handleEvent
public void handleEvent(DispatchRelocationsEvent event)
- Specified by:
handleEvent
in interfaceDispatchRelocationsEventHandler
-
calculateRelocations
protected ArrayList<RelocationInfo> calculateRelocations(Double start, Double end, String companyId, List<RelocationZone> relocationZones)
-
getAvgODMatrices
public Map<String,Map<Double,org.matsim.matrices.Matrices>> getAvgODMatrices()
-
getAvgODMatrices
public Map<Double,org.matsim.matrices.Matrices> getAvgODMatrices(String companyId)
-
getAvgODMatrices
public org.matsim.matrices.Matrices getAvgODMatrices(String companyId, Double time)
-
getAvgODMatrix
public org.matsim.matrices.Matrix getAvgODMatrix(String companyId, Double time, String eventType)
-
calculateAvgODMAtrices
protected Map<String,Map<Double,org.matsim.matrices.Matrices>> calculateAvgODMAtrices(List<Map<String,Map<Double,org.matsim.matrices.Matrices>>> ODMatricesList)
-
addODMatrices
protected Map<String,Map<Double,org.matsim.matrices.Matrices>> addODMatrices(Map<String,Map<Double,org.matsim.matrices.Matrices>> ODMatrices1, Map<String,Map<Double,org.matsim.matrices.Matrices>> ODMatrices2)
-
divideODMatrices
protected Map<String,Map<Double,org.matsim.matrices.Matrices>> divideODMatrices(Map<String,Map<Double,org.matsim.matrices.Matrices>> ODMatrices, double divisor)
-
getRelocationAgent
protected RelocationAgent getRelocationAgent(String companyId)
-
writeAvgODMatrices
protected void writeAvgODMatrices()
-
writeAvgODMatricesMap
protected void writeAvgODMatricesMap()
-
-