The ECOMOD system (Fig. 1) is an end-to-end processor of agent models and the output of optimality conditions for them, implemented in Python. The SymPy library is used as the main tool to convert symbolic expressions and check their correctness. External interfaces to work with the system, such as LaTeX, are also integrated. As subsystems, ECOMOD contains :

Figure 5: General system diagram.
User interface
Native Python
You are allowed to describe models using the native Python interface and use the system as a python-library in exploring your models and developing them further. Development patterns are based on Sympy abstractions and can interpreted as extension of Sympy library. Sympy representation of model is used to transfer information within the system. All other representations are translated with appropriate processing modules to this data model.
LaTeX
You are allowed to describe models by passing LaTeX structure files as agent models. The internal structure of the file must be represented in YAML format (JSON-like). Such a representation is convenient, when operating the system as a black box, which will derive the optimality conditions for the economic model. The system in this case will perform a standard set of calculations to derive the optimality conditions. The output can also be presented as a LaTeX file assembled with jinja2 from a template, or as a human-readable PDF compiled from that file.
Hypergraph GUI
You can also visualize the model as a hypergraph where the vertices correspond to agents and the edges correspond to the flows between the agents. The hypernetx library is responsible for the visualization process. The add-on plans to provide the ability to simulate systems using an interactive interface HyperGraph UI.

Figure 7: All entry points into the system
This section will describe two modules of the system: ECOMOD Core - output of optimality conditions based on SymPy symbolic algebra system and Support system - validation of agent models.

Figure 8: Scheme of the derivation of optimality conditions.
Before outputting optimality conditions with the function, you need to pass the validation of the model. The validation module is written in SymPy with the help of the expression dimensional checker that was actually written. The model validation consists of two parts: