What is Gekko composed of?

<< Click to Display Table of Contents >>

Navigation:  Introduction >

What is Gekko composed of?

Previous pageReturn to chapter overviewNext page

As mentioned in the above section, Gekko is composed of a graphical user interface (GUI), and an engine to run Gekko command files (or interactive input lines) and models. This is, however, a rather simplified explanation. So to provide a fuller picture, some of the core parts of Gekko 3.0 are listed below:

 

Graphical user interface (with tabs 'Main', 'Output' and 'Menu').

An engine to run command files (includes parser, C# emitter, and compiler). Parsing is done with ANTLR.

An engine to solve models (also includes parser, C# emitter, and compiler). Parsing is also done with ANTLR. There is in-built caching of models on the user's hard disk, so that known models can be loaded quickly.

Timeseries component (Series class) for dealing with timeseries and their data. A GekkoTime component deals with dates in different frequencies (and iterating on those). In Gekko, a timeseries variable has no prefix symbol, and could be for instance x.

Scalar variable components: the variable types value, date, and string. In Gekko, these variable types have prefix symbol %, like for instance %x.

Collection components: the variable types list, map and matrix. In Gekko, these variable types have prefix symbol #, like for instance #x.

All variable types (timeseries, value, date, string, list, map and matrix) implement the IVariable interface.

Databank components. The databanks store variables, and the databank file format is transparent, open-source and fast (zipped protobuf-files, using the external .NET component protobuf-net.dll).

Graphing functionality by means of embedded gnuplot engine

Interface to Excel, for reading and writing spreadsheets. The Excel interface is either 'internal' (using an external .NET component EPPlus.dll or using so-called interop (PIA) to interact with Excel). Clipboard and .csv files can be used to interface to other spreadsheet software.

Tabelling and menu facilities, using text or html to show the tables/menus.

Decomposition window (DECOMP), with many possibilities for analyzing equations or expressions. Equation browser available (DISP).

Windows to show active/open databanks and run status of command files.

Basic linear regression (OLS).  

Seasonal adjustment via call of external .exe file (x12a.exe).

Light-weight interfaces to R and Python.

Read/write of GAMS gdx files via external .NET component (GAMS.net4.dll, GAMS needs to be installed in a trial version).

Capabilities regarding the Apache Arrow format for exchange of tabular data.

Basic interface to a particular online databank (statistikbanken.dk: more general interfaces to online databanks to be expected)

The so-called 'Gekcel' sub-project. Gekcel allows the user to issue Gekko commands from within Excel, where Gekko components are called silently (without opening up the Gekko graphical user interface). From within Excel, and without opening up Gekko, the user can for instance read a Gekko databank and print out timeseries shown in Excel cells. Gekcel uses the external .NET component ExcelDNA, cf. this page.

 

As mentioned before, this version of the source code documentation focuses on the engine that runs commands, particularly on how this engine handles variables and expressions containing variables of different types. Model solving is a complex component, too, but still can be more readily envisioned as a kind of black box that solves a particular set of equations given a particular databank. In the section on model solving there are more details, and of course it is very important that the model solver and its corresponding source code is reliable. But still, the model solver can be thought of as a tool that solves a given problem, and in principle another tool could be plugged in (for example a GAMS solver).