Simulation Input Configuration
The creation of Simulink.SimulationInput objects is the whole purpose of the Parameter and Buses Configuration. These objects encapsulate all information necessary to execute a simulation, including the general settings of the Simulink model, the parameters used in the subsystem functions, the Simulink.Bus objects, and the BusesTemplates structure. This page gives a quick overview of how these objects are created in SADYCOS.
Page Contents
Process
The third static method that the configuration class’ constructor calls after configureParameters and configureBuses is configureSimulationInputs. Its purpose is to take the outputs of the previous methods and use those to prepare Simulink.SimulationInput objects that can easily be used to run a simulation using MATLAB’s sim function. In contrast to the other two, this method is not abstract but already has a default implementation in the SimulationConfiguration superclass. All it does is call another method createSimulationInputs which is responsible for turning the parameter cell array and BusesInfo array into an array of Simulink.SimulationInput objects.
In general, the user should never need to directly alter the Simulink.SimulationInput objects. All configuration can be done by creating different parameters and buses in the configureParameters and configureBuses methods. If for some reason it is desired to directly change the Simulink.SimulationInput objects, the user can only do so by overriding the configureSimulationInputs method in their configuration class.
Simulation Input Creation
After creating an array of Simulink.SimulationInput objects according to the number of elements the parameters_cells array, the createSimulationInputs method carries out these three tasks for each object:
- Apply the general settings of the Simulink model to the
Simulink.SimulationInputobject. - Remove the field
Settingsfor the general settings from theParametersstructure. - Store the remaining
Parametersstructure, theBusTemplatesstructure, and theSimulink.Busobjects in theSimulink.SimulationInputobject.