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 id the id
28 * @param lane the lane where the blockage exists
29 * @param longitudinalPosition the position on the lane; position where the GTUs have to stop
30 * @param height the height of the blockage
31 * @throws NetworkException in case object cannot be placed on the lane
32 */
33 public LaneBlock(final String id, final Lane lane, final Length longitudinalPosition, final Length height)
34 throws NetworkException
35 {
36 super(id, lane, longitudinalPosition, LaneBasedObject.makeGeometry(lane, longitudinalPosition), height);
37 }
38
39 /**
40 * @param id the id
41 * @param lane the lane where the blockage exists
42 * @param longitudinalPosition the position on the lane; position where the GTUs have to stop
43 * @param geometry the geometry of the lane blockage
44 * @param height the height of the blockage
45 * @throws NetworkException in case object cannot be placed on the lane
46 */
47 public LaneBlock(final String id, final Lane lane, final Length longitudinalPosition, final OTSLine3D geometry,
48 final Length height) throws NetworkException
49 {
50 super(id, lane, longitudinalPosition, geometry, height);
51 }
52
53 /** {@inheritDoc} */
54 @Override
55 @SuppressWarnings("checkstyle:designforextension")
56 public String toString()
57 {
58 return "LaneBlock: " + super.toString();
59 }
60
61 /** {@inheritDoc} */
62 @Override
63 public LaneBlock clone(final CrossSectionElement newCSE, final OTSSimulatorInterface newSimulator, final boolean animation)
64 throws NetworkException
65 {
66 // TODO
67 return null;
68 }
69
70 }