Description Usage Arguments Details Note Examples
This function takes a polynomial (represented by a spray
object),
uses polyPdmpModel obj
to identify the discrete variable and
substitutes this variable in the polynomial by several indicator
variables. The number of variables depends on the different possible
states that the discrete variable can take. The method is used internally
for computing the generator
of a polyPdmpModel
.
1 | blowupSpray(obj, spray)
|
obj |
object of class |
spray |
object of class |
This function is best explained in an example. Lets assume that
we have one continous variable f
and one discrete variable d
and that they are given in order f, d
in variable init(obj)
.
Let's have discStates(obj) = list(d = -1:1)
, so d
can take
the values -1, 0 or 1, respectively. A polynomial of arity 2 would then be
transformed into a polynomial of arity 4, where the second variable (that
stands for d
) is replaced by three indicator variables
d1, d2, d3
, that can only take values 0 or 1, depending on the
value of the original d
. If we take for example the polynomial
5f²d³ + f, method blowupSpray
changes it into
5f²⋅(-1)³⋅d1 + 5f²⋅0³⋅d2 + 5f²⋅1³⋅d3 + f = -5f²d1 + 5f²d3 + f.
If the order of f
and d
are reversed (i.e. init(obj) =
c(d = ..., f = ...)
), the additional variables d1, d2, d3
would
still be added at the end, leaving f
to be the first variable.
This method only works for one discrete variable
1 2 3 4 5 6 7 8 | # the example discussed in section details:
library(spray)
data("simplePoly")
blowupSpray(simplePoly, 5*product(2:3) + lone(1, 2))
# with other order in slot init:
init(simplePoly) <- c(d = 1, f = 2)
blowupSpray(simplePoly, 5*product(3:2) + lone(2, 1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.