# GoldSim Features & Capabilities

## Models Illustrating GoldSim Features & Capabilities

The models in this section of the Model Library illustrate basic GoldSim features and capabilities.

Each model in the Library is assigned to one or more categories. You can narrow the list by selecting a specific category.

(The categories are also listed in the left navigation panel).

You can also filter the list by entering keywords or phrases into the search field:

• #### Finding Vector Min and Max

This model demonstrates how you can create a Boolean vector identifying the location of the minimum or maximum items in a vector of values.

• #### Add Scalar to Vector

This model demonstrates how you can take a scalar value and add it to one of the items of a vector using an Expression. It includes an illustrative Dashboard.

• #### Random Sequence Generation

This model addresses the need to randomly order a given number of indexed items

• #### Vector and Matrix Constructors

This model demonstrates the various ways in which array constructors can be used to construct vectors or matrices from different inputs.

• #### Append Vector to Matrix

Example model illustrating adding a vector to an existing matrix

• #### Monthly and Annual Summaries

This model integrates (accumulates) a scalar daily signal over a period of 5 years and returns monthly and annual sums.

• #### Median Function

Methods to calculate the median of an array or time series are illustrated using Script elements and Function elements.

• #### Rank Data Vector

Take any vector of values and rank them according to their respective value from highest to lowest or the opposite.

• #### Annual Reporting Summaries

This model shows how scalar and vector daily signals can be integrated to obtain annual sums stored in a vector or matrix format.

• #### Monthly Reporting Summaries

This model shows how a vector daily signal can be integrated to obtain monthly sums stored in a matrix format.

• #### Matrix / Vector Conversions

This model illustrates how to load values from a matrix into a vector and from a vector into a matrix. This can be done using GoldSim's vector and matrix constructors.

• #### Monthly Cumulative Flows

This example shows how to use a vector constructor to generate a vector of month flow rates for integration and other calculations

• #### Yearly Minimum and Maximum

Demonstration of how an Extrema can be used to track year-to-date and annual values

• #### Espresso Machine Purchase Decision

This example model makes use of logical elements (AND, OR and NOT) to evaluate whether or not key criteria are met to justify the purchase of an espresso machine.

• #### Population Model Objects

This example illustrates an efficient way (using cloned containers) to model multiple objects of the same type without having to manually reimplement identical model logic.

• #### Check Boxes in a Dashboard

This model illustrates how you can add Select All and Select None functionality to check boxes in a GoldSim Dashboard.

• #### Dashboard-Defined Distributions

The purpose of this model is to allow an arbitrary cumulative or discrete distribution to be specified by entering values and probabilities in a Dashboard.

• #### Mastermind in GoldSim

This model shows an implementation of the classic game Mastermind

• #### Update Status in Edit Mode

While in Edit mode, use dashboard controls to update expressions that change the status of dashboard result displays

• #### Earthquake Response

Computation of building displacement or response to the signal created by earthquake ground motion using a Convolution element

• #### Computing Warranty Costs

This model illustrates how to use the Convolution element to compute cumulative warranty costs.

• #### Moving Discrete Items

This simple model illustrates how to move discrete items from one state to another.

• #### Delay Discrete Change with Vector Times

Delay a discrete change with a vector of delay times using a Reservoir and Information Delay. The reason this is needed is because the Discrete Change Delay does not allow non-scalar delay definitions.

• #### Trucking Shipments

This example combines both continuous and discrete dynamics to model the transport of a material by truck to a dock where the material is loaded onto ships.

• #### Managing a Bank Queue

This is a simple discrete events model of the number of tellers and the size of a queue of customers at a bank.

• #### Start and End Value Difference

This model computes the difference between the initial value of a variable (at the beginning of a simulation) and the final value of the variable (at the end of the simulation).

• #### Discrete Model for Manufacturing

This model describes a manufacturing process with the following stages: (1) casting, (2) pre-finish, (3) ‘solution oven’ heat treatment, (4) ‘aging oven’ heat treatment and (5) a finishing process.

• #### External Element (Lahey Fortran)

This example model shows how to use an External Element to call a DLL (compiled in Fortran) to perform calculations outside of GoldSim.

• #### Game of Life

This example shows how a Script Element can be used to implement the state logic for a Game of Life simulation

• #### Script Element Introduction

This model file shows several Script Element examples that illustrate the various capabilities and features of Script Elements.

• #### Vector Type Splitter Element

Use a Script element to replace the Splitter element for vector input types

• #### Vector Type Allocator Element

Use a Script element to replace the Allocator element for vector input types

• #### Get Computation Time DLL

Calculate Normalized, Simulating Running Time

