TaoW

15 Reputation

One Badge

3 years, 262 days

MaplePrimes Activity


These are questions asked by TaoW

n := 3;
Digits := 10;
R_const := 8.314;
currentdir();
const := [1, 1, 1];
b := 20;
W := readdata("data20.txt", 2);
W := [seq([W[i, 2], W[i, 1]], i = 1 .. nops(W))];
Tempset := seq(W[i, 1], i = 1 .. nops(W));
Rateset := seq(W[i, 2], i = 1 .. nops(W));
Temp := [seq(W[i, 1], i = 1 .. nops(W))];
pdata := plots[pointplot](W, color = red);
pdata;

h[5] := 1;
h[4] := 8.5733287401;
h[3] := 18.059016973;
h[2] := 8.6347608925;
h[1] := 0.2677737343;
p[5] := 1;
p[4] := 9.5733223454;
p[3] := 25.6329561486;
p[2] := 21.0996530827;
p[1] := 3.9584969228;
r := x -> local m; exp(-x)*add(h[m]*x^(m - 1), m = 1 .. 5)/(x*add(p[m]*x^(m - 1), m = 1 .. 5));

q := (i, x) -> -Temp[1]*exp(-E_sim[i]/(R_const*Temp[1])) + E_sim[i]*r(E_sim[i]/(R_const*Temp[1]))/R_const + x*exp(-E_sim[i]/(R_const*x)) - E_sim[i]*r(E_sim[i]/(R_const*x))/R_const;

for i to n do
    R[i] := [seq(1 - exp(-A_sim[i]*const[i]*q(i, Temp[j])/b), j = 2 .. nops(Temp))];
end do;
for i to n do
    Der[i] := [seq(c_sim[i]*A_sim[i]*const[i]*exp(-E_sim[i]/(R_const*Temp[j]))*(1 - R[i][j]), j = 1 .. nops(Temp) - 1)];
end do;
Deriv := add(Der[i], i = 1 .. n);
model := [seq([Temp[i], Deriv[i]], i = 1 .. nops(R[1]))];
objective := add((W[i, 2] - model[i, 2])^2, i = 1 .. nops(Temp) - 1);
with(GlobalOptimization);
infolevel[GlobalOptimization] := 3;
Results := GlobalOptimization[GlobalSolve](objective, {add(c_sim[i], i = 1 .. 3) <= 1}, c_sim[1] = 0.05 .. 0.06, c_sim[2] = 0.85 .. 0.88, c_sim[3] = 0.05 .. 0.6, E_sim[1] = 33880 .. 33890, E_sim[2] = 40220 .. 41230, E_sim[3] = 23230 .. 23235, A_sim[1] = 2453 .. 2455, A_sim[2] = 190 .. 192, A_sim[3] = 1830 .. 1832, timelimit = 7200);
          [GetLastSolution, GlobalSolve, Interactive]

Results := [Float(undefined), [A_sim[1] = 2454.85789978944, 

  A_sim[2] = 190.143107633747, A_sim[3] = 1831.19959951461, 

  E_sim[1] = 33883.8826959700, E_sim[2] = 40796.6139830241, 

  E_sim[3] = 23230.4022199775, c_sim[1] = 0.0558944062681716, 

  c_sim[2] = 0.851532317382881, c_sim[3] = 0.0845465106500359]]


DEV_perc := 100*sqrt(Results[1]/(nops(Temp) - 3*n))/max(Rateset);
       DEV_perc := Float(undefined) + Float(undefined) 

Unsolved for Maple?

Thanks for reading.

with(GlobalOptimization);

          [GetLastSolution, GlobalSolve, Interactive]

GlobalSolve(x3 - y3 - x + y, {x2 + 2*y <= 6}, x = 0 .. 5, y = 0 .. 5);
Error, (in GlobalOptimization:-GlobalSolve) finite bounds must be provided for all variables

 


 

Page 1 of 1