-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathassimulo_interface_fmi2.pxd
More file actions
47 lines (41 loc) · 1.94 KB
/
assimulo_interface_fmi2.pxd
File metadata and controls
47 lines (41 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2014-2025 Modelon AB
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import numpy as np
cimport numpy as np
np.import_array()
import logging
cimport pyfmi.fmi2 as FMI2
from assimulo.problem cimport cExplicit_Problem
cdef class FMIODE2(cExplicit_Problem):
"""
An Assimulo Explicit Model extended to FMI2 interface.
"""
cdef public int _f_nbr, _g_nbr, _input_activated, _extra_f_nbr, jac_nnz, input_len_names
cdef public object _model, problem_name, result_file_name, __input, _A, debug_file_name, debug_file_object
cdef public object export, _sparse_representation, _with_jacobian, _logging, _write_header, _start_time
cdef public dict timings
cdef public np.ndarray y0, input_real_mask, input_other_mask
cdef public list input_names, input_real_value_refs, input_other, _logg_step_event
cdef public double t0, _synchronize_factor
cdef public jac_use, state_events_use, time_events_use
cdef public FMI2.FMUModelME2 model_me2
cdef public int model_me2_instance
cdef public np.ndarray _state_temp_1, _event_temp_1
cdef int _logging_as_dynamic_diagnostics
cdef int _number_of_diagnostics_variables
cpdef _set_input_values(self, double t)
cdef _update_model(self, double t, np.ndarray[double, ndim=1, mode="c"] y)
cdef int _compare(self, double t, np.ndarray[double, ndim=1, mode="c"] y)