MiniZinc models can be constructed from multiple files using include items (see Include Items). MiniZinc has no module system as such; all the included files are simply concatenated and processed as a whole, exactly as if they had all been part of a single file. Rationale: We have not found much need for one so far. If bigger models become common and the single global namespace becomes a problem, this should be reconsidered.
We definitely have a need for that!
Assume you have different models, each complex enough so that different people build different models, and you want to join these models together with some more constraints. How are you supposed to do that with the current naming clash issue? You could force everyone to add a certain, globally unique pre-/suffix to each and every variable, parameter, enum and enum value in their models. But this is not a good solution as it is prone to errors and hinders readability.
If an include could be used inside a let, that would be a solution to the problem. But any other solution would be great as well.
From the docs, emphasis by me:
We definitely have a need for that!
Assume you have different models, each complex enough so that different people build different models, and you want to join these models together with some more constraints. How are you supposed to do that with the current naming clash issue? You could force everyone to add a certain, globally unique pre-/suffix to each and every variable, parameter, enum and enum value in their models. But this is not a good solution as it is prone to errors and hinders readability.
If an include could be used inside a let, that would be a solution to the problem. But any other solution would be great as well.