![exit code 5 homer pro exit code 5 homer pro](https://www.homerenergy.com/products/pro/docs/latest/images/hmfile_hash_22f2ee2f.png)
The topics below have more details and examples for each function. The MatlabDispatch function makes changes to the simulation_state variable, which are read by HOMER for each time step.Įach MATLAB function must follow the syntax given above. For each time step, the simulation_state variable is updated in the MATLAB workspace, and the MatlabDispatch function is called. While the simulation_parameters variable is not changed throughout the simulation, the values in the simulation_state variable are changed in each time step to reflect how the system is operating. Any errors are reported in the HOMER user interface. Finally, after all the time steps are simulated, HOMER calls MatlabEndSimulation. Steps 6, 7, and 8 are repeated until all the time steps are simulated.ĩ. HOMER updates the values in simulation_state for the new time step. HOMER reads the new values set by MatlabDispatch in the simulation_state variable and simulates the time step according to these dispatch commands.Ĩ. HOMER runs the command for MatlabDispatch in MATLAB.ħ. HOMER creates the simulation_state variable and sends it to MATLAB.Ħ. The custom_variables variable is left in the MATLAB workspace so it is accessible by all the following MATLAB function calls.ĥ. If myErr contains an error, HOMER may stop the simulation or the entire calculation as described in MatlabStartSimulation.Ĥ. HOMER gets the myErr variable back from MATLAB. HOMER runs the MatlabStartSimulation command in MATLAB.ģ.
#EXIT CODE 5 HOMER PRO PRO#
The HOMER Pro MATLAB Link Controller opens an instance of MATLAB and sends the simulation_parameters variable to the MATLAB workspace.Ģ. To run a simulation with the MATLAB Link, HOMER performs the following steps:ġ. HOMER calls these three commands before, during, and after the simulation. MyErrs = MatlabEndSimulation(simulation_parameters, custom_variables) = MatlabDispatch(simulation_parameters, simulation_state, custom_variables) = MatlabStartSimulation(simulation_parameters)
![exit code 5 homer pro exit code 5 homer pro](https://i.pinimg.com/originals/8c/b4/ea/8cb4eaae7176620c0f40e79ba4d71cf4.jpg)
The functions must use the following syntax exactly:
#EXIT CODE 5 HOMER PRO HOW TO#
Specify the location and name of these files in HOMER on the Controller page so that it knows how to run your functions. Place the three M-files together in a directory. You need three MATLAB functions, each in a separate M-file. A HOMER Pro MATLAB Link Controller created on the Controller Set Up page, with the settings described below MATLAB Functions.Three MATLAB functions described below (these comprise your custom algorithm example M-files are included below).32-bit/64-bit version of MATLAB installed and licensed.In order to run a simulation with your own MATLAB dispatch algorithm you need to have:
![exit code 5 homer pro exit code 5 homer pro](https://i.ytimg.com/vi/ttohfbia-Ys/hqdefault.jpg)
#EXIT CODE 5 HOMER PRO SOFTWARE#
HOMER interacts with the MATLAB software to run your MATLAB functions during the simulation. The HOMER Pro MATLAB Link allows you to write your own dispatch algorithm for HOMER Pro using MATLAB. With version 3.10, MATLAB Link users can pass additional variables to their dispatch. Note: With version 3.9, MATLAB Link works with both 32-bit and 64-bit MATLAB.