Example Models - Table

Revision as of 00:09, 22 November 2022 by BFilstrup (talk | contribs)


This page lists example models and libraries. You can download them from here or (in some cases) link to a page with more details. Feel free to include and upload your own models and libraries.

Download Model Domain Description Methods For more
Marginal abatement home heating.ana carbon price, energy efficiency, climate policy This model, along with the accompanying blog article, show how to set up a Marginal Abatement graph in Analytica. graph methods, optimal allocation, budget constraint Marginal Abatement Graph
Solar Panel Analysis.ana renewable energy, photovoltaics, tax credits Would it be cost effective to install solar panels on the roof of my house? This model explores this question for my situation in San Jose, California. An accompanying video documents the building of this model, and is a good example of the process one goes through when building any decision model.

The model explores how many panels I should install, and what the payoff is in terms of net present value, Internal rate of return and time to recoup cost. It also looks at whether I should postpone the start of the installation to take advantage of rapidly falling PV prices, or cash in on tax credits.

net present value, internal rate of return, agile modeling Solar Panel Analysis
Items within budget.ana Given a set of items, with a priority and a cost for each, the function Items_within_budget function selects out the highest priority items that fit within the fixed budget. Items within Budget function
Grant exclusion.ana business analysis This model tests a hypothesis about the distribution of an attribute of the marginal rejectee of a grant program, given the relevance of that attribute to award of the grant. It could be used by an organization to make decisions as to whether to fiscally-sponsor another organization that will use that fiscal sponsorship to apply for grants, by looking at the effect on the pool of grant recipients overall. Grant Exclusion Model
Project Priorities 5 0.ana business models This is a demo model that shows how to:
  • Evaluate a set of R&D projects, including uncertain R&D costs, and uncertain revenues if it leads to release of a commercial product.
  • Use multiattribute analysis to compare projects, including a hard attribute -- expected net present value -- and soft attributes -- strategic fit, staff development, and public good will.
  • Compare cost, NPV, and multiattribute value for a selected portfolio of projects.
  • Generate the best portfolio (ratio of NPV or multiattribute merit to cost) given a R&D budget.
cost analysis, net present value (NPV), uncertainty analysis Project Planner
Steel and aluminum tariff model.ana On 2-March-2018, President Trump proposed new import tariffs on steel and aluminum. It seems as if the projected net impacts of these tariffs on the total US trade deficit and US economy depends largely on which news outlets you get your news from. We thought it would be helpful to put together a simple and easy to understand model to estimate of the net impact of these tariffs on the US trade deficit, assuming that no other factors change (e.g., no retaliatory tariffs are enacted by other countries). We wanted something that allows you to understand how its estimates are being derived, with assumptions that can be easily replaced with your own, so that the model itself would be impartial to any particular viewpoint. We want the uncertainties that are inherent in such a simple model to be explicit, so you can see the range of possibilities and not just a single guess. Finally, we wanted the model to be easy to understand fully for non-economists (a group to which we belong, too).

This model accompanied a current event blog post on the Lumina blog: Impact of Trump’s proposed Steel & Aluminum tariffs on US trade deficit

Steel and Aluminum import tariff impact on US trade deficit
Tax bracket interpolation 2021.ana Computes amount of tax due from taxable income for a 2017 US Federal tax return. To match the IRS's numbers exactly, it is necessary to process tax brackets correctly as well as implementation a complex mix of rounding rules that reproduce the 12 pages of table lookups from the Form 1040 instructions. This model is showcased in a blog article, How to simplify the IRS Tax Tables. Tax bracket interpolation
Feasible Sampler.ana feasibility You have a bunch of chance variables, each with a probability distribution. Their joint sample, however, contains some combinations of points that are (for one reason or another) physically impossible. We'll call those infeasible points. You'd like to eliminate those points from the sample and keep only the feasible points.

This module implements a button that will sample a collection of chance variables, then reset the sample size and keep only those sample points that are "feasible".

