  We propose the notion of GAS numerical semigroup which generalizes both
almost symmetric and 2-AGL numerical semigroups. Moreover, we introduce the
concept of almost canonical ideal which generalizes the notion of canonical
ideal in the same way almost symmetric numerical semigroups generalize
symmetric ones. We prove that a numerical semigroup with maximal ideal $M$ and
multiplicity $e$ is GAS if and only if $M-e$ is an almost canonical ideal of
$M-M$. This generalizes a result of Barucci about almost symmetric semigroups
and a theorem of Chau, Goto, Kumashiro, and Matsuoka about 2-AGL semigroups. We
also study the transfer of the GAS property from a numerical semigroup to its
gluing, numerical duplication and dilatation.
