<< Clique para Mostrar o Sumário >>
Creating Algorithms for EPM Processor |
To implement an algorithm for use in EPM Processor, whether in production or simulation, this algorithm must be coded inside a function in Python language that, in this case, is named as an Application Method, or simply a Method.
The term Method comes from the paradigm of object-oriented programming, which refers to a function defined in a specific class.
For a function to be displayed as a Method in EPM Processor on the Applications settings, users must identify that function as such. This is performed by using a decorator, which is described later.
A Decorator is a term that designates a pattern of software project that allows dynamically aggregating additional functionality to a certain object.
The next image shows a flowchart to create and use a Method for Applications in EPM Processor.
Flowchart to create a Method
The libraries that must be used in the source code of a Method, one from EPM Processor and another one to access information and data from an EPM Server, must be imported according to the next code.
import epmprocessor as epr
import empwebapi as epm
These libraries provide all functionality used in the next topics.