Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.

Safety margin issue#30

Draft
shengjiex98 wants to merge 32 commits into
Ratfink:mainfrom
shengjiex98:safety-margin-issue
Draft

Safety margin issue#30
shengjiex98 wants to merge 32 commits into
Ratfink:mainfrom
shengjiex98:safety-margin-issue

Conversation

@shengjiex98
Copy link
Copy Markdown

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!

Shengjie Xu added 30 commits March 9, 2023 20:50
@Ratfink
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants