public class PollutableOsmArc
extends org.liris.smartgov.simulator.urban.osm.environment.graph.OsmArc
Constructor and Description |
---|
PollutableOsmArc(java.lang.String id,
org.liris.smartgov.simulator.urban.osm.environment.graph.OsmNode startNode,
org.liris.smartgov.simulator.urban.osm.environment.graph.OsmNode targetNode,
org.liris.smartgov.simulator.urban.osm.environment.graph.Road road,
org.liris.smartgov.simulator.urban.osm.environment.graph.OsmArc.RoadDirection roadDirection,
Neighborhood neighborhood)
PollutableOsmArc constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
_triggerPollutionIncreasedListeners(PollutionIncreasedEvent event)
Used by the
PollutantCarMover to
trigger pollution increased listeners |
void |
addPollutionIncreasedListener(org.liris.smartgov.simulator.core.events.EventHandler<PollutionIncreasedEvent> pollutionIncreasedListener)
Adds a new pollution increased event handler, called each time the arc is
polluted by a
PollutantCarMover . |
java.lang.String |
getNeighborhoodId() |
Pollution |
getPollution()
Returns the pollution amounts registered on this arc.
|
void |
increasePollution(Pollutant pollutant,
double increment)
Increases the pollution amount recorded on this arc for the given pollutant
by the specified amount, in g.
|
boolean |
isAllowed(Vehicle vehicle) |
void |
resetPollution() |
getRoad, getRoadDirection
getDirection
getId, getLength, getStartNode, getTargetNode
public PollutableOsmArc(java.lang.String id, org.liris.smartgov.simulator.urban.osm.environment.graph.OsmNode startNode, org.liris.smartgov.simulator.urban.osm.environment.graph.OsmNode targetNode, org.liris.smartgov.simulator.urban.osm.environment.graph.Road road, org.liris.smartgov.simulator.urban.osm.environment.graph.OsmArc.RoadDirection roadDirection, Neighborhood neighborhood)
id
- arc idstartNode
- start nodetargetNode
- target noderoad
- osm roadroadDirection
- BACKWARD or FORWARDinLez
- true if this arc is contained in a LEZpublic void increasePollution(Pollutant pollutant, double increment)
pollutant
- pollutantincrement
- emission in gpublic Pollution getPollution()
public void resetPollution()
public java.lang.String getNeighborhoodId()
public boolean isAllowed(Vehicle vehicle)
public void addPollutionIncreasedListener(org.liris.smartgov.simulator.core.events.EventHandler<PollutionIncreasedEvent> pollutionIncreasedListener)
PollutantCarMover
.pollutionIncreasedListener
- pollution increased event handlerpublic void _triggerPollutionIncreasedListeners(PollutionIncreasedEvent event)
PollutantCarMover
to
trigger pollution increased listenersevent
- pollution increased event