1012 lines
54 KiB
HTML
1012 lines
54 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
"http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="de">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_242-release) on Sun Nov 15 16:26:40 CET 2020 -->
|
|
<title>Track</title>
|
|
<meta content="2020-11-15" name="date">
|
|
<link href="../../../stylesheet.css" rel="stylesheet" title="Style" type="text/css">
|
|
<script src="../../../script.js" type="text/javascript"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="Track";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation
|
|
links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../de/hems/trafficsim/package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../de/hems/trafficsim/TimeRecordView.html"
|
|
title="class in de.hems.trafficsim"><span class="typeNameLink">Prev Class</span></a>
|
|
</li>
|
|
<li><a href="../../../de/hems/trafficsim/Vehicle.html"
|
|
title="class in de.hems.trafficsim"><span class="typeNameLink">Next Class</span></a>
|
|
</li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?de/hems/trafficsim/Track.html" target="_top">Frames</a>
|
|
</li>
|
|
<li><a href="Track.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">de.hems.trafficsim</div>
|
|
<h2 class="title" title="Class Track">Class Track</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>java.util.Observable</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>de.hems.trafficsim.Track</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="typeNameLabel">Track</span>
|
|
extends java.util.Observable</pre>
|
|
<div class="block">Main model class of TrafficSim. Represents a round course
|
|
containing vehicles.
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary"
|
|
summary="Field Summary table, listing fields, and an explanation">
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Field and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#brakeProb">brakeProb</a></span></code>
|
|
<div class="block">currently configured brake probability for
|
|
all vehicles
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#delayedAvg">delayedAvg</a></span></code>
|
|
<div class="block">average over all velocities in the
|
|
simulation, ignoring the first ten steps
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#historyLength">historyLength</a></span></code>
|
|
<div class="block">length of the history kept</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#lastAvg">lastAvg</a></span></code>
|
|
<div class="block">average over all velocities in the last
|
|
step
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected
|
|
java.util.concurrent.Semaphore</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#listSemaphore">listSemaphore</a></span></code>
|
|
<div class="block">semaphore protecting the vtrlist</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#maxVelocity">maxVelocity</a></span></code>
|
|
<div class="block">currently configured max velocity for all
|
|
vehicles
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#overallAvg">overallAvg</a></span></code>
|
|
<div class="block">average over all velocities in the
|
|
simulation
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#steps">steps</a></span></code>
|
|
<div class="block">counter for executed simulation steps</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#sumAvgMemory">sumAvgMemory</a></span></code>
|
|
<div class="block">sum of all vehicle speeds during the
|
|
simulation, used for average calculation
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#sumDelAvgMemory">sumDelAvgMemory</a></span></code>
|
|
<div class="block">sum of all vehicle speeds during the
|
|
simulation ignoring the first ten steps,
|
|
used for average calculation
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#trackLength">trackLength</a></span></code>
|
|
<div class="block">length of the track</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected java.util.List<<a
|
|
href="../../../de/hems/trafficsim/Vehicle.html"
|
|
title="class in de.hems.trafficsim">Vehicle</a>></code>
|
|
</td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#vehicles">vehicles</a></span></code>
|
|
<div class="block">list a vehicles on the track</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected java.util.List<java.util.List<<a
|
|
href="../../../de/hems/trafficsim/VehicleTimeRecord.html"
|
|
title="class in de.hems.trafficsim">VehicleTimeRecord</a>>></code>
|
|
</td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#vtrList">vtrList</a></span></code>
|
|
<div class="block">list of resulting time records of the
|
|
simulation
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#waitTime">waitTime</a></span></code>
|
|
<div class="block">current configured wait time between two
|
|
simulation steps
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary"
|
|
summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span>
|
|
</caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#Track-int-float-float-float-int-int-">Track</a></span>(int numberVehicles,
|
|
float trackLength,
|
|
float brakeProb,
|
|
float maxVelocity,
|
|
int waitTime,
|
|
int historyLength)</code>
|
|
<div class="block">Constructor for a new Track.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary"
|
|
summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span class="activeTableTab"
|
|
id="t0"><span>All Methods</span><span class="tabEnd"> </span></span><span
|
|
class="tableTab" id="t2"><span><a href="javascript:show(2);">Instance Methods</a></span><span
|
|
class="tabEnd"> </span></span><span class="tableTab"
|
|
id="t4"><span><a
|
|
href="javascript:show(8);">Concrete Methods</a></span><span
|
|
class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr class="altColor" id="i0">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#avg_step-int-">avg_step</a></span>(int step)</code>
|
|
<div class="block">Returns the average velocity of the given
|
|
simulation step.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i1">
|
|
<td class="colFirst"><code>protected java.util.List<<a
|
|
href="../../../de/hems/trafficsim/Vehicle.html"
|
|
title="class in de.hems.trafficsim">Vehicle</a>></code>
|
|
</td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#createVehiclesList-int-">createVehiclesList</a></span>(int numberVehicles)</code>
|
|
<div class="block">Utility function to add vehicles to the
|
|
Track.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i2">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#getDelayedAvg--">getDelayedAvg</a></span>()</code>
|
|
<div class="block">Getter for delayedAvg</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i3">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#getHistoryLength--">getHistoryLength</a></span>()</code>
|
|
<div class="block">Getter for historyLength</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i4">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#getLastAvg--">getLastAvg</a></span>()</code>
|
|
<div class="block">Getter for lastAvg</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i5">
|
|
<td class="colFirst"><code>java.util.concurrent.Semaphore</code>
|
|
</td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#getListSemaphore--">getListSemaphore</a></span>()</code>
|
|
<div class="block">Getter for listSemaphore</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i6">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#getOverallAvg--">getOverallAvg</a></span>()</code>
|
|
<div class="block">Getter for overallAvg</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i7">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#getSteps--">getSteps</a></span>()</code>
|
|
<div class="block">Getter for steps</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i8">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#getTrackLength--">getTrackLength</a></span>()</code>
|
|
<div class="block">Getter for trackLength</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i9">
|
|
<td class="colFirst"><code>java.util.List<<a
|
|
href="../../../de/hems/trafficsim/Vehicle.html"
|
|
title="class in de.hems.trafficsim">Vehicle</a>></code>
|
|
</td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#getVehicles--">getVehicles</a></span>()</code>
|
|
<div class="block">Getter for vehicles</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i10">
|
|
<td class="colFirst"><code>java.util.List<java.util.List<<a
|
|
href="../../../de/hems/trafficsim/VehicleTimeRecord.html"
|
|
title="class in de.hems.trafficsim">VehicleTimeRecord</a>>></code>
|
|
</td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#getVtrList--">getVtrList</a></span>()</code>
|
|
<div class="block">Getter for vtrList</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i11">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#setBrakeProb-float-">setBrakeProb</a></span>(float brakeProb)</code>
|
|
<div class="block">Update the brake probability of all
|
|
vehicles.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i12">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#setMaxVelocity-float-">setMaxVelocity</a></span>(float maxVelocity)</code>
|
|
<div class="block">Update the maximum velocity of all
|
|
vehicles.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i13">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#setWaitTime-int-">setWaitTime</a></span>(int waitTime)</code>
|
|
<div class="block">Update the wait time of the simulation.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor" id="i14">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#timeElapse--">timeElapse</a></span>()</code>
|
|
<div class="block">Calculates on simulation step ahead and then
|
|
waits for the configured wait time.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor" id="i15">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a
|
|
href="../../../de/hems/trafficsim/Track.html#update_avg--">update_avg</a></span>()</code>
|
|
<div class="block">Utility function which updates the averages
|
|
values with the results from the last simulation
|
|
step.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a
|
|
name="methods.inherited.from.class.java.util.Observable">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.util.Observable</h3>
|
|
<code>addObserver, clearChanged, countObservers, deleteObserver,
|
|
deleteObservers, hasChanged, notifyObservers, notifyObservers,
|
|
setChanged</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a
|
|
name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify,
|
|
notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Detail</h3>
|
|
<a name="vehicles">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>vehicles</h4>
|
|
<pre>protected java.util.List<<a
|
|
href="../../../de/hems/trafficsim/Vehicle.html"
|
|
title="class in de.hems.trafficsim">Vehicle</a>> vehicles</pre>
|
|
<div class="block">list a vehicles on the track</div>
|
|
</li>
|
|
</ul>
|
|
<a name="vtrList">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>vtrList</h4>
|
|
<pre>protected java.util.List<java.util.List<<a
|
|
href="../../../de/hems/trafficsim/VehicleTimeRecord.html"
|
|
title="class in de.hems.trafficsim">VehicleTimeRecord</a>>> vtrList</pre>
|
|
<div class="block">list of resulting time records of the
|
|
simulation
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<a name="trackLength">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>trackLength</h4>
|
|
<pre>protected float trackLength</pre>
|
|
<div class="block">length of the track</div>
|
|
</li>
|
|
</ul>
|
|
<a name="sumAvgMemory">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>sumAvgMemory</h4>
|
|
<pre>protected float sumAvgMemory</pre>
|
|
<div class="block">sum of all vehicle speeds during the simulation,
|
|
used for average calculation
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<a name="sumDelAvgMemory">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>sumDelAvgMemory</h4>
|
|
<pre>protected float sumDelAvgMemory</pre>
|
|
<div class="block">sum of all vehicle speeds during the simulation
|
|
ignoring the first ten steps,
|
|
used for average calculation
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<a name="historyLength">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>historyLength</h4>
|
|
<pre>protected int historyLength</pre>
|
|
<div class="block">length of the history kept</div>
|
|
</li>
|
|
</ul>
|
|
<a name="overallAvg">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>overallAvg</h4>
|
|
<pre>protected float overallAvg</pre>
|
|
<div class="block">average over all velocities in the simulation
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<a name="delayedAvg">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>delayedAvg</h4>
|
|
<pre>protected float delayedAvg</pre>
|
|
<div class="block">average over all velocities in the simulation,
|
|
ignoring the first ten steps
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<a name="lastAvg">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>lastAvg</h4>
|
|
<pre>protected float lastAvg</pre>
|
|
<div class="block">average over all velocities in the last step
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<a name="waitTime">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>waitTime</h4>
|
|
<pre>protected int waitTime</pre>
|
|
<div class="block">current configured wait time between two
|
|
simulation steps
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<a name="maxVelocity">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>maxVelocity</h4>
|
|
<pre>protected float maxVelocity</pre>
|
|
<div class="block">currently configured max velocity for all
|
|
vehicles
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<a name="brakeProb">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>brakeProb</h4>
|
|
<pre>protected float brakeProb</pre>
|
|
<div class="block">currently configured brake probability for all
|
|
vehicles
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<a name="steps">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>steps</h4>
|
|
<pre>protected long steps</pre>
|
|
<div class="block">counter for executed simulation steps</div>
|
|
</li>
|
|
</ul>
|
|
<a name="listSemaphore">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>listSemaphore</h4>
|
|
<pre>protected java.util.concurrent.Semaphore listSemaphore</pre>
|
|
<div class="block">semaphore protecting the vtrlist</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="Track-int-float-float-float-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>Track</h4>
|
|
<pre>public Track(int numberVehicles,
|
|
float trackLength,
|
|
float brakeProb,
|
|
float maxVelocity,
|
|
int waitTime,
|
|
int historyLength)</pre>
|
|
<div class="block">Constructor for a new Track.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>numberVehicles</code> - number of vehicles on the
|
|
Track
|
|
</dd>
|
|
<dd><code>trackLength</code> - length of the new Track</dd>
|
|
<dd><code>brakeProb</code> - probability of a vehicle to
|
|
suddenly brake without reason
|
|
</dd>
|
|
<dd><code>maxVelocity</code> - maxmimum velocity of the vehicles
|
|
</dd>
|
|
<dd><code>waitTime</code> - time between two simulation steps to
|
|
slow down the simulation artificially
|
|
</dd>
|
|
<dd><code>historyLength</code> - length of the history to keep
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="getVtrList--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getVtrList</h4>
|
|
<pre>public java.util.List<java.util.List<<a
|
|
href="../../../de/hems/trafficsim/VehicleTimeRecord.html"
|
|
title="class in de.hems.trafficsim">VehicleTimeRecord</a>>> getVtrList()</pre>
|
|
<div class="block">Getter for vtrList</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>vtrList</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getOverallAvg--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getOverallAvg</h4>
|
|
<pre>public float getOverallAvg()</pre>
|
|
<div class="block">Getter for overallAvg</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>overallAvg</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getLastAvg--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getLastAvg</h4>
|
|
<pre>public float getLastAvg()</pre>
|
|
<div class="block">Getter for lastAvg</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>lastAvg</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getDelayedAvg--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDelayedAvg</h4>
|
|
<pre>public float getDelayedAvg()</pre>
|
|
<div class="block">Getter for delayedAvg</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>delayedAvg</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getVehicles--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getVehicles</h4>
|
|
<pre>public java.util.List<<a
|
|
href="../../../de/hems/trafficsim/Vehicle.html"
|
|
title="class in de.hems.trafficsim">Vehicle</a>> getVehicles()</pre>
|
|
<div class="block">Getter for vehicles</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>vehicles</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getTrackLength--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getTrackLength</h4>
|
|
<pre>public float getTrackLength()</pre>
|
|
<div class="block">Getter for trackLength</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>trackLength</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getSteps--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSteps</h4>
|
|
<pre>public long getSteps()</pre>
|
|
<div class="block">Getter for steps</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>steps</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getListSemaphore--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getListSemaphore</h4>
|
|
<pre>public java.util.concurrent.Semaphore getListSemaphore()</pre>
|
|
<div class="block">Getter for listSemaphore</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>listSemaphore</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getHistoryLength--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getHistoryLength</h4>
|
|
<pre>public int getHistoryLength()</pre>
|
|
<div class="block">Getter for historyLength</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>historyLength</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="createVehiclesList-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createVehiclesList</h4>
|
|
<pre>protected java.util.List<<a
|
|
href="../../../de/hems/trafficsim/Vehicle.html"
|
|
title="class in de.hems.trafficsim">Vehicle</a>> createVehiclesList(int numberVehicles)</pre>
|
|
<div class="block">Utility function to add vehicles to the Track.
|
|
</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>numberVehicles</code> - number of vehicles to add</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>filled list with vehicles</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setWaitTime-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setWaitTime</h4>
|
|
<pre>public void setWaitTime(int waitTime)</pre>
|
|
<div class="block">Update the wait time of the simulation.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>waitTime</code> - new wait time in ms</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setBrakeProb-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setBrakeProb</h4>
|
|
<pre>public void setBrakeProb(float brakeProb)</pre>
|
|
<div class="block">Update the brake probability of all vehicles.
|
|
</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>brakeProb</code> - new brake probability</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setMaxVelocity-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setMaxVelocity</h4>
|
|
<pre>public void setMaxVelocity(float maxVelocity)</pre>
|
|
<div class="block">Update the maximum velocity of all vehicles.
|
|
</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>maxVelocity</code> - new maximum velocity</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="timeElapse--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>timeElapse</h4>
|
|
<pre>public void timeElapse()</pre>
|
|
<div class="block">Calculates on simulation step ahead and then
|
|
waits for the configured wait time.
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<a name="avg_step-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>avg_step</h4>
|
|
<pre>public float avg_step(int step)</pre>
|
|
<div class="block">Returns the average velocity of the given
|
|
simulation step.
|
|
</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>step</code> - index of the step in the history list
|
|
</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>average velocity</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="update_avg--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>update_avg</h4>
|
|
<pre>protected void update_avg()</pre>
|
|
<div class="block">Utility function which updates the averages
|
|
values with the results from the last simulation
|
|
step.
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation
|
|
links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../de/hems/trafficsim/package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../de/hems/trafficsim/TimeRecordView.html"
|
|
title="class in de.hems.trafficsim"><span class="typeNameLink">Prev Class</span></a>
|
|
</li>
|
|
<li><a href="../../../de/hems/trafficsim/Vehicle.html"
|
|
title="class in de.hems.trafficsim"><span class="typeNameLink">Next Class</span></a>
|
|
</li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?de/hems/trafficsim/Track.html" target="_top">Frames</a>
|
|
</li>
|
|
<li><a href="Track.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</body>
|
|
</html>
|