Skip to content
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

Safety margin issue #30

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

shengjiex98
Copy link
Collaborator

This is not a real PR, but a minimal working example of #26. Running

julia --project test/safety_margin_issue.jl

multiple times yields different results each time.

I realize that this is after a bunch of changes that I've made to the schedule synthesis part, so it could be something that I did there broke it. Still, would be very helpful to find out the cause of this!

@Ratfink
Copy link
Owner

Ratfink commented Aug 21, 2023

It would be nice if we could get a more minimal example that simply shows the problem on the main branch to verify that it isn't because of all the other changes here. Shouldn't be any need to make a whole branch for it, just a short script I could copy and paste should suffice. I could take a shot at it myself if you don't have the time, just let me know. 🙂

@shengjiex98
Copy link
Collaborator Author

I'll take a look today and get back to you. I think last time I tried it was only showing up in my branch so maybe something there messed things up. I'll follow up after I try it out on main.

@shengjiex98
Copy link
Collaborator Author

Seems like I cannot reproduce the problem in main and the issue is likely in the changes I made after. From my initial investigation, the issue seems to stem from bounded_runs_iter() sometimes exits earlier even when using the same constraint. I.e., running

reachable = bounded_runs_iter(a, z_0, n, H, safety_margin=d_max)
if size(reachable, 1) != H+1
    @info "Size mismatch"
    return d_max
end

10 times in a row sometimes enters the if scenario even when none of the parameters have changed. My next step is to do a diff between the two branches on bounded_runs_iter and see if I made any changes there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants