% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convert.R
\name{model_to_edgelist}
\alias{model_to_edgelist}
\title{Convert a system-dynamics model file to an edge list}
\usage{
model_to_edgelist(path, format = NULL)
}
\arguments{
\item{path}{Path to the model file.}

\item{format}{One of \code{cld_formats()}. If \code{NULL} (default) the
format is guessed from the file extension.}
}
\value{
A data.frame with columns \code{INPUT} and \code{OUTPUT}. Node
diagram positions, when available, are attached as
\code{attr(x, "positions")}.
}
\description{
Reads a model from Vensim, Stella / iThink, Powersim Studio, AnyLogic or
GoldSim and returns a two-column data.frame of INPUT (cause) and OUTPUT
(effect) links --- the same edge list produced by the SDM Network Analyzer.
}
\examples{
# Convert the bundled example Vensim model to an edge list
mdl <- system.file("extdata", "example_model.mdl", package = "CLDedgelister")
el <- model_to_edgelist(mdl)
head(el)
}
