empirical(x) describes a random variable by a sample of its values, one
per scenario, instead of by a distribution. Pass it to rand_var(), as in
rand_var(m, "demand", empirical(x)). The length of the sample sets the
number of scenarios.
Value
An object of class quicopt_empirical, for rand_var() or
set_distribution(). It can also be an element of the sources of a
program().
Details
This is how to use a distribution the package has no function for: draw a
sample in R, for example with rlnorm(), and pass it to empirical().
The samples of a model are read side by side, the i-th value of each in
scenario i, so values observed together stay together. set_empirical()
does this for every column of a data frame.
A sample is fixed data. If it was drawn in R, R's set.seed() determines
it, not the model's seed, and resample() does not draw it again.