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

        Returns:

            extensions_dict --
                A dictionary containing the experiment extensions.

        Example::

            fmu = model.compile().wait()
            simulation_options = custom_function.get_simulation_options()
                .with_values(ncp=500)
            solver_options = {'atol':1e-8}
            simulate_ext = SimpleExperimentExtension(
            {'start_time': 0.0, 'final_time': 4.0},
            solver_options,
            simulation_options,
            ).with_modifiers({'PI.k': 40})
            simulate_ext.to_dict()
        """
        ext_dict = {}
        if self.variable_modifiers:
            ext_dict["modifiers"] = {"variables": self.variable_modifiers}

        if self._parameter_modifiers:
            ext_dict.setdefault("analysis", {})
            ext_dict["analysis"]["parameters"] = self._parameter_modifiers

        if self._solver_options:
            ext_dict.setdefault("analysis", {})
            ext_dict["analysis"]["solverOptions"] = self._solver_options

        if self._simulation_options:
            ext_dict.setdefault("analysis", {})
            ext_dict["analysis"]["simulationOptions"] = self._simulation_options

        if self._simulation_log_level:
            ext_dict.setdefault("analysis", {})
            ext_dict["analysis"]["simulationLogLevel"] = self._simulation_log_level

        return ext_dict
Returns the experiment extensions as a dictionary.

        Returns:

            extensions_dict --
                A dictionary containing the experiment extensions.

        Example::

            fmu = model.compile().wait()
            simulation_options = custom_function.get_simulation_options()
                .with_values(ncp=500)
            solver_options = {'atol':1e-8}
            simulate_ext = SimpleExperimentExtension(
            {'start_time': 0.0, 'final_time': 4.0},
            solver_options,
            simulation_options,
            ).with_modifiers({'PI.k': 40})
            simulate_ext.to_dict()
        
Returns the experiment extensions as a dictionary.
Returns the experiment extensions as a dictionary .
def to_dict(self):
        ext_dict = {}
        if self.variable_modifiers:
            ext_dict["modifiers"] = {"variables": self.variable_modifiers}
        if self._parameter_modifiers:
            ext_dict.setdefault("analysis", {})
            ext_dict["analysis"]["parameters"] = self._parameter_modifiers
        if self._solver_options:
            ext_dict.setdefault("analysis", {})
            ext_dict["analysis"]["solverOptions"] = self._solver_options
        if self._simulation_options:
            ext_dict.setdefault("analysis", {})
            ext_dict["analysis"]["simulationOptions"] = self._simulation_options
        if self._simulation_log_level:
            ext_dict.setdefault("analysis", {})
            ext_dict["analysis"]["simulationLogLevel"] = self._simulation_log_level
        return ext_dict
def to_dict ( self ) : ext_dict = { } if self . variable_modifiers : ext_dict [ "modifiers" ] = { "variables" : self . variable_modifiers } if self . _parameter_modifiers : ext_dict . setdefault ( "analysis" , { } ) ext_dict [ "analysis" ] [ "parameters" ] = self . _parameter_modifiers if self . _solver_options : ext_dict . setdefault ( "analysis" , { } ) ext_dict [ "analysis" ] [ "solverOptions" ] = self . _solver_options if self . _simulation_options : ext_dict . setdefault ( "analysis" , { } ) ext_dict [ "analysis" ] [ "simulationOptions" ] = self . _simulation_options if self . _simulation_log_level : ext_dict . setdefault ( "analysis" , { } ) ext_dict [ "analysis" ] [ "simulationLogLevel" ] = self . _simulation_log_level return ext_dict
Returns the experiment extensions as a dictionary.
Returns the experiment extensions as a dictionary .
"""Returns the experiment extensions as a dictionary.

        Returns:

            extensions_dict --
                A dictionary containing the experiment extensions.

        Example::

            fmu = model.compile().wait()
            simulation_options = custom_function.get_simulation_options()
                .with_values(ncp=500)
            solver_options = {'atol':1e-8}
            simulate_ext = SimpleExperimentExtension(
            {'start_time': 0.0, 'final_time': 4.0},
            solver_options,
            simulation_options,
            ).with_modifiers({'PI.k': 40})
            simulate_ext.to_dict()
        """
extensions_dict
A dictionary containing the experiment extensions.
extensions_dict A dictionary containing the experiment extensions .
self