FMIFlux.jl icon indicating copy to clipboard operation
FMIFlux.jl copied to clipboard

Not all members of a NeuralFMU are re-defined when calling the NeuralFMU. That should be made consistent.

Open juguma opened this issue 4 months ago • 0 comments

You can define a ME-NeuralFMU via https://github.com/ThummeTo/FMIFlux.jl/blob/77471fba7cd47648c7c6afdf5bab9f8050aaaf13/src/neural.jl#L87

You can call the created nfmu https://github.com/ThummeTo/FMIFlux.jl/blob/77471fba7cd47648c7c6afdf5bab9f8050aaaf13/src/neural.jl#L1044 with a series of arguments. Some of these arguments redefine the values of the member variables of the nfmu, some don't. This should be made consistent: Variables which redefine member values are (everything fine here):

  • tSpan
  • x_Start
  • setup
  • reset
  • instantiate
  • freeInstance
  • terminate
  • tolerance
  • parameters <-fmu parameters
  • p <-net parameters

Variables which exist as member values but are not overwritten:

  • recordValues
  • solver <-is only pushed as args to the actual solve
  • saveat
  • sensealg <- that is only a member of the fmu, maybe overwrite only with a warning!?

PS: haven't checked CS-NeuralFMU.

juguma avatar Mar 05 '24 11:03 juguma