create.Constraint: Create a Constraint Analysis for T/W with respect to W/D from...

View source: R/constaint.r

create.ConstraintR Documentation

Create a Constraint Analysis for T/W with respect to W/D from objective list

Description

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.

Usage

create.Constraint(Cons = constraint.default, func = c("CA_TURN", "CA_ENERGY_LEVEL", "CA_CLIMB", "CA_CRUISE_V", "CA_SERVICE_CEILING", "CA_TO_DISTANCE"))

Arguments

Cons

The constraint list

func

A string vector of functions to apply

Author(s)

Hao Li

See Also

Constraint.default

Examples

##---- 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
  }

HaoLi111/rAviExp documentation built on Oct. 21, 2022, 2:18 a.m.