-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/sub pathfinding #83
Conversation
LeftOrRight ist eine private Variable, insofern ist es eindeutig
1NG3M4R <notifications@github.com> schrieb am So., 16. Feb. 2020, 15:47:
… ***@***.**** commented on this pull request.
------------------------------
In Assets/Scripts/DataTypes/Vertices/TeeSection.cs
<#83 (comment)>:
> + 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
<#83?email_source=notifications&email_token=AHOLDJ26BRXKZNDYDZFSE7LRDFGZHA5CNFSM4KVZQHR2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCVWCF7Q#pullrequestreview-359408382>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHOLDJ2TGRFJ43BVF6XDEELRDFGZHANCNFSM4KVZQHRQ>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kann das Programm mit den LaneTypes Schon ne SubRoute bilden, und wenn ja, wo?
ist das ganze Schon lauffähig?
Es wird eine Dictionary mit Listen von Subroutes erstellt, nämlich |
Ist aber unschön
…On Tue, 18 Feb 2020, 13:36 Richard Fuchs, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Assets/Scripts/DataTypes/Vertices/EndPoint.cs
<#83 (comment)>:
> + 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
<#83?email_source=notifications&email_token=AK3W7LSBRW6B4MAV3XC3YNDRDPI5JA5CNFSM4KVZQHR2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCV44PJY#discussion_r380644781>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK3W7LWL6AMX5OR2JAIU6X3RDPI5JANCNFSM4KVZQHRQ>
.
|
Also? |
…ition(), re-add Edge.originPoint, remove RoadShape from ITrack, rename EndPoint.SetWeights() to EndPoint.CalculateRouteProbabilities() This commit has been sponsored by Raid Shadow Legends
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vorschlag:
- RouteProbabilites wird zu einer einzigen static methode
Choose(destinations, weights)
in ner static klasseRandom
inUtility
- (Falls einen der performance verlust juckt, da
CalculateCumulative()
quasi unnötig mehrfach berechnet wird, kann man das auch global cachen in nem dictionary von weights zu cumulativeWeights)
- (Falls einen der performance verlust juckt, da
- ==>
EndPoint.CalculateRouteProbabilities()
kann komplett weg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vorschlag:
- RouteProbabilites wird zu einer einzigen static methode
Choose(destinations, weights)
in ner static klasseRandom
inUtility
- (Falls einen der performance verlust juckt, da
CalculateCumulative()
quasi unnötig mehrfach berechnet wird, kann man das auch global cachen in nem dictionary von weights zu cumulativeWeights)
- (Falls einen der performance verlust juckt, da
- ==>
EndPoint.CalculateRouteProbabilities()
kann komplett weg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sieht jetzt gut aus
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