modelon/impact/client/experiment_definition.py
def to_dict(self):
        """Returns the experiment definition as a dictionary.

        Returns:

            definition_dict --
                A dictionary containing the experiment definition.

        Example::

            model = workspace.get_model("Modelica.Blocks.Examples.PID_Controller")
            simulation_options = custom_function.get_simulation_options()
                .with_values(ncp=500)
            solver_options = {'atol':1e-8}
            simulate_def = model.new_experiment_definition(
                custom_function,
                solver_options=solver_options,
                simulation_options=simulation_options
            )
            simulate_def.to_dict()
        """

        return {
            "experiment": {
                "version": 2,
                "base": {
                    "model": {
                        "modelica": {
                            "className": self.model.name,
                            "compilerOptions": self._compiler_options,
                            "runtimeOptions": self._runtime_options,
                            "compilerLogLevel": self._compiler_log_level,
                            "fmiTarget": self._fmi_target,
                            "fmiVersion": self._fmi_version,
                            "platform": self._platform,
                        }
                    },
                    "modifiers": {"variables": self.variable_modifiers},
                    "analysis": {
                        "type": self.custom_function.name,
                        "parameters": self.custom_function.parameter_values,
                        "simulationOptions": self._simulation_options,
                        "solverOptions": self._solver_options,
                        "simulationLogLevel": self._simulation_log_level,
                    },
                },
                "extensions": [ext.to_dict() for ext in self.extensions],
            }
        }
Returns the experiment definition as a dictionary.

        Returns:

            definition_dict --
                A dictionary containing the experiment definition.

        Example::

            model = workspace.get_model("Modelica.Blocks.Examples.PID_Controller")
            simulation_options = custom_function.get_simulation_options()
                .with_values(ncp=500)
            solver_options = {'atol':1e-8}
            simulate_def = model.new_experiment_definition(
                custom_function,
                solver_options=solver_options,
                simulation_options=simulation_options
            )
            simulate_def.to_dict()
        
Returns the experiment definition as a dictionary.
Returns the experiment definition as a dictionary .
def to_dict(self):
        return {
            "experiment": {
                "version": 2,
                "base": {
                    "model": {
                        "modelica": {
                            "className": self.model.name,
                            "compilerOptions": self._compiler_options,
                            "runtimeOptions": self._runtime_options,
                            "compilerLogLevel": self._compiler_log_level,
                            "fmiTarget": self._fmi_target,
                            "fmiVersion": self._fmi_version,
                            "platform": self._platform,
                        }
                    },
                    "modifiers": {"variables": self.variable_modifiers},
                    "analysis": {
                        "type": self.custom_function.name,
                        "parameters": self.custom_function.parameter_values,
                        "simulationOptions": self._simulation_options,
                        "solverOptions": self._solver_options,
                        "simulationLogLevel": self._simulation_log_level,
                    },
                },
                "extensions": [ext.to_dict() for ext in self.extensions],
            }
        }
def to_dict ( self ) : return { "experiment" : { "version" : 2 , "base" : { "model" : { "modelica" : { "className" : self . model . name , "compilerOptions" : self . _compiler_options , "runtimeOptions" : self . _runtime_options , "compilerLogLevel" : self . _compiler_log_level , "fmiTarget" : self . _fmi_target , "fmiVersion" : self . _fmi_version , "platform" : self . _platform , } } , "modifiers" : { "variables" : self . variable_modifiers } , "analysis" : { "type" : self . custom_function . name , "parameters" : self . custom_function . parameter_values , "simulationOptions" : self . _simulation_options , "solverOptions" : self . _solver_options , "simulationLogLevel" : self . _simulation_log_level , } , } , "extensions" : [ ext . to_dict ( ) for ext in self . extensions ] , } }
Returns the experiment definition as a dictionary.
Returns the experiment definition as a dictionary .
"""Returns the experiment definition as a dictionary.

        Returns:

            definition_dict --
                A dictionary containing the experiment definition.

        Example::

            model = workspace.get_model("Modelica.Blocks.Examples.PID_Controller")
            simulation_options = custom_function.get_simulation_options()
                .with_values(ncp=500)
            solver_options = {'atol':1e-8}
            simulate_def = model.new_experiment_definition(
                custom_function,
                solver_options=solver_options,
                simulation_options=simulation_options
            )
            simulate_def.to_dict()
        """
definition_dict
A dictionary containing the experiment definition.
definition_dict A dictionary containing the experiment definition .
self