create.Constraint | R Documentation |
This model is from book General Aviation Aircraft by Snorri Gudmundsonn. Although 'constraint analysis' is a method applied in a lot of field in this package it is for Thrust to weight ratio (T/W or T/F_G) with respect to wing loading (F_G/S). Creation of this matrix work out the lower bound of Thrust to Weight ratio which suggests the boundary of the feasible range. Not all fields are required.
create.Constraint(Cons = constraint.default, func = c("CA_TURN", "CA_ENERGY_LEVEL", "CA_CLIMB", "CA_CRUISE_V", "CA_SERVICE_CEILING", "CA_TO_DISTANCE"))
Cons |
The constraint list |
func |
A string vector of functions to apply |
Hao Li
Constraint.default
##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. create(Constraint.default) ## The function is currently defined as function (Cons = constraint.default, func = c("CA_TURN", "CA_ENERGY_LEVEL", "CA_CLIMB", "CA_CRUISE_V", "CA_SERVICE_CEILING", "CA_TO_DISTANCE")) { m <- matrix(rep(0, times = (length(func) + 1) * length(Cons$W_S)), ncol = length(func) + 1) m[, 1] <- Cons$W_S for (i in seq_along(func)) { m[, i + 1] <- get(func[i])(Cons) } colnames(m) = c("W_S", func) m = list(Constraint = Cons, Out = m) class(m) <- "ConstraintOut" m }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.