Linux GNU 11.4.0 Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 1 / 0 / 1
Functions: -% 0 / 1 / 1
Branches: -% 0 / 0 / 0

OMCompiler/SimulationRuntime/cpp/Core/SimController/ISimController.h
Line Branch Exec Source
1 /*
2 * This file belongs to the OpenModelica Run-Time System
3 *
4 * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), c/o Linköpings
5 * universitet, Department of Computer and Information Science, SE-58183 Linköping, Sweden. All rights
6 * reserved.
7 *
8 * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF THE BSD NEW LICENSE OR THE
9 * AGPL VERSION 3 LICENSE OR THE OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. ANY
10 * USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S
11 * ACCEPTANCE OF THE BSD NEW LICENSE OR THE OSMC PUBLIC LICENSE OR THE AGPL
12 * VERSION 3, ACCORDING TO RECIPIENTS CHOICE.
13 *
14 * The OpenModelica software and the OSMC (Open Source Modelica Consortium) Public License
15 * (OSMC-PL) are obtained from OSMC, either from the above address, from the URLs:
16 * http://www.openmodelica.org or https://github.com/OpenModelica/ or
17 * http://www.ida.liu.se/projects/OpenModelica, and in the OpenModelica distribution. GNU
18 * AGPL version 3 is obtained from: https://www.gnu.org/licenses/licenses.html#GPL. The BSD NEW
19 * License is obtained from: http://www.opensource.org/licenses/BSD-3-Clause.
20 *
21 * This program is distributed WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY
23 * SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF
24 * OSMC-PL.
25 *
26 */
27
28 #pragma once
29 /** @addtogroup coreSimcontroller
30 *
31 * @{
32 */
33
34 struct SimSettings
35 {
36 string solver_name;
37 string linear_solver_name;
38 std::vector<string> nonlinear_solver_names;
39 double start_time;
40 double end_time;
41 double step_size;
42 double lower_limit;
43 double upper_limit;
44 double tolerance;
45 string outputfile_name;
46 unsigned int timeOut;
47 OutputPointType outputPointType;
48 LogSettings logSettings;
49 bool nonLinearSolverContinueOnError;
50 int solverThreads;
51 OutputFormat outputFormat;
52 EmitResults emitResults;
53 string variableFilter;
54 string inputPath;
55 string outputPath;
56 };
57
58 /**
59 * SimController to start and stop the simulation
60 */
61 40 class ISimController
62 {
63
64 public:
65
66 virtual ~ISimController() {};
67 virtual weak_ptr<IMixedSystem> LoadSystem(string modelLib,string modelKey) = 0;
68 virtual weak_ptr<IMixedSystem> LoadModelicaSystem(PATH modelica_path,string modelKey) = 0;
69 virtual void Start(SimSettings simsettings, string modelKey)=0;
70 virtual shared_ptr<IMixedSystem> getSystem(string modelname) = 0;
71 virtual shared_ptr<ISimObjects> getSimObjects() = 0;
72 virtual void StartReduceDAE(SimSettings simsettings,string modelPath, string modelKey, bool loadMSL, bool loadPackage)=0;
73 /**
74 * Stops the simulation
75 */
76 virtual void Stop() = 0;
77 };
78 /** @} */ // end of coreSimcontroller
79