Obviously, this approach will work best when most of your samples are feasible. If you can handle the "infeasible" points in your model directly, by conditioning certain chance variables on others, that is far preferable. But there are some cases where this solution (although a bit of a kludge) is more convenient.

The instructions for how to use this are in the module description field.

statistics, sampling, importance sampling, Monte Carlo simulation Sampling from only feasible points
Cross-validation example.ana When fitting a function to data, if you have too many free parameters relative to the number of points in your data set, you may "overfit" the data. When this happens, the fit to your training data may be very good, but the fit to new data points (beyond those used for training) may be very poor.

Cross-validation is a common technique to deal with this problem: We set aside a fraction of the available data as a cross-validation set. Then we begin by fitting very simple functions to the data (with few free parameters), successively increasing the number of free parameters, and seeing how the predictive performance changes on the cross-validation set. It is typical to see improvement on the cross-validation set for a while, followed by a deterioration of predictive performance on the cross-validation set once overfitting starts occurring.

This example model successively fits a non-linear kernel function to the residual error, and uses cross-validation to determine how many kernel functions should be used.

Requires Analytica Optimizer: The kernel fitting function (Kern_Fit) uses NlpDefine.

cross-validation, overfitting, non-linear kernel functions Cross-Validation / Fitting Kernel Functions to Data
Bootstrapping.ana Bootstrapping is a technique from statistics for estimating the sampling error present in a statistical estimator. The simplest version estimates sampling error by resampling the original data. This model demonstrates how to do this in Analytica. bootstrapping, sampling error, re-sampling Statistical Bootstrapping
Kernel Density Estimation.ana This example demonstrates a very simple fixed-width kernel density estimator to estimate a "smooth" probability density. The built-in PDF function in Analytica often has a choppy appearance due to the nature of histogramming -- it sets up a set of bins and counts how many points land in each bin. A kernel density estimator smooths this out, producing a less choppy PDF plot.

This smoothing is built into Analytica 4.4. You can select smoothing from the Uncertainty Setup dialog.

kernel density estimation, kernel density smoothing Smooth PDF plots using Kernel Density Estimation
Output and input columns.ana Presents an input table to a user, where one column is populated with computed output data, the other column with checkboxes for the user to select. Although the Output Data column isn't read only, as would be desired, a Check Attribute has been configured to complain if he does try to change values in that column. The model that uses these inputs would ignore any changes he makes to data in the Output Data column.

Populating the Output Data column requires the user to press a button, which runs a button script to populate that column. This button is presented on the top-level panel. If you change the input value, the output data will change, and then the button needs to be pressed to refresh the output data column.

data analysis Output and Input Columns in Same Table
Platform2018b.ana offshore platforms, oil and gas, stakeholders, rigs to reefs, decision support Too many environmental issues cause bitter public controversy. The question of how to decommission California's 27 offshore oil platforms started out as a typical example. But remarkably, after careful analysis a single option, "rigs to reefs", obtained the support of almost all stakeholders, including oil companies and environmentalists. A law to enable this option was passed by the California State house almost unanimously, and signed by Governor Arnold Schwarzenegger. decision analysis, multi-attribute, sensitivity analysis From Controversy to Consensus: California's offshore oil platforms
Comparing retirement account types.ana or Free 101 Compatible Version 401(k), IRA, retirement account, decision analysis, uncertainty Will you end up with a bigger nest egg at retirement with a 401(k), traditional IRA, Roth IRA or a normal non-tax-advantaged brokerage account? For example, comparing a Roth IRA to a normal brokerage, intermediate capital gains compound in the Roth, but eventually you pay taxes on those gains at your income tax rate at retirement, whereas in the brokerage you pay capital gains taxes on the gains, which is likely a lower tax rate. So does the compounding outweigh the tax rate difference? What effect do the higher account maintenance fees in a 401(k) account have? How sensitive are these conclusions to the various input estimates? The answers to all these questions depend on your own situation, and may different for someone else. Explore these questions with this model. MultiTables, sensitivity analysis Retirement plan type comparison
Plane catching with UI 2020.ANA A simple decision analysis model of a familiar decision: What time I should leave my home to catch an early morning plane departure? I am uncertain about the time to drive to the airport, walk from parking to gate (including security), and time needed at the departure gate. It also illustrates the Expected Value of Including Uncertainty (EVIU) -- the value of considering uncertainty explicitly in your decision making compared to ignoring it and assuming that all uncertain quantities are fixed at the median estimate.

