Modeling statements overview

<< Click to Display Table of Contents >>

Navigation:  Gekko User Manual > Gekko statements > Statements overview >

Modeling statements overview

Previous pageReturn to chapter overviewNext page

Note: You may consult the general overview regarding all statements here:

General statement overview

 

Introduction

 

Below, the different Gekko simulation related statements are listed, grouped together by functionality (regarding functions, see the section on these: 'Gekko functions'). The statements listed below are the core statements regarding model simulation. When modeling, you may use sim-mode (cf. MODE), which is focused on solving models, comparing scenarios etc.

 

Databanks

 

At startup, Gekko operates with two databanks; 'Work' (first-position, working bank) and 'Ref' (reference bank). There are the following statements related to databanks:

 

READ

Reads a databank file (typically gbk) into the first-position and reference databanks.

WRITE

Writes the first-position databank to a gbk file

IMPORT

Merges a databank file (typically non-gbk) into the first-position databank

EXPORT

Writes the first-position databank to a non-gbk file

CLONE

Makes the reference databank an exact copy of the first-position databank.

COMPARE

Finds differences between the first-position and reference databanks.

FINDMISSINGDATA

This statement finds timeseries with missing values.

HDG

Inserts a heading (description) into a gbk databank

 

 

Timeseries

 

Timeseries exist as objects in a databank. Frequency can be annual, quarterly, monthly, weekly, daily or undated.

 

TIME

Sets global time for timeseries operations.

TIMEFILTER

Omits or averages certain periods in output

CREATE

Create a new timeseries

DELETE

Delete an existing timeseries

SERIES

Transform a timeseries using mathematical expressions or data values

 

 

Lists, scalars, matrices etc.

 

Gekko can put names of timeseries into a list, in order to reuse the list for different purposes (or make the program file easier to read). In addition, scalar variables like strings, dates and values can be used.

 

LIST        

Create and delete lists

DATE

Scalar variable of date type

STRING

Scalar variable of string type

VAL

Scalar variable of value type

MEM

Shows a list of scalar variables and their values

                 

 

Show data

 

Gekko can show data in several ways, including printing on the screen, graphs, or showing the data in an Excel sheet. In addition, there is a special table-like decomposition window (DECOMP). The DISP statement also functions as an in-built equation browser. You may prefix a variable with '@' to indicate the reference (baseline) databank, for instance @gdp. Or else use colon to indicate a databank, for instance mybank:gdp.

 

PRT

Prints timeseries or expressions in different ways

MULPRT

Prints multipliers: differences between the first-position and reference databanks.

DISP

Prints info regarding timeseries, and starts equation browser

PLOT

Show a graph of timeseries (using gnuplot)

SHEET

Like PRT, but shows timeseries data in Excel

CLIP

Like PRT, but puts timeseries data on the Windows clipboard

DECOMP

Decompose an equation

FIND

Find a variable in equations

FLOW

Show a flowgraph corresponding to a DECOMP statement

TELL

Prints text strings on the screen

                                 

         

Model

 

A model can be loaded directly from a .frm file. After the model is loaded, a number of statements can be used:

 

MODEL

Load, parse and compile a model from file.

SIM

Simulates the model (also if there are goals/means)

ENDO

Endogenize variables (means)

EXO        

Exogenize variables (goals)

UNFIX

Removes ENDO/EXO goals/means.

PREDICT

Single-equation prediction

CHECKOFF

Skip convergence check for chosen variables (Gauss)

ITERSHOW

Show iterations in detail for chosen variable (Gauss)

SIGN

For signing models with signatures.

         

         

Gekko program files

 

Larger tasks can be run by means of program files (.gcm). There are the following statements related to such files:

 

RUN

Runs a .gcm program file. Use the EDIT statement to edit these files.

PIPE

Direct output to an external file instead of screen

INI

Runs gekko.ini if located in the program and/or working folder

 

 

Cleanup

 

The principal cleanup-statement is the following

 

RESTART

Clears all databanks, lists, scalars, models, etc. and runs any gekko.ini files.

RESET

Same as RESTART, but without running any gekko.ini files.

CLEAR

Clearing databanks

CLOSEALL

Closes all 'named' databanks, and clears Work and Ref.

CLS        

Clears main window (short for 'clear screen')

CUT

Closes all PLOT or DECOMP windows

 

 

Control flow

 

Gekko supports basic control flow like loops, conditional statements etc. At the moment the possibilities are quite limited, but will be augmented as the software matures.

 

RETURN

Returns from the program file.

STOP

Stops execution completely.

EXIT

Stops execution completely, and terminates Gekko.

ACCEPT

Input data interactively

PAUSE

Waiting for the user to click [Enter]

                 

 

Tables/menus

 

TABLE

Prints out a predefined table (xml)

MENU

Opens up a menu (html)

 

 

Miscellaneous

 

The following statements did not fall into the above categories, and so are gathered here:

 

MODE

Set Gekko mode to sim/data/mixed

HELP

Access the help system

OPTION

Sets different options

GEKKO

Indicate a particular Gekko version

EDIT

Edit a file via Notepad

XEDIT

Edit a xml file via XML Notepad.

SYS        

Access the system shell if needed

TRANSLATE

Translates syntax from Gekko 1.8 or AREMOS

 

 

From the menu items (‘Utilities’), you can also compare two databanks, check residuals, and compare variables in model/databank/varlist.