• #### Python DLL

How to use the External element to link GoldSim and Python

• #### GNU Scientific Library (GSL) and GoldSim

How to statically link GSL to GoldSim with the External element

• #### Dynamic Convolution DLLs

Generally applicable, dynamic convolution with the External element

• #### gcc Fortran External Element Example

Example of compiling a mixed language DLL for use with the GoldSim External Element

• #### Moving Averages

This model illustrates how an Integrator can be used to calculate moving averages.

• #### Insert Time Step Overflow

Compares reservoir outflow and overflow with and without the Advanced Simulation Setting to allow unscheduled updates selected.

• #### Unscheduled Time Steps

This model demonstrates how different Simulation Settings affect the plotted time history results for a simple pond overflow model.

• #### Calibrating a Model

This model shows a simple example of how to calibrate (or fit) a model to data

• #### Hydropower Revenue Optimization

Demonstration of GoldSim optimization capabilities using a simple reservoir and hydropower model

• #### Optimization on a Parabola

This model is a very simple example demonstrating how GoldSim optimization works on a function that has an obvious minimum (or maximum) solution.

• #### Optimize and Local Maxima

Simple Optimization Problem: Find maximum on polynomial with multiple optimums

• #### Gauss-Newton Trend Line Fitting

This model illustrates how to fit a trend line to data using the Gauss-Newton method.

• #### Risk Board Game

These two models simulate different aspects of the classic board game Risk.

• #### Ito-Process Random Walk Model

A History Generator Element is used to model an Ito-process random walk. The distribution of the future value is lognormal with mean and variance that both increase linearly with time.

• #### Markov Process Example Model

Simple two state, continuous time Markov chain model which compares two theoretical probability distributions

• #### Vector Distributions

This example shows how a vector of sampled values can be generated from a single distribution definition for Sampled, Cumulative and Discrete stochastics

• #### Indexing Data Records

This model demonstrates two different ways to index a data record for use in a GoldSim model, either sequentially or randomly.

• #### Defining Vector Distributions

This example shows how to define and sample vector discrete and cumulative distributions using (1) a vector uniform 0-1 stochastic to sample probability levels and (2) a script element to get the corresponding values.

• #### Simulating an ATM Queue using Resources

This is a simulation for an ATM machine installed at an event location, where there are frequent customer visits

• #### Fractional Aircraft Ownership

Example model simulating fractional airplane ownership using Resources to represent the airplanes

• #### Running GoldSim from a Batch File

This example illustrates how to use a batch file to run GoldSim. It consists of a zip file containing a GoldSim file and a .bat file.

• #### Using Scenarios

This simple model is used to illustrate how to use GoldSim's scenario capabilities, including how to create, edit and run scenarios.

• #### Reservoir Reporting Periods

The purpose of this model is to demonstrate the use of Reporting Periods in GoldSim.

• #### Scenarios and the Dashboard

Model used to demonstrate how a dashboard is used to define and evaluate multiple scenarios

• #### Using a Spreadsheet Element

This simple model illustrates how to use a Spreadsheet element. Data is exported from GoldSim into two cells in the spreadsheet, a calculation is carried out that references those cells, and the result of the calculation in the spreadsheet is then imported back into GoldSim.

• #### Using VBA Code in Excel

This example demonstrates how a VBA macro can be used to run calculations in Excel based on input from GoldSim.

• #### Export Statistical Histories to Excel

For a Monte Carlo simulation, export statistical histories to Excel

• #### Export Result Plots as Image Files

Example model that uses Excel VBA to automatically generate images of plots produced from results exported from GoldSim.

• #### Mono Lake Water Balance

Water balance model illustrating a negative feedback loop and of the use of scenarios with a dashboard

• #### Mono Lake Water Balance Player Model

Player model to illustrate differences in dashboards and scenarios between Player and GoldSim

• #### Pressure, Productivity and Quality

Example model illustrating feedback from pressure and fatigue on productivity and quality

• #### Polya Urn Problem

This simple model simulates the classic Polya urn problem in which stones, either black or white, are randomly selected (with replacement and addition) from a pot.

• #### Dove, Hawk, Law-Abider Populations

This is a model of the population dynamics of three groups adopting dove, hawk and law-abider strategies.

• #### Inventory Management

A simple inventory management model that illustrates the structural differences between how such a model is constructed in GoldSim, and how it would be constructed using a classic System Dynamics code.

• #### Time Shifting a Time Series

The purpose of this model is to demonstrate time shifting historic data in a Time Series element. This type of model makes it easy to show summary statistics like exceedance probability of annual peak flow rate or mean annual flow rate.