Details at Catching a plane example and EVIU. Includes downloadable model, slides, and video.

decision theory, decision analysis, uncertainty, Monte Carlo simulation, value of information, EVPI, EVIU Plane Catching Decision with Expected Value of Including Uncertainty
Marginal Analysis for Control of SO2 Emissions.ana environmental engineering Acid rain in eastern US and Canada caused by sulfur dioxide is emitted primarily by coal-burning electric-generating plants in the Midwestern U.S. This model demonstrates a marginal analysis a.k.a. benefit/cost analysis to determine the policy alternative that leads us to the most economically efficient level of cleanup. cost-benefit analysis, marginal analysis Marginal Analysis for Control of SO2 emissions
Donor-Presenter Dashboard.ana This model implements a continuous-time Markov chain in Analytica's discrete-time dynamic simulation environment. It supports immigration to, and emigration from, every node.

It can be used by an arts organization to probabilistically forecast future audience evolution, in both the short and the long (steady state) term. It also allows for uncertainty in the input parameters.

dynamic models, Markov processes Donor/Presenter Dashboard
Photosynthesis Regulation.ana - main regulation pathways
Photosystem.ana - rough sketch of genetic regulation
photosynthesis A model of how photosynthesis is regulated inside a cyanobacteria. As light exposure varies over time (and you can experiment with various light intensity waveforms), it simulates the concentration levels of key transport molecules along the chain, through the PSII complex, plasto-quinone pool, PSI complex, down to metabolic oxidation. The dynamic response to light levels, or changes in light levels, over time becomes evident, and the impact of changes to metabolic demand can also be observed. In the graph of fluorescence above, we can see an indicator of how much energy is being absorbed, in three different cases (different light intensities). In the two higher intensity cases, photoinhibition is observed -- a protective mechanism of the cell that engages when more energy is coming in than can be utilized by the cell. Excess incoming energy, in the absence of photoinhibition, causes damage, particularly to the PSII complex.

This model uses node shapes for a different purpose than is normally seen in decision analysis models. In this model, ovals, instead of depicting chance variables, depict chemical reactions, where the value depicts the reaction rate, and rounded rectangles depict chemical concentrations.

Two models are attached. The first is a bit cleaner, and focused on the core transport chain, as described above. The second is less developed, but is focused more on genetic regulation processes.

dynamic models Regulation of Photosynthesis
Time-series-reindexing.ana This model contains some examples of time-series re-indexing. It is intended to demonstrate some of these basic techniques.

