-
Notifications
You must be signed in to change notification settings - Fork 0
courses #3
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
base: master
Are you sure you want to change the base?
Conversation
| var intersection = new Intersection(5); | ||
| crFromLane.addIntersection(intersection); | ||
| cr.addIntersection(intersection); | ||
| } |
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.
В эту часть пока не вникал, но давай сделаем, чтобы на перекрестке без светофора машины не могли сквозь перпендикулярный поток проезжать
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.
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.
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.
Я понял, что ты хочешь intersectaion для синих и зеленых, чтобы когда зеленые едут из 8 в 6, синие из 5 не могли проехать в 9 (в 6 они не проедут, потому что на этот случай создается intersaction). Вот что делать с 9 в этом случае, я не придумал, но если мы запускаем зеленых и оранжевых, то в 9 возникает конфликт синих и оранжевых, так что синие ехать не смогут. Intersaction создается если два курса ведут в одну дорогу, более того в одну полосу. Как определять их пересечения внутри самой node, повторю, я не придумал. Мне кажется это не критично. В любом случае мы добиваемся того, что два потока не могу одновременно ломиться в один выход из node.
На картинке меньше дорог, но сути не меняет, просто в конфигах нет случая для 4 дорог, но логика будет та же

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.
Пересечение курсов (8,6) и (5,9) важное, без таких пересечений у нас не только с 3 дорогами будет кривовато работать симуляция, но и вообще неправильно себя вести перекресток 4 дорог. Если совсем не можешь так сделать, то можем смержить как есть и я этим займусь
| for (var fI : f.getIntersections()) { | ||
| for (var sI : s.getIntersections()) { | ||
| if (fI.equals(sI)) { | ||
| return true; |
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.
Тут получается цикл вложенности 3, мб можно сеты и пересечения можно заюзать?
(Не критично)


Знаков поворота нет, так что из любого IN можно доехать в любой OUT. Пересечения считаются, когда потоки машин из разных IN заезжают в одну и ту же полосу OUT. Внутри перекрестка пересечения не считаются.