• #### Time Series Shifting Options

This model includes 4 different methods of time shifting to be used in a wider array of applications.

• #### Time Series Element Lookup Functions

This model illustrates how you can reference a Time Series like a lookup function to access future or past values.

• #### Post-Process Time History Statistics

Example model which generates probabilistic time histories and post-processes time history statistics

• #### Pre-Processing Time Series Data

Uses SubModels to pre-process (and plot) historic time series data

• #### Lookup Table Import

This example shows how to import 1D, 2D and 3D Lookup Table data from text and Excel files.

• #### Time Series Element Examples

Examples illustrating basic Time Series element functionality

• #### Time Series Analysis

This model provides an example of calculating statistics for a data time series.

• #### Time History Statistics

This model provides examples of two different methods which can be used to generate statistics for time histories.

• #### Scatterplot

This model plots paired data for equivalent time intervals on the same scatterplot.

• #### Probability Mass Function (PMF)

This model creates a histogram from time series values and uses it to create a PMF of the data.

• #### Time Series Data Preprocessing

In this example, a SubModel is used to calculate average monthly rainfall amounts from a Time Series element containing rainfall rate data

• #### Day, Month, Year from Date

A Script element is used to calculate various components from a date or datetime output, like Year, Month, Day, Minute, Second

• #### Polynomial Root Finder

This model compares the bisection and secant methods for finding roots of 2nd order polynomials (i.e. of the form C1*x^2 + C2*x + C3).

• #### Spline Interpolation

This model implements a spline interpolation method to generate smoothly-varying dependent variable values from a 1-D Lookup Table.

• #### Comparing Alternatives

Comparison of two alternative technologies accounting for uncertainty and using Scenarios

• #### Marketing Program Pick

Three different types of promotional campaigns are compared across a 180 day campaign period.

• #### Project Simulator

This model illustrate how conditional containers can be used to simulate projects.

• #### FDA Approval Process

This model simulates the process of obtaining FDA approval for a new drug.

• #### What-If Simulation Case Study

Simple ECommerce, decision-making case study using GoldSim "what-if" simulation

• #### Population Dynamics and Chaos

This model illustrates perhaps the most famous example of chaotic behavior: that exhibited by the ´logistic difference´ equation to describe the growth of a population subject to a carrying capacity.

• #### Predator-Prey Models

This example implements several predator-prey models taken from "Modeling the Environment" by Andrew Ford.

• #### Salmon Life Cycle

This is a simple model that simulates the life cycle of a salmon population as it migrates from the stream, to the ocean, and back to the stream. Although the data and model structure are fictional, it does provide a simple example of how such a model could be constructed.

• #### Acute Infection Model

These two models (continuous and discrete) simulate the spread of an acute infection through a population

• #### Population Growth Aging Chain

Example model illustrating population dynamics modeling with Discrete Change elements and Integrator arrays

• #### Aging Chain

Simulate an aging chain using various methods to keep track of the age structure of a stock of material or items.

• #### Adoption and Diffusion of Technology

A logistic growth curve model is employed to simulate the adoption and diffusion of a new idea or technology

• #### Water Supply Trade-Off Analysis

Use GoldSim's scenarios functionality to create a decision support framework for your next project.

• #### Probability of Buying a Bike

Tutorial model that calculates the probability that Jason can buy a bike given his income and spending

• #### Dashboard-Controlled Currencies

This model demonstrates how a user of a dashboard can control currency exchange rates and select which currency to use in a model.

• #### Adjustable Outlet Structure Discharge

The purpose of this model is to demonstrate how GoldSim can calculate hydraulic functions dynamically.

• #### Pumping Head Problem

A script element is used to solve for pumping flow as a function of the total dynamic head on the pump due to headloss.

• #### Normal Depth in an Open Channel

This static GoldSim model calculates the normal depth in an open channel assuming uniform flow conditions.

• #### Markov Process Rainfall Model

This model simulates a Markov process that randomly switches between a wet state and a dry state to simulate rainfall given some key historic statistics.

• #### Calibrate Snowmelt Runoff

This model demonstrates the use of GoldSim's optimization feature to calibrate a snowmelt model by automatically adjusting parameters to achieve correlation between historic streamflow record and streamflow calculated in the model.

• #### Muskingum Channel Routing

Reusable model providing a modified Muskingum hydrologic routing formulation

• #### Multiple Catchment Runoff

Watershed runoff is calculated for three catchments using the same function but different inputs

• #### Probabilistic Detention Pond Model

This model presents a pond discharge versus pond capacity optimization problem.

• #### Generation of a Stochastic Precipitation Record

