„Resolve the collision..” strange behavior

Hello,
I have problem with systems collision. This is what I have in my score:


I have enabled „Automatically resolve the collision between adjacent staves and systems” in Layout option. “Minimum inter-system gap with content” is set to “2”.
This is result when I disable it:

Both examples are not proper. How can I really resolve the collisions? It helps when I set “Minimum inter-system gap with content” e.g. to “8”, but it should work even with “1”

Edit:
Now I noticed, that if I change „Minimum inter-staff gap with content" from 1 to e.g. 1 1/4, it’s better:


But I don’t know what is the logic of this. Why I have to change inter-staff gap?

The problem here is that Dorico does not know exactly how much vertical space the music is going to occupy until it has cast it off, but it cannot know exactly how to cast it off until it knows the height of the music, so this is an inherently circular problem.

When the 'Automatically resolve collisions between adjacent staves and systems’ option is on, then Dorico makes an estimate of what it thinks the height of the system(s) is likely to be prior to casting it off, so that it can decide when it needs to move on to the next frame; the reason it has to work this way is that the next frame may not be the same size as the current one – in particular, it could be narrower or wider, in which case the casting off might need to change.

So before it casts off it needs to try to work out how many systems it can fit into the current frame at the current width. It can’t do the final layout yet, because some of the things it needs to lay out cannot be laid out until we know how wide the frame is etc., so it’s using a relatively crude estimate based on the kinds of items you have in each system. Low and high notes contribute, as to lyrics, dynamics, tempos, and so on. I hope that one day we’ll be able to come up with a better approach to this inherently rather circular problem, but as yet we haven’t got one!

In your score, Dorico assumes that based on its estimates two systems will fit in the height of the frame, but when it comes to it and the systems are taller than it expected, then you end up with collisions, because it can’t change its mind and force one of the systems into the next frame on its own. However, adding a frame break manually should sort things out.

because it can’t change its mind and force one of the systems into the next frame on its own

Well… Why not?
Shouldn’t it be obvious that when Dorico discovers that there is more on the page than it can reasonably render, it would then push the last staff to the next page and try again?

This is an inherently circular problem: once it pushes a system onto the next frame, it then has to space and cast off both the current frame again, and the next one, which can then have similar knock-on effects all the way to the end of the layout. I believe I was quite clear in my previous reply when I said:

I hope that one day we’ll be able to come up with a better approach to this inherently rather circular problem, but as yet we haven’t got one!

I suppose this is the kind of problem where LaTeX philosophy is better suited — i.e. non real-time casting off, but post-processing after several passes to take decisions based on what’s before and what’s after any problematic point.
Yet I find Dorico to be so much superior to the alternative using this kind of philosophy (music publishing has so much in common with drawing, more than with text editing), especially because text source for music is just unreadable (while I love LaTeX for text documents, very efficient and powerful).
Maybe in the future your team will create a new feature, mixed real-time and post-processed results ? In the meantime, I find the manual breaking features do work :wink:

Thank you, Daniel, for detailed explanation. I will simply manually brake frame, as you’ve said.