plot.sim.model {bdpopt}R Documentation

Plot The Results Contained In Simulation Model Object


Plot method for an object of class sim.model.


## S3 method for class 'sim.model'
plot(x, = NULL, main.var.min = -Inf,
  main.var.max = Inf, fixed = list(), no.legends = FALSE,
no.reg = FALSE, reg.steps = 100, ...)



A simulation model object obtained as output from eval.on.grid, fit.gpr or fit.loess.

A name for the main variable to be used when plotting. This defines the variable that varies along the x-axis of the plot. The full name of the variable must be given as a string, i.e., the name must include array brackets and array indices.


The minimum value for the main variable.


The maximum value for the main variable.


A list of vectors with named entries. Each such vector defines a set of fixed values for the remaining decision variables. The number of curves in the plot will be equal to the length of fixed. Note that the names of the entries must be written in full array notation, including explicit brackets and indices.


By default, legends are included with numbers corresponding to the entries of fixed. Set no.legends to TRUE to remove it.


Set to TRUE in order so suppress plotting of the regression curves.


The number of steps to use when plotting the regression curves.


Not used.


The simulation grid points included in the plot are selected as follows:

  1. All points for which the value of the decision variable defined by is not within the region defined by main.var.min and main.var.max are excluded from the total set of grid points.

  2. For the points remaining, any point which does not correspond to a value listed in fixed is excluded.

In the special case when there is only one decision variable, only the model x needs to be specified. In the special case when there are only two decision variables, fixed may also be given as a vector. It then specifies the values of the secondary variable and one curve will be drawn for each value.

The default behaviour is to also plot the fitted regression function if it is available, with one curve corresponding to each of the point sets defined by the entries of fixed.


Returns NULL.


Sebastian Jobjörnsson

[Package bdpopt version 1.0-1 Index]