Events

Getting started with the building blocks of Summit Event Language (SEL).

Welcome to learning how to build models using Summit! The good news is, if you know how to write formulas in a spreadsheet, you already know a lot. These guides will quickly cover the basics (familiar territory for any that has used a spreadsheet), and then move on to what's new and what makes the language inside Summit (Summit Event Language, or "SEL" for short) so tidy and powerful.

Events, the Building Blocks

An Event is a building block of a model in Summit. Since models are functional, you can also think of an Event as a function. Unlike most languages, Summit processes these functions based on an internal representation of time that is independent of clock time. In other words, events are interpreted by simulation, or flow.

When you define an event, you are defining a function that will run at a certain time, for a certain time (duration), and at a certain interval (once or recurring). This makes events excellent encapsulations of business activities that happen on a schedule.

Just like a function can be empty, all fields and attributes of an event are optional. For an event to be executed, however, it must have either a start date or be linked downstream of another event that has a start date, i.e. it must be triggered.

Lastly, and most important, events may also contain a series of instructions written in Summit Event Language, or SEL (rhymes with "cell"). Since events are essentially functions, SEL expressions are primarily responsible for declaring the behavior of the event when it's triggered.

๐Ÿ“˜

Events are Types?

When you're first learning a language, it's common to study its types. For a lot of languages, these are things like strings (words), numbers, arrays (lists), etc.

For Summit Event Language, the most useful types to learn are the different types of events available to you as a modeler. Each event has a special behavior. Learning how to chain these behaviors together is how you'll become proficient at SEL.

Return Values

Events can return numbers, strings, lists, or even objects (JSON). By "return", we mean they send those values to any events they point to using routes -- the lines and arrows on the canvas that connect events.

โ—๏ธ

Route values

You may notice that routes, when selected, have a small input field on them where you can enter a percentage (%). This is a feature that is being deprecated. As such, usage of this shortcut is not encouraged.

When a set of events (a model) is interpreted, you get model output. This output is a record of the internal state of each event immediately after it finishes executing. These measurements can be grouped by some time interval (most commonly a month) to see totals, averages, etc. over that period.


Whatโ€™s Next

Now that you've got an overview of events, let's dive into some examples!