lbl-srg / BuildingsPy

Python modules for automating Modelica simulations and for running unit test for the Buildings library
80 stars 46 forks source link

Excluding files from merger #80

Open Mathadon opened 8 years ago

Mathadon commented 8 years ago

In IDEAS we have created a 'weatherbus' connector that contains many more signals and parameters than the Annex 60 version. This causes problems (https://github.com/open-ideas/IDEAS/issues/414) when connecting components from A60 such as IDEAS.Fluid.Sources.Outside_CpLowRise.

The cleanest way to deal with this seems to provide the option exclude some files from being overwritten. This way we can develop our own bus connector, without it being overwritten when merging.

An added functionality may be to include the 'original' A60 code in the bus connector, but to comment it, such that it is easy to compare the two code versions when problems would arise after a merge.

Does this seem to be a good solution to our problem?

mwetter commented 8 years ago

@Mathadon , @rubenbaetens We could add a function set_excluded_files to flag files that should not be merged, and then it would be up to the IDEAS developers to set the files you don't want. I however think this is not a clean solution because then what is now the Annex 60 core may diverge from one library to another. Would it work in your case to extend from the weather bus and add the functionality that IDEAS needs? I also don't see why IDEAS.Fluid.Sources.Outside_CpLowRise requires a different connector. Do you add functionality that needs additional information?

rubenbaetens commented 8 years ago

@mwetter @Mathadon There is indeed no need for another connector for IDEAS.Fluid.Sources.Outside_CpLowRise as we do not add any additional functionality. Though we created other models that required additional information which we originally included in our weaBus, thus making the bus no longer compatible with A60 bus.

Is extending from the A60 weabus and adding parameters a solution here ? As you remain attempting to connect two busses with different parameters set (though with a common base).

Mathadon commented 8 years ago

Thank you for the suggestion. I already tried using the extends clause but this does not work (dymola error message: incompatible connectors).

Our weather bus connector contains several additional Real and Bus variables that do not exist in the A60 version. Still, it would be convenient to use only one bus within IDEAS. I prefer having incompatible connectors between IDEAS-AixLib rather than having incompatible connectors within IDEAS. The solution I proposed seemed to be the cleanest, although I'm open for other suggestions!

mwetter commented 8 years ago

What are these additional variables? Are they of general interest to the other libraries as well?

Mathadon commented 8 years ago

No, they are mostly variables such as light incidence angles and intensity for windows.