I am solving the Kuramoto model on a random graph $G(n,p)$, plotting the synchrony against the coupling parameter, as follows,
n = {300};
tmax = 100;
evaltime = 10;
SeedRandom[Nosc];
rg1 = RandomGraph[BernoulliGraphDistribution[n[[1]], 6/n[[1]]]];
rg2 = AdjacencyGraph[AdjacencyMatrix[rg1]];
Nosc = Length@VertexList[rg2];
omegadata = VertexDegree[rg2];
\[Theta]start = RandomReal[{0, 2*Pi}, Nosc];
A = AdjacencyMatrix[rg2];
avg = 1;
a[l_, t_] := Module[{}, \[Lambda] = l;
eqns1 = {Table[\[Theta][i]'[tt] ==
omegadata[[i]] + \[Lambda]*
Sum[A[[i, j]] (Sin[\[Theta][j][tt] - \[Theta][i][tt]]), {j, 1,
Nosc, 1}], {i, 1, Nosc, 1}],
Table[\[Theta][i][0] == \[Theta]start[[i]], {i, 1, Nosc, 1}]};
sol1 = NDSolve[eqns1,
Table[\[Theta][i], {i, 1, Nosc, 1}], {tt, 0, tmax, 1}];
Table[Evaluate[Table[\[Theta][i][t], {i, 1, Nosc, 1}] /. sol1][[1,
i]], {i, 1, Nosc}]
]
ListPlot[Table[{i,
Abs[1/Nosc Total[
Exp[-I Mean[Table[a[i, evaltime], {j, 1, avg}]]]]]}, {i, 0.2,
1.2, 0.1}], PlotRange -> Full] // AbsoluteTiming
It only takes 5 seconds here, but with more oscillators it can take much longer. Is it possible to get NDSolve to obtain only an approximate solution much faster by adding options (or obtain a solution using a different method)? This might help when the graph is large and the simulation takes much longer.