modelica / VehicleInterfaces

Free (standard conforming) library for interface definitions and architectures for vehicle system modeling
Other
43 stars 22 forks source link

Drop outer road declaration in VisualizeSimpleRoads #47

Closed dariomangoni closed 4 years ago

dariomangoni commented 4 years ago

Following https://github.com/modelica/VehicleInterfaces/issues/18 the issue does not appear to be there in OpenModelica using the -d=newInst flag.

However, I present an easy and clean solution that overcomes any possible issue and avoids OpenModelica to run with new frontend (still quite unmature). I think that convoluted code should be avoided whenever possible.

The problem is that in VisualizeSimpleRoads the road was declared as outer even though the VisualizeSimpleRoads model was part of a road itself. This was causing issues in OpenModelica that was not able to solve for an outer component asked from a model that is part of the outer component itself.

Please consider if this change would or would not make the library easier and cleaner. If not, please drop my pull request.

dariomangoni commented 4 years ago

Oh, I'm really sorry. I left a typo behind.

Thanks for fixing it.

tobolar commented 4 years ago

No reason to reimplement the existing solution, see https://github.com/modelica/VehicleInterfaces/issues/18#issuecomment-615192265