This model illustrates one way in which GoldSim can be used to generate a stochastic precipitation record.

• #### WGEN Weather Generation Model

Use Markov process to simulate stochastic precipitation events based on a wet state and dry state.

• #### Rainfall Generator Calibration

Using the GoldSim optimization module, a rainfall generator is calibrated using historical data

• #### Diving Bell

Simulation of a diving bell released at a specified depth and moving towards the surface where it emerges above the water

• #### Cooling Coffee Example

This is a simple heat transfer model of a cooling cup of coffee.

• #### Widget Processor Model

In this simple model, widgets are processed at a warehouse for 30 days. The widgets arrive at a rate of about once every two hours. It takes a certain amount of time (1.8 hrs) to process each widget and ship it out, and only one widget can be processed at a time.

• #### Grinding Mill Circuit

This reliability model illustrates a typical closed circuit grinding mill circuit, used in many mine processing plants.

• #### Competing Demands on a Reservoir

This simple model shows one method for allocating competing demands on a Reservoir.

• #### Reservoir with Operating Pools

Operating rules control outflows from a reservoir that contains operating zones divided into surcharge, flood control, conservation, and dead pool zones.

• #### Controlling Reservoir Discharge

This model explores 3 different methods of controlling discharge from a reservoir. The difference between these methods is important to understand for models that contain multiple reservoirs where discharge from one is being sent to another.

• #### Dam Breach Hydrograph

Simulate the breach in a dam as it grows through time and the resulting discharge hydrograph

• #### Dam Breach Risk

Monte Carlo Simulation of the Dam Breach algorithm to calculate risk of failure

• #### Single Pool Reservoir

Simulate the operation of a simple reservoir with an overflow spillway.

• #### Simple Reservoir Operations

This model illustrates how several methods for calculating a reservoir discharge can be combined into a single model. The methods includes calculations based on fluid physics, lookup tables and volumetrically under low-level conditions.

• #### Mass Balance Check

Check that inflows, outflows, and changes in storage within your flow model balance.

• #### On - Off Reservoir Discharge

This model demonstrates the use of a Status element to control discharges from a reservoir.

• #### Rio Chama Flow Alternatives

This model incorporates the Scenario Manager to assist with stakeholder evaluations of environmental flow alternatives.

• #### Risk Assessment of Lunar Base

This is a model that simulates the performance of a lunar base over its planned 20 year lifespan. It illustrates how GoldSim's Reliability Module can be use to carry out a probabilistic risk assessment of a complex system.

• #### Risk Assessment of Planetary Mission

This is a model that simulates an unmanned scientific mission to another planet. It illustrates how GoldSim's Reliability Module can be used to carry out a probabilistic risk assessment of a complex system.

• #### Number of Days Which Failure Occurs

This model counts the number of days in which some failure occurs. A failure event is defined as a reservoir overflow occurrence for any duration within a single day.

• #### One-Armed Bandit Model

This model simulates a slot machine with 3 reels each having 5 images that wins money if you end up with 3 in a row.

• #### Simple Inventory Models

This model file includes 5 variations on a simple inventory model. In each case, there is an initial inventory, a sinusoidal demand and a production rate that is constant, stochastic or influenced by feedback.

• #### Auto Supply Chain Model

This is a demonstration model of an automobile supply chain. It represents two links in the chain: the OEM and a major tier 1 supplier (in this case, power trains).

• #### Ships with Containers

This model simulates ships entering the harbor where each ship carries a random number of containers.

• #### Forecasted Water Demand

Calculate future, monthly water demands based on current usage and an annual projection

• #### Annual Demand Forecast Submodel

This model uses a submodel to estimate a possible shortfall for the coming year in order to set a supply curtailment if needed.

• #### Pond Flow Network

The purpose of this model is to demonstrate the use of GoldSim elements to represent a flow network of multiple storage elements that distribute water for water use. Water enters the system via "Inflow_Data".

• #### Allocator Element Priorities

Example model providing demonstration of two different priority implementations in an allocator element

• #### Municipal Water Demand

Forecast water demand for multiple entities based on assumed starting conditions and projected rates of change such as population, water prices, and seasonal use adjustments.

• #### Simple Stream Diversion Model

This model demonstrates a simple continuous stream diversion and and a diversion operating for a fixed amount of time each week.

• #### Nonpoint Pollutant Buildup and Washoff

This model provides simulation of nonpoint source pollutant buildup and washoff with automated calibration.

• #### Simulating Failure Risk of a Pump Station

Use the Reliability Module of GoldSim to calculate the failure modes of various components of a pumping station and water delivery system.