Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Maximum Value

Maximum Value

Hi, I need a way to determine a maximum value out of several inputs. I looked it up but couldn’t find anything to help me.

For context: I want to implement a passive balancing for several battery cells connected in series with different voltages. When they are being charged, after reaching a certain overall voltage, the cell with the maximum voltage should be discharged while the rest of the cells keeps charging.

I tried to expand on the max Block but apparently this only works with 2 inputs. I thought making my own “SI4SO”-Block might work but it doesn’t. Now I’m kind of lost since I’m a complete beginner to OpenModelica.

Some help would be appreciated.
Also, what would be the best way to import data from excel/csv?

Re: Maximum Value

Modelica.Blocks.Math.MinMax: Output the minimum and the maximum element of the input vector

Dealing with CSV/Excel files is easiest done by converting them to mat-files and using Modelica.Blocks.Tables to read them.

There are 0 guests and 0 other users also viewing this topic