1 package org.opentrafficsim.road.network.lane.object;
2
3 import org.djunits.value.vdouble.scalar.Length;
4 import org.opentrafficsim.core.dsol.OTSSimulatorInterface;
5 import org.opentrafficsim.core.geometry.OTSLine3D;
6 import org.opentrafficsim.core.network.NetworkException;
7 import org.opentrafficsim.road.network.lane.CrossSectionElement;
8 import org.opentrafficsim.road.network.lane.Lane;
9
10 /**
11 * Block on a lane that a GTU cannot pass.
12 * <p>
13 * Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
14 * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
15 * </p>
16 * $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $,
17 * initial version Nov 26, 2015 <br>
18 * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
19 * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
20 */
21 public class LaneBlock extends AbstractLaneBasedObject
22 {
23 /** */
24 private static final long serialVersionUID = 20150724L;
25
26 /**
27 * @param lane the lane where the blockage exists
28 * @param longitudinalPosition the position on the lane; position where the GTUs have to stop
29 * @param height the height of the blockage
30 * @throws NetworkException in case object cannot be placed on the lane
31 */
32 public LaneBlock(final Lane lane, final Length longitudinalPosition, final Length height) throws NetworkException
33 {
34 super(lane, longitudinalPosition, LaneBasedObject.makeGeometry(lane, longitudinalPosition), height);
35 }
36
37 /**
38 * @param lane the lane where the blockage exists
39 * @param longitudinalPosition the position on the lane; position where the GTUs have to stop
40 * @param geometry the geometry of the lane blockage
41 * @param height the height of the blockage
42 * @throws NetworkException in case object cannot be placed on the lane
43 */
44 public LaneBlock(final Lane lane, final Length longitudinalPosition, final OTSLine3D geometry, final Length height)
45 throws NetworkException
46 {
47 super(lane, longitudinalPosition, geometry, height);
48 }
49
50 /** {@inheritDoc} */
51 @Override
52 @SuppressWarnings("checkstyle:designforextension")
53 public String toString()
54 {
55 return "LaneBlock: " + super.toString();
56 }
57
58 /** {@inheritDoc} */
59 @Override
60 public LaneBlock clone(final CrossSectionElement newCSE, final OTSSimulatorInterface newSimulator,
61 final boolean animation) throws NetworkException
62 {
63 // TODO
64 return null;
65 }
66
67 }