Use of Unpacked Struct in solve...before Constraint

In reply to Jung Ik Moon:

It would help if you could share a complete runnable example and explained the differences you see.

I cannot think of a reason why a struct with at least one random member would have a problem with a solve before construct.

In any case, for the example you have shown, there is no need to have a solve before constraint on the size of my_struct array. A dynamic array gets sized before considering constraints on its elements, and the size becomes a state variable.