daeDataReporter_t |
|
daeDataReporterLocal |
|
daeNoOpDataReporter |
|
daeDataReporterFile |
|
daeTEXTFileDataReporter |
|
daeBlackHoleDataReporter |
|
daeDelegateDataReporter |
daeDataReporter_t
¶Bases: Boost.Python.instance
Connect
((daeDataReporter_t)self, (str)connectionString, (str)processName) → bool¶Disconnect
((daeDataReporter_t)self) → bool¶IsConnected
((daeDataReporter_t)self) → bool¶StartRegistration
((daeDataReporter_t)self) → bool¶RegisterDomain
((daeDataReporter_t)self, (daeDataReporterDomain)domain) → bool¶RegisterVariable
((daeDataReporter_t)self, (daeDataReporterVariable)variable) → bool¶EndRegistration
((daeDataReporter_t)self) → bool¶StartNewResultSet
((daeDataReporter_t)self, (Float)time) → bool¶SendVariable
((daeDataReporter_t)self, (daeDataReporterVariableValue)variableValue) → bool¶EndOfData
((daeDataReporter_t)self) → bool¶ConnectString
¶Name
¶ProcessName
¶daeDataReporterLocal
¶Bases: pyDataReporting.daeDataReporter_t
Process
¶dictDomains
¶dictVariables
¶daeNoOpDataReporter
¶daeDataReporterFile
¶Bases: pyDataReporting.daeDataReporterLocal
WriteDataToFile
((daeDataReporterFile)self) → None¶daeTEXTFileDataReporter
¶Bases: pyDataReporting.daeDataReporterFile
WriteDataToFile
((daeTEXTFileDataReporter)self) → None¶daePlotDataReporter () |
Plots the specified variables using the Matplotlib library (by Caleb Hattingh). |
daeMatlabMATFileDataReporter () |
Saves data in Matlab MAT format format (.mat) using scipy.io.savemat function. |
daeExcelFileDataReporter () |
Saves data into the Microsoft Excel format (.xlsx) using the openpyxl library (https://openpyxl.readthedocs.io). |
daeJSONFileDataReporter () |
Saves data in JSON text format using the Python json library. |
daeXMLFileDataReporter () |
Saves data in XML format (.xml) using the Python xml library. |
daeHDF5FileDataReporter () |
Saves data in HDF5 format using the Python h5py library. |
daePandasDataReporter () |
Creates a dataset using the Pandas library (available as data_frame property - the Pandas DataFrame object). |
daeVTKDataReporter () |
Saves data in the binary VTK format (.vtr) using the pyEVTK module. |
daePickleDataReporter () |
Saves data as the Python pickle which can be opened in DAE Plotter |
daePlotDataReporter
[source]¶Bases: pyDataReporting.daeDataReporterLocal
Plots the specified variables using the Matplotlib library (by Caleb Hattingh).
Plot
(*args, **kwargs)[source]¶args
can be either:
Each arg
will get its own subplot. The subplots are all automatically
arranged such that the resulting figure is as square-like as
possible. You can however override the shape by supplying figRows
and figCols
as keyword args.
Basic Example:
# Create Log, Solver, DataReporter and Simulation object
log = daePythonStdOutLog()
daesolve = daeIDAS()
from daetools.pyDAE.data_reporters import daePlotDataReporter
datareporter = daePlotDataReporter()
simulation = simTutorial()
simulation.m.SetReportingOn(True)
simulation.ReportingInterval = 20
simulation.TimeHorizon = 500
simName = simulation.m.Name + strftime(" [%d.%m.%Y %H:%M:%S]", localtime())
if(datareporter.Connect("", simName) == False):
sys.exit()
simulation.Initialize(daesolver, datareporter, log)
simulation.m.SaveModelReport(simulation.m.Name + ".xml")
simulation.m.SaveRuntimeModelReport(simulation.m.Name + "-rt.xml")
simulation.SolveInitial()
simulation.Run()
simulation.Finalize()
datareporter.Plot(
simulation.m.Ci, # Subplot 1
[simulation.m.L, simulation.m.event], # Subplot 2 (2 sets)
simulation.m.Vp, # Subplot 3
[simulation.m.L, simulation.m.Vp] # Subplot 4 (2 sets)
)
daeMatlabMATFileDataReporter
[source]¶Bases: pyDataReporting.daeDataReporterFile
Saves data in Matlab MAT format format (.mat) using scipy.io.savemat function. Every variable is saved as numpy array (variable names are stripped from illegal characters). In addition, time and domain points for every variable are saved as ‘varName.Times’ and ‘varName.Domains’. Does not require Matlab installed.
daeExcelFileDataReporter
[source]¶Bases: pyDataReporting.daeDataReporterFile
Saves data into the Microsoft Excel format (.xlsx) using the openpyxl library (https://openpyxl.readthedocs.io). Does not require Excel installed and works on all operating systems.
daeJSONFileDataReporter
[source]¶Bases: pyDataReporting.daeDataReporterFile
Saves data in JSON text format using the Python json library.
daeXMLFileDataReporter
[source]¶Bases: pyDataReporting.daeDataReporterFile
Saves data in XML format (.xml) using the Python xml library. The numerical data are saved as json strings (for easier parsing).
daeHDF5FileDataReporter
[source]¶Bases: pyDataReporting.daeDataReporterFile
Saves data in HDF5 format using the Python h5py library. A separate group is created for every variable and contain the following data sets: - Values: multidimensional array with the variable values - Times: 1d array with the time points - DomainNames: names of the domains that the variable is distributed on - Domains: multidimensional array with the domain points - Units: variable units as a string
daePandasDataReporter
[source]¶Bases: pyDataReporting.daeDataReporterLocal
Creates a dataset using the Pandas library (available as data_frame property - the Pandas DataFrame object).
data_frame
¶daeVTKDataReporter
[source]¶Bases: pyDataReporting.daeDataReporterLocal
Saves data in the binary VTK format (.vtr) using the pyEVTK module. pyEVTK is included in the daetools installation (daetools.ext_libs.pyevtk). A separate file is written into the specified directory for every time point. In addition, the ‘variableName.visit’ files are written for use with the VisIt software. Notate bene:
Does not require VTK installed.
daePickleDataReporter
[source]¶Bases: pyDataReporting.daeDataReporterFile
Saves data as the Python pickle which can be opened in DAE Plotter or unpickled directly:
f = open(filename, 'rb')
process = pickle.load(f)
f.close()
where process is the dataReceiverProcess instance identical to the daeDataReceiverProcess objects used in the other data reporters below.
daeDataReporterRemote
¶Bases: pyDataReporting.daeDataReporter_t
SendMessage
((daeDataReporterRemote)self, (str)message) → bool¶daeTCPIPDataReporter
¶Bases: pyDataReporting.daeDataReporterRemote
SendMessage
((daeTCPIPDataReporter)self, (str)message) → bool¶daeBlackHoleDataReporter
¶Bases: pyDataReporting.daeDataReporter_t
Data reporter that does not process any data and all function calls simply return True
.
Could be used when no results from the simulation are needed.
daeDelegateDataReporter
¶Bases: pyDataReporting.daeDataReporter_t
A container-like data reporter, which does not process any data but forwards (delegates) all function calls
(Disconnect()
, IsConnected()
,
StartRegistration()
, RegisterDomain()
,
RegisterVariable()
, EndRegistration()
,
StartNewResultSet()
, SendVariable()
,
EndOfData()
) to data reporters in the containing list of data reporters.
Data reporters can be added by using the AddDataReporter()
.
The list of containing data reporters is in the DataReporters
attribute.
Connect
((daeDataReporter_t)self, (str)connectionString, (str)processName) → Boolean¶Does nothing. Always returns True
.
AddDataReporter
((daeDelegateDataReporter)self, (object)dataReporter) → None¶DataReporters
¶daeDataReporterDomain |
|
daeDataReporterVariable |
|
daeDataReporterVariableValue |
daeDataReporterDomain
¶Bases: Boost.Python.instance
Name
¶NumberOfPoints
¶Points
¶Type
¶Units
¶daeDataReceiver_t |
|
daeTCPIPDataReceiver |
|
daeTCPIPDataReceiverServer |
daeDataReceiver_t
¶Bases: Boost.Python.instance
Start
((daeDataReceiver_t)self) → bool¶Stop
((daeDataReceiver_t)self) → bool¶Process
¶daeTCPIPDataReceiver
¶Bases: pyDataReporting.daeDataReceiver_t
Start
((daeTCPIPDataReceiver)self) → bool¶Stop
((daeTCPIPDataReceiver)self) → bool¶Process
¶daeTCPIPDataReceiverServer
¶Bases: Boost.Python.instance
DataReceivers
¶IsConnected
((daeTCPIPDataReceiverServer)self) → bool¶Start
((daeTCPIPDataReceiverServer)self) → None¶Stop
((daeTCPIPDataReceiverServer)self) → None¶daeDataReceiverDomain |
|
daeDataReceiverVariable |
|
daeDataReceiverVariableValue |
|
daeDataReceiverProcess |
daeDataReceiverDomain
¶Bases: Boost.Python.instance
Coordinates
¶Name
¶NumberOfPoints
¶Points
¶Type
¶Units
¶daeDataReceiverVariable
¶Bases: Boost.Python.instance
AddDomain
((daeDataReceiverVariable)self, (daeDataReceiverDomain)domain) → None¶AddVariableValue
((daeDataReceiverVariable)self, (daeDataReceiverVariableValue)variableValue) → None¶Domains
¶Name
¶NumberOfPoints
¶TimeValues
¶Units
¶Values
¶daeDataReceiverVariableValue
¶Bases: Boost.Python.instance
__getitem__
((daeDataReceiverVariableValue)self, (int)index) → float¶__setitem__
((daeDataReceiverVariableValue)self, (int)index, (float)value) → None¶Time
¶daeDataReceiverProcess
¶Bases: Boost.Python.instance
Domains
¶FindVariable
((daeDataReceiverProcess)self, (str)variableName) → daeDataReceiverVariable¶Name
¶RegisterDomain
((daeDataReceiverProcess)self, (daeDataReceiverDomain)domain) → None¶RegisterVariable
((daeDataReceiverProcess)self, (daeDataReceiverVariable)variable) → None¶Variables
¶dictDomains
¶dictVariableValues
¶dictVariables
¶