% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rxode2.R
\name{rxTrans}
\alias{rxTrans}
\alias{rxTrans.default}
\alias{rxTrans.character}
\title{Translate the model to C code if needed}
\usage{
rxTrans(
  model,
  modelPrefix = "",
  md5 = "",
  modName = NULL,
  modVars = FALSE,
  ...
)

\method{rxTrans}{default}(
  model,
  modelPrefix = "",
  md5 = "",
  modName = NULL,
  modVars = FALSE,
  ...
)

\method{rxTrans}{character}(
  model,
  modelPrefix = "",
  md5 = "",
  modName = NULL,
  modVars = FALSE,
  eventSensKey = .rxEventSensCacheKey,
  ...
)
}
\arguments{
\item{model}{This is the ODE model specification.  It can be:
\itemize{
\item a string containing the set of ordinary differential
equations (ODE) and other expressions defining the changes in
the dynamic system.
\item a file name where the ODE system equation is contained
}

An ODE expression enclosed in \verb{\\\{\\\}}

(see also the \code{filename} argument). For
details, see the sections \dQuote{Details} and
\verb{rxode2 Syntax} below.}

\item{modelPrefix}{Prefix of the model functions that will be
compiled to make sure that multiple rxode2 objects can coexist
in the same R session.}

\item{md5}{Is the md5 of the model before parsing, and is used to
embed the md5 into DLL, and then provide for functions like
\code{\link[=rxModelVars]{rxModelVars()}}.}

\item{modName}{a string to be used as the model name. This string
is used for naming various aspects of the computations,
including generating C symbol names, dynamic libraries,
etc. Therefore, it is necessary that \code{modName} consists of
simple ASCII alphanumeric characters starting with a letter.}

\item{modVars}{returns the model variables instead of the named
vector of translated properties.}

\item{...}{Ignored parameters.}

\item{eventSensKey}{event ("jump") sensitivity mode key folded into
the parsed md5 cache key so the same model text translated in
different modes (e.g. \code{"fd"} vs \code{"jump"}) compiles to distinct
DLLs instead of colliding on a cached translation.  Defaults to
the session global \code{.rxEventSensCacheKey} (set by \code{\link[=rxode2]{rxode2()}}
before parsing); an empty string leaves the md5 unchanged so the
legacy \code{"fd"} path keeps existing caches valid.  It is a formal
argument (rather than read from the global in the body) because
\code{rxTrans.character} is memoised and \code{memoise} keys on
default-valued formals, so the cache distinguishes the modes.}
}
\value{
a named vector of translated model properties
including what type of jacobian is specified, the \code{C} function prefixes,
as well as the \code{C} functions names to be called through the compiled model.
}
\description{
This function translates the model to C code, if needed
}
\seealso{
\code{\link[=rxode2]{rxode2()}}, \code{\link[=rxCompile]{rxCompile()}}.
}
\author{
Matthew L.Fidler
}
