  Fong developed `decorated cospans' to model various kinds of open systems:
that is, systems with inputs and outputs. In this framework, open systems are
seen as the morphisms of a category and can be composed as such, allowing
larger open systems to be built up from smaller ones. Much work has already
been done in this direction, but there is a problem: the notion of isomorphism
between decorated cospans is often too restrictive. Here we introduce and
compare two ways around this problem: structured cospans, and a new version of
decorated cospans. Structured cospans are very simple: given a functor $L
\colon \mathsf{A} \to \mathsf{X}$, a `structured cospan' is a diagram in
$\mathsf{X}$ of the form $L(a) \rightarrow x \leftarrow L(b)$. If $\mathsf{A}$
and $\mathsf{X}$ have finite colimits and $L$ is a left adjoint, there is a
symmetric monoidal category whose objects are those of $\mathsf{A}$ and whose
morphisms are isomorphism classes of structured cospans. However, this category
arises from a more fundamental structure: a symmetric monoidal double category.
Under certain conditions this symmetric monoidal double category is equivalent
to one built using our new version of decorated cospans. We apply these ideas
to symmetric monoidal double categories of open electrical circuits, open
Markov processes and open Petri nets.
