Per Östlund

Results 245 comments of Per Östlund

#9199 caused some regressions regarding expandable connectors, see [regression report](https://libraries.openmodelica.org/branches/history/master/2022-07-05%2002:05:05..2022-07-07%2003:53:37.html). The change only revealed an already existing issue though, which might be the cause of why these models doesn't work....

MWE: ```Modelica expandable connector CellBus Real lossPower; end CellBus; expandable connector StackBus CellBus[3, 2] cellBus; end StackBus; model HeatFlowSensor connector RealOutput = output Real; RealOutput Q_flow; end HeatFlowSensor; model Cell...

With the fix in #9867 the MWE now works, and the CCCV models now pass the frontend but unfortunately not the backend. For the `CCCV_StackRC` model I get about 5...

It seems something might have improved, at least we're not getting millions of error messages anymore. Now we just get: ``` Notification: It was not possible to check the given...

> @perost, before getting there I see: ` [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/Electrical/Batteries/ParameterRecords/TransientData/CellData.mo:6:3-7:60:writable] Warning: Parameter stackData.cellData[1,2].nRC has no value, and is fixed during initialization (fixed=true), using available start value (start=0) as default value....

The issue wasn't that we were losing bindings, but that the binding of `stackData.cellData` was defined as: ```Modelica {{if anyTrue({ks == kDegraded[i, 1] and kp == kDegraded[i, 2] for i...

> Sounds good. Moving bindings to initial equations is not a good idea for structural parameters, which `nRC` definitely is. I wonder if there is a more general strategy to...

> @perost, what do you think? That's pretty much how it already works, we try various things like inlining or just straight up constant evaluating the bindings in order to...

> From what I understand in [#3885](https://trac.openmodelica.org/OpenModelica/ticket/3885#comment:23), if actual constants (or parameters with `Evaluate = true`) are used, the NF will constant-evaluate them to literal constants, and then take care...

I made a MWE from `EquationFitReversible_CoolingClosedLoop` that shows the issue: ```Modelica type AbsolutePressure = Real(min = 0, max = 1.e8); type SpecificEnthalpy = Real(min = -1.0e10, max = 1.e10); type...