Coverage for teaser/logic/simulation/modelicainfo.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2025-04-29 16:01 +0000

1# created November 2015 

2# by TEASER4 Development Team 

3 

4 

5class ModelicaInfo: 

6 """ModelicaInfo Class 

7 

8 This class holds information specific for Modelica Simulation. Some of 

9 these solver or flags might only be applicable to Dymola. 

10 

11 

12 Attributes 

13 ---------- 

14 

15 start_time : int [s] 

16 Start time for the simulation, default 0 

17 stop_time : int [s] 

18 Stop time for the simulation, default 31536000 

19 interval_output : str [s] 

20 Interval for one time step, default 3600 for one hour 

21 solver : list 

22 list of available solvers for Modelica 

23 current_solver : str 

24 solver that should be used in simulation, default 'Radau' 

25 equidistant_output : bool 

26 Use of Equidistant time grid flag in Modelica. 

27 variables_at_events : bool 

28 Use of events flag in Modelica. 

29 version : str 

30 Version of Modelica and Modelica Standard Library 

31 """ 

32 

33 def __init__(self): 

34 """Constructor of ModelicaInfo Class. 

35 """ 

36 

37 # Base-Values for the simulation tab 

38 self.start_time = 0 

39 self.stop_time = 31536000 

40 self.interval_output = "3600" 

41 self.solver = ["Lsodar", "dassl", "Radau", "Cvode"] 

42 self.current_solver = "Cvode" 

43 self.equidistant_output = True 

44 self.results_at_events = False 

45 self.version = "4.0.0"