Jump to content

João Marabisa

  • Content Count

  • Joined

  • Last visited

About João Marabisa

  • Rank

Profile Information

  • Are you University user?

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi Thinh, If you take a look at the C, Oml and Python Custom Blocks, you will se that they have a similar structure, telling about these flags and logics. Basically the flag is the way that the simulator tells the block what operation needs to performe (usually these jobs consists in updating some of the fiels of the block structure). Regarding to Initialization, generally speaking it is not used (once the states are usually initializated during evaluation), unless you have to read an write data from files on this code, or even if you require dinamically allocated memory. With respect to Reinitialize, you should think that right after the initialization, the inputs to the block may change from one call to the next, and this state it imposes constraints at the initial time, if successful, these call lead to the convergence of the states and inputs. In the Terminate, the simulator calls each block's computational function, this is useful to flush buffered data for closing files that have been opened by blocks ate the beginning or during the simulation. Finally, the OutputData requests the output of the block! As you can see, this explatation is more based on "internal" computational functions, what I'd like to tell you that, depending on your model (mostly of them) you can simulate just using OutputData. I'm attaching an example model that you can see it. Hope this helps. Median_PY_unmasked.scm
  • Create New...