Difference between revisions of "Graph Term"

From Numerus
Jump to navigation Jump to search
Line 10: Line 10:
File:AnnotGraphTerm.png|Figure 2: Annotated Graph Term
File:AnnotGraphTerm.png|Figure 2: Annotated Graph Term
</gallery>
</gallery>
===Features===
{|class="wikitable"
{|class="wikitable"
|-
|-
Line 25: Line 26:
* '''Extrapolated''': Domain values outside the specified domain are extrapolated from the slope of the first or last pair of graph points. (For continuous and discrete function domain values assume the first or last range value).
* '''Extrapolated''': Domain values outside the specified domain are extrapolated from the slope of the first or last pair of graph points. (For continuous and discrete function domain values assume the first or last range value).
|-
|-
|Save CSV/TSV || A graph function constructed using the interface can be saved to a CSV or TSV file. The choice of delimiter depends on the ".csv" or ".tsv" extension. The format depends on the choice or row or column orientation and is described below.
|Save CSV/TSV || A graph function constructed using the interface can be saved to a CSV or TSV file. The choice of delimiter depends on the choice of ".csv" or ".tsv" extension. The format depends on the choice or row or column orientation and is described below.
|}
|}
=== Loading CSV/TSV Data ===

Revision as of 19:12, 2 September 2018

Overview

A Graph Term is a special type of Term in which values are determined by a function from the current time (or from the value of another term) to real values. Graph Terms allow you to incorporate real-world data into your models. You can import data in CSV form, use that data to build a function, then use the function in models you build in Numerus.

You create a Graph Term by selecting the Graph Function option on the Term properties panel, and then clicking on Edit Graph Function to specify the function.

Graph Function Edit Panel

A new Graph Function will open a panel with a function mapping all values to 0, as shown in Figure 1. Figure 2 shows an annotated Graph Term which is discussed below. (Click to enlarge). Functions can be defined either directly by clicking on the graph or entering data into the table of data points. Alternatively, a function can be defined by loading a CSV or TSV file.

Features

Function Domain Initially set to TIME(); alternatively it can reference another Term to define a composed function.
Minimum/Maximum Domain Values These should be kept at the start and end times of the simulation if TIME() is used for the domain.
Minimum/Maximum Range Values Choose accordingly to best represent the graph.
Number of Data Points Numerus will automatically partition the domain evenly for a function entered directly through the interface.
Function Type Select from:
  • Continuous: Range values between graph points are linearly interpolated.
  • Discrete: Range values map to the value corresponding to the previous graph point (i.e. step function)
  • Extrapolated: Domain values outside the specified domain are extrapolated from the slope of the first or last pair of graph points. (For continuous and discrete function domain values assume the first or last range value).
Save CSV/TSV A graph function constructed using the interface can be saved to a CSV or TSV file. The choice of delimiter depends on the choice of ".csv" or ".tsv" extension. The format depends on the choice or row or column orientation and is described below.

Loading CSV/TSV Data