Question:How can fix the error"Error, (in Optimization:-NLPSolve) non-numeric result encountered"

Question:How can fix the error"Error, (in Optimization:-NLPSolve) non-numeric result encountered"

Maple

Hello everyone. after runnig this maple code i get the error :" Error, (in Optimization:-NLPSolve) non-numeric result encountered" . How can fix it?

restart;
Digits := 20;
with(LinearAlgebra);
with(linalg);
with(Optimization);
with(Student[Calculus1]);
NULL;
n := 2;
z := 1;
a := 0;
b := 1;
m := 2;
NULL;
PS1 := (j, t) -> piecewise(j = 0, 1, t^(j + s[j]));
PI1 := (j, t) -> piecewise(j = 0, 1, t^(j + q[j]));
PH1 := (j, t) -> piecewise(j = 0, 1, t^(j + h[j]));
PL1 := (j, t) -> piecewise(j = 0, 1, t^(j + l[j]));
NULL;
PS := t -> local j; Transpose(convert([seq(PS1(j, t), j = 0 .. n - 1)], Matrix));
P_I := t -> local j; Transpose(convert([seq(PI1(j, t), j = 0 .. n - 1)], Matrix));
PH := t -> local j; Transpose(convert([seq(PH1(j, t), j = 0 .. n - 1)], Matrix));
PL := t -> local j; Transpose(convert([seq(PL1(j, t), j = 0 .. n - 1)], Matrix));
Warning, (in PS) `j` is implicitly declared local
Warning, (in P_I) `j` is implicitly declared local
Warning, (in PH) `j` is implicitly declared local
Warning, (in PL) `j` is implicitly declared local

NULL;
NULL;
B1 := (i, j) -> piecewise(i = j and j = 1, 1, i = 1 and 1 < j, 0, i = j and j = 2, 1, i = 2 and 2 < j, 0, j <= i, (i + j - 2)!/(2^(j - 1)*(j - 1)!*(i - j)!));
NULL;

B := t -> Matrix(n, B1);

DS1 := (m, k) -> piecewise(m <= 1, 0, m = k, GAMMA(k + s[k - 1])/GAMMA(k + s[k - 1] - z));
DI1 := (m, k) -> piecewise(m <= 1, 0, m = k, GAMMA(k + i[k - 1])/GAMMA(k + i[k - 1] - z));
DH1 := (m, k) -> piecewise(m <= 1, 0, m = k, GAMMA(k + h[k - 1])/GAMMA(k + h[k - 1] - z));
DL1 := (m, k) -> piecewise(m <= 1, 0, m = k, GAMMA(k + l[k - 1])/GAMMA(k + l[k - 1] - z));
DS := t -> t^(-z)*Matrix(n, DS1);
DI := t -> t^(-z)*Matrix(n, DI1);
DH := t -> t^(-z)*Matrix(n, DH1);
DL := t -> t^(-z)*Matrix(n, DL1);
NULL;
NULL;

cs := i -> ps[i];
ci := j -> p[j];
ch := j -> ph[j];
cl := i -> pl[i];
CS := convert([seq(cs(i), i = 1 .. n)], Matrix);
CI := convert([seq(ci(i), i = 1 .. n)], Matrix);
CH := convert([seq(ch(i), i = 1 .. n)], Matrix);
CL := convert([seq(cl(i), i = 1 .. n)], Matrix);

NULL;
NULL;
NULL;
S := unapply(simplify(Multiply(Multiply(CS, B(t)), PS(t))[1, 1]), [t]);
I1 := unapply(simplify(Multiply(Multiply(CI, B(t)), P_I(t))[1, 1]), [t]);
H := unapply(simplify(Multiply(Multiply(CH, B(t)), PH(t))[1, 1]), [t]);
L := unapply(simplify(Multiply(Multiply(CL, B(t)), PL(t))[1, 1]), [t]);
DSS := unapply(simplify(Multiply(Multiply(Multiply(CS, B(t)), DS(t)), PS(t))[1, 1]), [t]);
DII := unapply(simplify(Multiply(Multiply(Multiply(CI, B(t)), DI(t)), P_I(t))[1, 1]), [t]);
DHH := unapply(simplify(Multiply(Multiply(Multiply(CH, B(t)), DH(t)), PH(t))[1, 1]), [t]);
DLL := unapply(simplify(Multiply(Multiply(Multiply(CL, B(t)), DL(t)), PL(t))[1, 1]), [t]);
NULL;

NULL;
RS := unapply(evalf(DSS(t) + (-0.0043217^z + 0.5944^z*Multiply(S(t), I1(t)) + (0.025^z + 0.0008^z)*S(t))), [t]);

RI := unapply(evalf(DII(t) + (-0.5944^z*Multiply(S(t), I1(t)) - 0.0056^z*Multiply(H(t), I1(t)) - 0.027^z*L(t) + (((0.025^z + 0.0008^z) + 0.025^z) + 0.5^z)*I1(t))), [t]);
RH := unapply(evalf(DHH(t) + (-0.535^z + 0.0056^z*Multiply(H(t), I1(t)) - 0.5^z*I1(t) + (0.025^z + 0.0008^z)*H(t))), [t]);
RL := unapply(evalf(DLL(t) + (-0.025^z*I1(t) + (0.025^z + 0.0008^z + 0.027^z)*L(t))), [t]);
R := unapply(evalf(RS(t)^2 + RI(t)^2 + RH(t)^2 + RL(t)^2), [t]);

NULL;

p1 := x -> (x^2 - 1)^m;
dmp1 := x -> diff(p1(x), x \$ m);
NULL;
p := x -> dmp1(x)/(2^m*m!);
eq := p(x) = 0;
r := solve(eq, x);
NULL;
ss := Vector[row](m);
w := Vector[row](m);
for i to m do
w[i] := 2/((-r[i]^2 + 1)*D(p)(r[i])^2);
ss[i] := w[i]*evalf(R((b - a)/2*r[i] + (b + a)/2));
end do;

Lambda := evalf((b - a)/2*SS);
;

C1 := S(0) - 43994 = 0;
C2 := I1(0) - 0.1 = 0;
C3 := H(0) = 0;
C4 := L(0) - 1 = 0;

NULL;
NLP := NLPSolve(Lambda, {C1, C2, C3, C4});
Error, (in Optimization:-NLPSolve) non-numeric result encountered

﻿