<<mathsbml.m

<<xlr8r.m

<<xlr8r2sbml.m

parameters={ky-> 0.2, dy-> 0.1, Dy-> 0.1, kD-> 3.0, tauw-> 10, dw-> 0.1, hw-> 0, Twy-> -20, Twa-> 0.5, a-> 0.1, b-> 0.2, beta-> 0.1, c-> 0.1, d-> 0.01, Da-> 0.1, Db-> 1.5};

net:= {
{Y↦W,GRN[1/tauw,Twy,1,hw,sigma]},
{A↦W, GRN[1/tauw,Twa,1,hw,sigma]},
{W→∅, dw},
{∅+L1-> Y+L1, ky}, {Y-> ∅, dy}, 
{∅-> A,a},
{A+Y-> Y,d}, {A-> ∅, beta},
{2A+B→3A,c}, 
{A→B, b}
};

interpret[net]/.parameters

step[t_]:= Which[t<200, 0,t<350, 1,t>350,  0];

q=run[net,initialConditions-> {A->  0, B-> 0, Y-> 0, W-> 0}, rates-> parameters, timeSpan-> 500, "BoundaryConditions"-> {L1[t]-> step[t]}]; 
Show[runPlot[q], Plot[step[t], {t, 0 , 500}, PlotStyle-> {Thickness[.01], LightGray}]]

gridPlot[q, {W, Y, A, B}, plotColumns-> 2]

sbml=convertToSBML[Drop[net,2],  {L1-> 1, A->  0, B-> 0, Y-> 0, W-> 0},parameters, WUSactivator, WUSact,meristem];

Export["Wuschel.xml", sbml, "text"]