Closed rrickfox closed 4 years ago
LeftOrRight ist eine private Variable, insofern ist es eindeutig
1NG3M4R notifications@github.com schrieb am So., 16. Feb. 2020, 15:47:
@1NG3M4R commented on this pull request.
In Assets/Scripts/DataTypes/Vertices/TeeSection.cs https://github.com/rrickfox/traffic-sim/pull/83#discussion_r379908559:
- if(this._leftOrRight.Equals(from))
- if(this._leftOrRight.Equals(to))
- throw new System.Exception("From and to are the same Edge");
was ist leftOrRight? ist das eindeutig? wenn nein ist das ne Fehlerquelle
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/rrickfox/traffic-sim/pull/83?email_source=notifications&email_token=AHOLDJ26BRXKZNDYDZFSE7LRDFGZHA5CNFSM4KVZQHR2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCVWCF7Q#pullrequestreview-359408382, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHOLDJ2TGRFJ43BVF6XDEELRDFGZHANCNFSM4KVZQHRQ .
Es wird eine Dictionary mit Listen von Subroutes erstellt, nämlich RoutingTable
. Aus dieser Dictionary wählen Endpoints eine Liste von Subroutes aus, die dann der Reihe nach abgefahren werden. Da die Car Ai allerdings noch nicht in der Lage ist Spurwechsel durchzuführen, können wir das SubRouting noch nicht wirklich demonstrieren. Wie du allerdings in Unity sehen kannst, läuft die Simulation. Ansonsten hätte ich den Pull Request auch nicht erstellt...
Ist aber unschön
On Tue, 18 Feb 2020, 13:36 Richard Fuchs, notifications@github.com wrote:
@rrickfox commented on this pull request.
In Assets/Scripts/DataTypes/Vertices/EndPoint.cs https://github.com/rrickfox/traffic-sim/pull/83#discussion_r380644781:
- public void SetWeights()
- {
- _routeProbabilities = new RouteProbabilities(_weights, routingTable.Where(kvp => kvp.Value != null).Select(kvp => kvp.Key).ToList()); }
Wir ja nur einmal aufgerufen und dabei werden auch alle aufgerufen. Von daher kein Problem
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/rrickfox/traffic-sim/pull/83?email_source=notifications&email_token=AK3W7LSBRW6B4MAV3XC3YNDRDPI5JA5CNFSM4KVZQHR2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCV44PJY#discussion_r380644781, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3W7LWL6AMX5OR2JAIU6X3RDPI5JANCNFSM4KVZQHRQ .
Ist aber unschön
Also?
Autos erhalten beim spawnen eine Liste an ITracks, die aus der RoutingTable mit einer gewissen Wahrscheinlichkeit ausgewählt wurde. Die Wahrscheinlichkeit wird durch ein RouteProbability-Objekt kontrolliert. Die RoutingTable besteht aus RouteSegments, die aus einer Edge und einer Lane bestehen. closes #51