In this example, actual measurements were collected at non-uniform time increments. Before analyzing these, we map these to a uniformly spaced time index (Week), occurring on Monday of each week. The mapping is done using an interpolation. The evenly-spaced data is then used to forecast future behavior. We first forecast over an index containing only future time points (Future_weeks), using a log-normal process model based on the historical weekly change. We then combine the historical data with the forecast on a common index (Week). A prob-bands graph of the weekly_data result shows the range of uncertainty projected by the process model (you'll notice the uncertainty exists only for future forecasted values, not historical ones).

dynamic models, forecasting, time-series re-indexing Time-series re-indexing
Post Compression Model Here is a calculator for computing the maximum load that can be handled by a Douglas Fir - Larch post of a given size, grade, and composition in a construction setting. Timber Post Compression Load Capacity
Compression Post Load Capacity.ana Computes the load that a Douglas-Fir Larch post can support in compression. Works for different timber types and grades and post sizes. compression analysis Compression Post Load Calculator
Daylighting analyzer.ana engineering A demonstration showing how to analyze lifecycle costs and savings from daylighting options in building design.

Analysis based on Nomograph Cost/Benefit Tool for Daylighting. adapted from S.E. Selkowitz and M. Gabel. 1984. "LBL Daylighting Nomographs," LBL-13534, Lawrence Berkeley Laboratory, Berkeley CA, 94704. (510) 486-6845.

cost-benefits analysis Daylighting Options in Building Design
California Power Plants.ana power plants An example showing how to use Choice menus and Checkbox inside an Edit table. It also shows how to use the Cell default attribute to specify default values (including Choice menu and Checkbox with default selections) specified in "Default Plant Data" to be used when user creates a new row in the Edit table. This model shows how to demonstrates the use of choice pulldowns in edit tables. The model is created during a mini-tutorial on Inserting Choice Controls in Edit Table Cells elsewhere on this Wiki. edit table, choice menu, pulldown menu, checkbox California Power Plants
Requires Analytica Optimizer
Electrical Transmission.ana
electrical engineering, power generation and transmission This model of an electrical network minimizes total cost of generation and transmission. Each node in the network has power generators and consumers (demand). Nodes are connected by transmission links. Each link has a maximum capacity in Watts and an admittance (the real part of impedance is assumed to be zero). Each generator has a min and max power and a marginal cost in $/KWh. The model uses a linear program to determine how much power each generator should produce so as to minimize total cost of generation and transmission, while satisfying demand and remaining within link constraints. Electrical Generation and Transmission
Time of use pricing.ana & MECOLS0620.xlsx
(both files needed)
reading from spreadsheets, time-of-use pricing, electricity pricing Electricity demand and generation is not constant, varying by time of day and season. For example, solar panels generate only when the sun is out, and demand drops in the wee morning hours when most people are sleeping. Time-of-use pricing is a rate tariff model used by utility companies that changes more during times when demand tends to exceed supply. This model import actual usage data from a spreadsheet obtained from NationalGridUS.com of historic average customer usage, uses that to project average future demand, and then calculates the time-of-use component of PG&E's TOU-C and TOU-D tariffs. (Note: The historical data came from Massachussets, the rate plan is from California, but these are used as examples). Developed during a User Group Webinar on 30-Sep-2020, which you can watch as well to see it built.

Video: Time of use pricing.mp4

Time of Use pricing
Color map.ana Color Map
World cup.ana 2018 World Cup Soccer final
resnet18.zip Image recognition
Month to quarter.ana Transforming Dimensions by transform matrix, month to quarter
Convolution.ana Convolution
Dependency Tracker.ana Dependency Tracker Module
French-English.ana Multi-lingual Influence Diagram
Parsing XML example.ana Extracting Data from an XML file
Vector Math.ana Vector Math
Total Allowable w Optimizer.ana or
Total Allowable w StepInterp.ana for those without Optimizer
Total Allowable Harvest
Cereal Formulation1.ana Linearizing a discrete NSP
Neural Network.ana Neural Network
Earthquake expenses.ana Earthquake Expenses
Loan policy selection.ana Loan Policy Selection
Hubbard_and_Seiersen_cyberrisk.ana Inherent and Residual Risk Simulation
media:Red State Blue State plot.ana Red or blue state
COVID Model 2020--03-25.ana COVID-19 State Simulator, a Systems Dynamics approach
Corona Markov.ana How social isolation impacts COVID-19 spread in the US - A Markov model approach
Modelo Epidemiológoco para el Covid-19 con cuarentena.ana Epidemiological model of COVID-19 for Perú, en español
COVID-19 Triangle Suppression.ana A Triangle Suppression model of COVID-19
Simple COVID-19.ana COVID-19 Coronavirus SICR progression for 2020
US COVID-19 Data.ana COVID-19 Case and Death data for US states and counties
Voluntary vs mandatory testing.ana Mandatory vs Voluntary testing policies
Comments


You are not allowed to post comments.