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

import record or class from file

import record or class from file

Hi,
How i can import record or class from file ?
For example;  if i want to load  below file my BatteryCell's   cellParemeter , how can do that?


c:/test/myfile.mo

record Test1Parameters
  extends Modelica_EnergyStorages.CellRecords.LinearDynamicImpedance.LinearDynamicImpedanceParameters(SOCOCV = Modelica_EnergyStorages.CellRecords.Components.SOCOCV(OCVtableOnFile = true, OCVtableName = "soclist", OCVfileName = "C:/oki/soc.txt"), capacity = Modelica_EnergyStorages.CellRecords.Components.ChargeCapacity(C0 = 40 * 3600), Rs = Modelica_EnergyStorages.CellRecords.Components.Resistance(R0 = 0.0001), RC = {Modelica_EnergyStorages.CellRecords.Components.RCelement(Rd = Modelica_EnergyStorages.CellRecords.Components.Resistance(R0 = 0.0001), Cd = Modelica_EnergyStorages.CellRecords.Components.Capacitance(C0 = 50000))});
  annotation(defaultComponentPrefixes = "parameter", Icon(graphics));
end Test1Parameters;

Re: import record or class from file

There are 0 guests and 0 other users also viewing this topic
You are here: