8. i-SAS_ResponseKalmanFilter

8.1. interface

class response_kalman_filter.interface.Interface(instance_name, input_names, output_names, structural_model_name=None, **kwargs)

Bases: object

interface class of analysis solver

package_name = 'response_kalman_filter'
structural_model_required = False
__init__(instance_name, input_names, output_names, structural_model_name=None, **kwargs)

initialization of interface class of analysis solver

Parameters
  • instance_name (str) – instance name.

  • input_names (dict) – dict whose keys are names of input quantity and values are names of input data.

  • output_names (dict) – dict whose keys are names of output quantity and values are names of output data.

  • structural_model_name (str, optional) – structural model name.

  • **kwargs – Arbitrary keyword arguments.

Example

>>> input_names = {'strain': ['rosette_strain_x', 'rosette_strain_y', 'rosette_strain_xy']}
>>> output_names = {'displacement': ['analysis_displacement_z'], 'stress':['analysis_stress_x']}
>>> interface = Interface(input_names, output_names, 'beam')
set_project(project_name)
Parameters

project_name (str) – project name.

set_model(sensing_output_metadata, analysis_output_metadata, structural_models=None, sensor_structural_model_connections=None, analysis_structural_model_connections=None, streaming=False)

set structural model

Parameters
  • sensing_output_metadata (pd.DataFrame) – metadata of sensing output.

  • analysis_output_metadata (pd.DataFrame) – metadata of analysis output.

  • structural_models (dict, optional) – structural model.

  • sensor_structural_model_connections (dict, optional) – connections between sensor and structural model.

  • analysis_structural_model_connection (dict, optional) – connections between analysis and structural model.

  • streaming (bool, optional) – if true, run as structural_analysis.

Returns

static data to be exported.

Return type

dict

__call__(input_data)

calculate quantity of state

Parameters

input_data (dict) – data calculated before

Returns

containing:

dict: analysis results. pandas.DataFrame: timestamp used. The length is the same as analysis results.

Return type

tuple

exit()

exit solver

8.2. model

class response_kalman_filter.model.Model(input_names, output_names, structural_model_name, cfg)

Bases: object

model class

coord_sys = {'new_strain': 'local'}
__init__(input_names, output_names, structural_model_name, cfg)

constructor

Parameters
  • input_names (dict) – dict whose keys are names of input quantity and values are names of input data.

  • output_names (dict) – dict whose keys are names of output quantity and values are names of output data.

  • structural_model_name (str, optional) – structural model name.

  • cfg (dict) – config.

set_model(sensing_output_metadata, analysis_output_metadata, structural_models, sensor_structural_model_connections, analysis_structural_model_connections, streaming)

set model and calculate intermediate values

Parameters
  • sensing_output_metadata (pd.DataFrame) – metadata of sensing output.

  • analysis_output_metadata (pd.DataFrame) – metadata of analysis output.

  • structural_models (dict) – structural model.

  • sensor_structural_model_connections (dict) – connections between sensor and structural model.

  • analysis_structural_model_connection (dict) – connections between analysis and structural model.

  • streaming (bool) – if true, run as structural_analysis.

function(input_data)

example function

Parameters

input_data (dict) – input data.

Returns

output data.

Return type

dict

__call__(data)

calculate results from input using functions

Parameters

data (dict) – input data.

Returns

containing followings,
dict: result data. the key is output_quantity_name, and the value is the list, which

has data value (the type is pandas.DataFrame) as element corresponding to its data name.

dict: used timestamp for each input data. Dict has two keys, ‘s’ as strating timestamp and

’e’ as end time stamp, and the value is 1d-array of the timestamp used to caclulate output, whose length is the same as the length of output.

Return type

tuple