Skip to content

Making Connections

isee systems blog

Making Connections

  • About
  • More Connections
Search

LOOKUPXY Built-in Increases Dataset Flexibility

Updated: March 25, 2009March 3, 2009Filed under: Modeling Tips66 Comments

Version 9.1.2 adds the ability to incorporate non-regularly sampled data easily into your models.  Many people use the graphical function for historical records of data.  The graphical function, however, assumes a fixed interval along the x-axis.  This can make it difficult to use data like the following:

Day Flow
1 12.1
3 7.6
4 15.2
6 13.5
9 23.8
12 17.3

While it is easy to determine the fixed interval to use to capture all of these points (1 day), it is more difficult to determine what data points to use for the missing intermediate 1-day values.  There are also many cases where it is very difficult to find a fixed interval that works for a given dataset.

Graphical Function Day
Graphical Function Day (click for full size)

The LOOKUPXY built-in was specifically added to address this issue.  It is unique in that it requires two separate graphical functions:  one for the x-coordinates of each pair and one for the y-coordinates of each pair.  The number of points in each graphical function should match; if they do not, extraneous points are ignored.  The data values (x-coordinates and y-coordinates) are both entered by the user as the y-values in each graphical function.  The x-values in each graphical function are ignored; only the number of points matter.  It is a good idea, though, to run the x-axis of both from one to the number of points.  That way, it is easy to verify that the values in each graphical function properly align with one another.  In addition, the x-coordinates should be in increasing order.  If they are not, however, the program will automatically readjust them when the model is first run.

Graphical Function Flow Data
Graphical Function Flow (click for full size)

The data above are entered into two graphical functions day and flow as shown at the right.  Note the equation for each graphical function is also unimportant.  It is always safe to use TIME (the default when you press “Become Graphical Function”).

The model is very simple:

Model Structure

The following equation for daily flow retrieves this data over the course of the simulation (topping out at 17.3 after time 12):

daily_flow = LOOKUPXY(day, flow, TIME)

Note the graphical function for the x-coordinates is given before the graphical function for the y-coordinates.  In addition, the graph of daily flow is necessarily different from what appears in the graphical function flow, which has the data points drawn at a fixed interval.

As with the graphical function, linear interpolation is used between the given points and out-of-range x-values evaluate to either the first or last y-coordinate, depending whether the value is below the minimum x-coordinate or above the maximum x-coordinate, respectively.  The discrete option is also available.  Make sure to set it in the variable containing the y-coordinates.  [Note that setting it in the variable containing the x-coordinates merely serves to drop the last point.]

Modeling Tips
  • builtins
  • graphical function
  • iThink/STELLA
  • lookupxy
  • Version 9.1.2

Post navigation

Previous Post:

Physics Textbook 2.0

Next Post:

“Thinking in Systems” book inspires online course

About the Author

Karim Chichakly

Co-President

All posts byKarim ChichaklyWebsite

Hide

Categories

  • Education (4)
  • isee NetSim (3)
  • isee.NET Framework (1)
  • Modeling Tips (32)
  • News & Announcements (15)
  • STELLA & iThink (14)
  • Stories from the Field (5)
  • Systems Thinking (8)
  • Training (6)

Archives

Browse by keyword

2D array archetypes arrays Barry Richmond Bass diffusion builtins calibration Causal Loop CLD command line conferences crisis data diffusion Education environment export game graphical function h1n1 healthcare housing import iThink/STELLA market dynamics MODSIM modules mortgage netsim optimization Physics policy price releases scholarship software spatial Stella storytelling System Dynamics Society Systems Thinking Version 9.1.2 video webinar workshop

Recent Posts

  • COVID-19: Modeling Distributions of Incubation and Recovery Times April 1, 2020
  • Multiobjective Optimization January 9, 2018
  • Optimizing Model Performance December 22, 2017
  • Calibration in Stella® December 15, 2017
  • Drifting Goals March 9, 2016

RSS System Dynamics Forum

Recent Comments

  • best apps review on About
  • digital software on Modeling the Economic Crisis
  • Mishawaka Indiana on What are “Mental Models”?
  • La Paz Indiana on XMILE – An open standard for system dynamics models
  • Bristol Indiana on Modeling the Economic Crisis

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Products
Software (v1.3)
  • Stella Architect
  • Stella Professional
  • Stella Designer
  • Stella Simulator
  • iThink
  • Feature Updates
  • Policies
  • Publishing Options
  • License Agreement
Free Software
  • Stella Online
  • isee Player
  • Stella Architect Trial
Solutions
Consulting
  • Systems Innovation Practice
Common Applications
  • Business
  • Education
  • Research
  • Government
  • Energy
  • Health
  • Agriculture
  • Manufacturing
  • Conservation
Quick Links
About
  • isee systems
  • Systems Thinking
  • Barry Richmond Scholarship
Resources
  • Frequently Asked Questions
  • Product Help
  • Examples
  • Request Support
  • Request Quote
  • Systems in Focus
  • Quick Tips
  • Legacy Tutorials
News and Events
Upcoming Workshops
  • Introduction to Dynamic Modeling
  • Whole Systems Partnership
Newsletter
  • The Connector
Recent Webinars
  • Model Mysteries
Recent Training
  • Systems Thinking Practice
Press Release
  • Stella Architect Release

  Phone: (603) 448-4990   Email: info@iseesystems.com

   Monday - Friday: 9:00 am - 5:00 pm EDT | Saturday - Sunday: Closed
Wheelock Office Park | 31 Old Etna Rd, Suite 7N | Lebanon, NH 03766 | US

isee systems inc. holds registered trademark rights over the following: iThink®, STELLA®, Stella®, isee systems® and claims the following trademarks; isee NetSim™, Stella Live™, Causal Lens™ and Stella Online™.

Terms of Use

© 2017. isee systems inc . All rights reserved.