R/tabu_search.R
random_composition_with_fixed_pb.RdSimulates a random composition whose coordinate system is constructed from
a sequential binary partition induced by a given first balance. The supplied
balance is completed to a full orthonormal basis using
sbp_basis with fill = TRUE.
random_composition_with_fixed_pb(principal_balance, n = 100, sd1 = 5)A composition matrix with n rows and
length(principal_balance) columns.
Standard normal latent coordinates are first generated in dimension
\(D - 1\), where \(D\) is the number of parts. Their sample covariance
matrix is then diagonalized, and the associated eigenvectors are used to
rotate the latent coordinates before mapping them back to the simplex using
the basis induced by principal_balance.
This function is mainly intended for examples, simulation studies, and experiments where a specific first balance structure is desired.