I have the following delay-differential-algebraic system:
\begin{align} c(t) =& \kappa\min (1, \tfrac{\beta}{\alpha} a(t)), \tag{1a}\\ a(t) =& \left\{ \begin{array}{lcl} \frac{\alpha}{\beta} & \text{if} & s(t) > 0,\\ \min(\frac{\alpha}{\beta}, c(t-\Delta)) & \text{if} & s(t) = 0 \end{array}\right. ,\tag{1b}\\ \frac{\text{d} s}{\text{d} t}(t) =& c(t-\Delta) - a(t).\tag{1c} \end{align}
which I am trying to numerically estimate by the following code:
ClearAll[a, c, t, s, inic, inia] ClearAll["Global'*"] kappa = 2; alpha = 1; beta = 2; delta = 1; amax = 10; T = 1.1; inic[t_] := -t; inia[t_] := inic[t - delta] eq1 = c[t] == kappa*Min[1, (beta/alpha)*a[t]] eq2 = a[t] == Piecewise[{{Min[alpha/beta, c[t - delta]], s[t] == 0}, {alpha/beta, s[t] > 0}}] eq3 = s'[t] == c[t - delta] - a[t] initialConditions = { a[t /; t <= 0] == inia[t], c[t /; t <= 0] == inic[t], s[t /; t <= 0] == 0} sol = NDSolve[ Union[{eq1, eq2, eq3}, initialConditions ], {a, c, s}, {t, -delta, T}] Plot[Evaluate[{c[t], a[t], s[t]} /. sol], {t, -delta, T}] I don't know what I am doing wrong, but the plot does not make any sense: 
I've only included a small segment after $t=1$, because all three functions completely explode to $10^{20}$ and upwards at $t=2$. This is inconsistent with the equations, which state that $c(t), a(t)$ can attain at most values of $2$ and $\frac{1}{2}$ respectively, which they attain in the plot between $t=0$ and $t=1$. Moreover the plot doesn't show the values of the functions at interval $t=[-1,0]$, even though these are given as initial conditions.
Why does it give this strange result?
A piece of the puzzle may be that NDSolve gives the following error:
NDSolve::ivcon: The given initial conditions were not consistent with the differential-algebraic equations. NDSolve will attempt to correct the values. >> 

0aftert=1, causing a stiff system. $\endgroup$