ucbtrans / opt

Operations Planning Toolbox
https://opt.ucbtrans.org
BSD 2-Clause "Simplified" License
0 stars 3 forks source link

Remove Lane event #300

Closed lapardhaja closed 3 years ago

lapardhaja commented 3 years ago

Is there a way to check real time how many lanes are we going to have left in a lane group? For instance if by default I have 2 lanes and I click -1 to show me that I am going to have 1, and maybe in this way we will prevent to go to 0 lanes for a lane group

error.OTMException: Cannot set lanes to a non-positive number. at core.AbstractLaneGroup.set_lanes(AbstractLaneGroup.java:391) at events.EventLanegroupLanes.action(EventLanegroupLanes.java:44) at dispatch.Dispatcher.dispatch_events_to_stop(Dispatcher.java:81) at core.OTM.advance(OTM.java:193) at opt.OTMTask.run_simulation(OTMTask.java:158) at opt.OTMTask.call(OTMTask.java:90) at javafx.concurrent.Task$TaskCallable.call(Task.java:1425) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.lang.Thread.run(Thread.java:834)

ggomes commented 3 years ago

This is possible but a little complicated because it depends on all previous events in the list. It relates also to issue 299. If we implement this, then an error can be provided by the UI.