  We provide algorithms for performing computations in generalized numerical
semigroups, that is, submonoids of $\mathbb{N}^{d}$ with finite complement in
$\mathbb{N}^{d}$. These semigroups are affine semigroups, which in particular
implies that they are finitely generated. For a given finite set of elements in
$\mathbb{N}^d$ we show how to deduce if the monoid spanned by this set is a
generalized numerical semigroup and, if so, we calculate its set of gaps. Also,
given a finite set of elements in $\mathbb{N}^d$ we can determine if it is the
set of gaps of a generalized numerical semigroup and, if so, compute the
minimal generators of this monoid. We provide a new algorithm to compute the
set of all generalized numerical semigroups with a prescribed genus (the
cardinality of their sets of gaps). It was used to compute the number of such
semigroups, and its implementation allowed us to compute (for various
dimensions) the number of numerical semigroups for genus that had not been
attained before.
