changeObjFunc: Sets/changes the Objective Function

View source: R/changeObjFunc.R

changeObjFuncR Documentation

Sets/changes the Objective Function

Description

The function changeObjFunc changes or sets the objective function for a specified model.

Usage

  changeObjFunc(model, react, obj_coef = rep(1, length(react)))

Arguments

model

An object of class modelorg.

react

An object of class reactId, character or integer. Specifies the fluxes (variables) for which to change the objective coefficients.

obj_coef

A numerical vector with length equal to the number of reaction id's given in argument react containing the objective coefficients.
Default: a value of one for each reaction given in argument react.

Details

The argument react will be evaluated by the function checkReactId. The return value is used to change the objective function.

All reactions not given in argument react will get an objective value of zero.

Value

Returns the given model containing the new objective function.

Author(s)

Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de>

Maintainer: Mayo Roettger <mayo.roettger@hhu.de>

See Also

checkReactId

Examples

  ## sets the objective function to the ATP maintenance reaction:
  data(Ec_core)
  Ec_new <- changeObjFunc(Ec_core, "ATPM")

SysBioChalmers/sybil documentation built on Aug. 24, 2023, 1:08 p.m.