The function lim.redpol()
takes as input a polytope and returns its projection into the non-empty reduced polytope.
Precisely, taking the polytope \(\mathcal{P}= \{ x \in \mathbb{R}^n: Ax = B, Gx \geq H \}\) as input, the function returns
the matrix Z
, basis of the right null space of A and \(x_0\) a particular solution of \(P\), used for the reduction;
the matrix \(G'=GZ\) and the vector \(H'=H-Gx_0\) describing the reduced polytope \(\mathcal{P'}= \{ x \in \mathbb{R}^{n-k}: G'x \geq H'\}\) with \(k=\mathtt{rank}(A)\).
The function full2red()
(resp. red2full()
) turns a sample of points inside the full polytope \(\mathcal{P}\) (resp. inside the reduced polytope \(\mathcal{P'}\))
into the sample of corresponding points inside the reduced polytope \(\mathcal{P'}\) (resp. the full polytope \(\mathcal{P}\)).
lim.redpol(lim, test = TRUE)
red2full(sample, x0, Z)
full2red(sample, x0, Z)
A list with four components A
, B
, G
and H
representing
the polytope to be reduced.
A boolean if equal TRUE
checks for additional equalities hidden in inequalities.
A matrix where each row corresponds to a point inside either the full or the reduced polytope.
A numeric vector of size \(n\) corresponding to the particular solution used during the reduction.
The matrix used during the reduction of the polytope (returned by lim.redpol()
).
A list with four components; namely:
G
H
x0
Z
DF <- system.file("extdata", "DeclarationFileBOWF-short.txt", package = "samplelim")
BOWF <- df2lim(DF)
BOWFred <- lim.redpol(BOWF)
str(BOWFred, max.length = 1)
#> List of 4
#> $ G : num [1:72, 1:22] 0.66559 -0.66559 -0.00845 0.04697 -0.04456 ...
#> $ H : num [1:72] -69 0 -28.6 0 0 ...
#> $ x0: num [1:28] 114.444 0.829 17.285 0 7.162 ...
#> $ Z : num [1:28, 1:22] 0.1541 -0.0368 0.1505 -0.087 0.4372 ...