Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > Advanced Simulation Methods

Payoff Definitions (.vpd files)

Scroll Prev Top Next More

A payoff is a single number that summarizes a simulation.  You need to define a payoff before you can run an optimization or do Kalman filtering.  You can also define a payoff for normal simulations.  At the end of the simulation the value of the payoff will be reported and added to the error history window.  

The payoff for a model can be defined in terms of a comparison of model variables with actual data, or as a combination of model variables.  These two types of payoffs are known as calibration payoffs and policy payoffs.  The payoff is defined inside of a Vensim Payoff Definition (.vpd) file.  This file is referenced as second step the Optimization wizard takes or is named in the Payoff Definition field on the Advanced tab in the Simulation Control dialog.


If you are using the Optimization wizard the Payoff Definition list dialog will appear in the second step.  From the Simulation Control dialog Advanced tab click on the Ed... button next to the Payoff Definition field. You can also edit the .vpd file in any text editor (including the one built in to Vensim).


Payoff definition list


Filename is the name of the  Payoff Definition file.  If no filename has previously been specified Vensim will use the model name or, when using the Simulation Control dialog query you for a name.  You can type in a different name if you like.  If you do this and that file already exists you will be asked if you want to overwrite it.  You do not need to include an extension, Vensim will automatically add one.

Browse... allows you to choose a different Payoff Definition file to work with.  When you click on this a File Selection dialog will open.  Select the file you want to work with and its contents will replace those in the dialog.  

Clear Settings will remove all the parameters from the payoff file.

Add : This button adds a new payoff element (see below for the payoff element definition dialog).

Delete : This button will delete the currently selected payoff.

Modify : This button displays the payoff element editor (see below) for the currently selected payoff.


Payoff element editor

When you click on the add or modify buttons from the payoff definition list, the following dialog will be displayed.

Calibration mode (select "Calibration" for the payoff type)

Calibration, if selected, will attempt to match model variables to data for those variables.  A calibration payoff requires that a data file be specified that contains the data that the optimizer will attempt to match.


Variable is the name of a model variable (model variable) that you want to compare to available data. Hit the "Sel" button to display a list of model variables.

Compare to is the name of a variable (data variable ) in a data file, or a computed Data variable in the model (defined using a := equation). If you follow the convention of using the same name for data and model variables you can omit this entry, and Vensim will look for matching data.

Weight is the amount of weight you want to give to the error between the variable and what you are comparing it to. Depending on your choice of Distribution and whether Kalman filtering is active,  this may be interpreted as a scale or variance. See the discussion of Payoff Computation for a more complete description. The weight can be a number or a model variable.


Subscripts : If the Variable, Compare To data or Weight/Scale/Variance entries are subscripted variables, the subscript elements or ranges must be specified here. If ranges are used, they must match or be unsubscripted. For example, if you specify Variable[city,flavor] you must then use weight that is either a number, an unsubscripted variable, or a subscripted variable with matching [city,flavor] dimensions. You cannot mix Variable[city,flavor] with Weight[city].

Transform : Available options here are "None" or "Log." If the Log transform is chosen, and nonpositive data or model points are encountered, they will be skipped with a warning.

Distribution : Available options here are "Normal", "Gaussian", "Kalman", "Filter only", "Robust" or "Cauchy". See the Payoff Element Types section for a detailed description of what these mean.


Policy mode (select "Policy" for the payoff type)

If Policy is checked, the payoff will be computed based solely on model variables so a data file is not necessary to compute the payoff, though one may be necessary to simulate the model.


Variable is the model variable to include in the payoff.  You can type in a variable name here or click on the Sel button to select a model variable.

Weight is the weight to be given to this part of the payoff.  This can be a number or a constant in the model.  It can be positive or negative for Policy payoffs. Since the payoff will be maximized, positive values represent "goods" and negative values represent "bads." See Payoff Computation for more details.

NOTE If you are using a model with subscripts, dimensions must be specified and match, as for calibration above.

Transform : Available options here are "None" or "Log." If the Log transform is chosen, and nonpositive data or model points are encountered, they will be skipped with a warning.

Timing : Available options here are "Always", "Initial" or "Final". The default - always - treats the element like a flow, accumulating its value over the simulation. Initial and Final elements contribute to the payoff only once, at the beginning or end of the simulation.