# DLLs & Scripts

## Models Illustrating the Use of DLLs & Scripts

All the models assigned to the selected category are listed below.

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

• #### 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.

• #### 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.

• #### Adjustable Outlet Structure Discharge

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

• #### 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.

• #### Muskingum Channel Routing

Reusable model providing a modified Muskingum hydrologic routing formulation

• #### Ships with Containers

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

• #### 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.

• #### 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

• #### Mastermind in GoldSim

This model shows an implementation of the classic game Mastermind

• #### 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).

• #### 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.

• #### 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