Skip to content

Making Connections

isee systems blog

Making Connections

  • About
  • More Connections
Search

Working with Array Equations in Version 10

Updated: May 7, 2014December 17, 2012Filed under: Modeling Tips3 Comments

STELLA/iThink version 10 introduces several new array features, including simplified and more powerful Apply-To-All equations that are designed to reduce the need to specify equations for every individual element.

Dimension names are optional

When an equation is written using other array names, the dimension names are not normally needed.  For example, given arrays A, B, and C, each with the dimensions Dim1 and Dim2, A can be set to the sum of B and C with this equation:

B + C

Dimension names are still needed when the dimensions do not match.  For example, to also add in the first 2-dimensional slice of the 3-dimensional array D[Dim1, Dim2, Dim3], the equation becomes:

B + C + D[Dim1, Dim2, 1]

The wildcard * is optional

When an array builtin is used, the * is normally not needed.  For example, to find the sum of the elements of a 2-dimensional array A[Dim1, Dim2] requires this equation:

SUM(A)

If, however, the sum of only the first column of A is desired, the * is still needed:

SUM(A[*, 1])

Simplified array builtins

There are five array builtins:  SIZE, SUM, MEAN, STDDEV, and RANK.  In addition, the MIN and MAX functions have been extended to take either one or two array arguments.  All but RANK can also be applied to queues and conveyors.

SUM, MEAN, and STDDEV all work in a similar way (see examples of SUM above).

Using the MAX function, it is possible to find the maximum value in array A,

MAX(A)

the maximum value in array A, or zero if everything is negative,

MAX(A, 0)

or the maximum across two arrays A and B,

MAX(A, B)

MIN works the same way, but finds the minimum.

The SIZE function requires an array parameter, but within an array, the special name SELF can be used to refer to the array whose equation is being set.  In addition, wildcards can be used to determine the size of any array slice.  In the equation for array A[Dim1, Dim2],

SIZE(SELF)

gives the total number of elements in array A while

SIZE(SELF[*, 1])

gives the size of the first dimension of A, i.e., the number of elements – or rows – in the first column.  Likewise,

SIZE(SELF[1, *])

gives the size of the second dimension of A, i.e., the number of elements – or columns – in the first row.

(more…)

Modeling Tips
  • arrays
  • iThink/STELLA
  • Version 10
3 Comments

2011 Barry Richmond Scholarship Award

Updated: August 10, 2011August 10, 2011Filed under: News & Announcements3 Comments

The Barry Richmond Scholarship Award was established in 2007 by isee systems to honor and continue the legacy of its founder, Barry Richmond.  Barry was devoted to helping others become better systems citizens.  Systems citizens are members of a global community that strive to understand the complexities of today’s world and have the informed capacity to make …

Keep Reading
News & Announcements
  • Barry Richmond
  • conferences
  • scholarship
  • System Dynamics Society
  • WPI
3 Comments

Connecting iThink and STELLA to a Database

Updated: May 7, 2014April 28, 2011Filed under: STELLA & iThink5 Comments

A question we periodically get from our customers is: Can iThink or STELLA connect to a database? Saving and pulling information to/from databases presents a lot of advantages for storing, organizing and sharing model data. Thanks to iThink and STELLA’s ability to import and export data via commonly used spreadsheet file formats, it is possible to use comma separated value (CSV) files as a means to create a connection to database applications.

Essentially, data can be moved between a database and iThink/STELLA by using a CSV file as a bridge. CSV files are a widely supported file standard for storing table data, and both iThink/STELLA and many database programs are able to read and write to them.

Process overview
The process of connecting to a database using CSV files as an intermediary

The process can be automated when you use iThink/STELLA’s ability to run models automatically from the command line (Windows only). Most database applications also have command line interfaces, allowing you to create a single macro script that moves data between your model and a database in a single process.

In this post I will use a simple example to demonstrate how to import data from a Microsoft SQL Server database into an iThink model on Windows. The model and all files associated with the import process are available by clicking here. If you don’t have access to Microsoft SQL Server, you can download a free developer’s version called SQL Server Express from the Microsoft web site.

The Model

The model used in this example is a variation of the Beer Game model. The structure shown below represents the ordering process for a simple retailer supply chain.

Retail Supply Chain Model

The model has been set up to import the initial values for On Order with Wholesaler and Unfilled Orders stocks, target inventory and actual customer orders (a graphical function with 21 weeks of data). The source of the imported data is the file named import.csv in the example files.

To set up this example, I manually created the CSV file using the initial model parameters. (Later in this post, you’ll see that this file will be automatically created by the database.) The model has been initialized in a steady state with actual customer orders at a constant level of 4 cases per week over the 21 week period.

(more…)

STELLA & iThink
  • beer game
  • command line
  • database
  • export
  • import
  • SQL Server
5 Comments

Posts navigation

  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • …
  • 29
  • Next

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.