/* * This code is generated by BioUML FrameWork * for BIOMD0000000082.xml diagram at 2008.03.20 15:08:03 */ import biouml.plugins.simulation.ae.NewtonSolver; import biouml.plugins.simulation.java.JavaBaseModel; import ru.biosoft.math.MathRoutines; public class BIOMD0000000082 extends JavaBaseModel { /* * Write rules to calculate equation parameters */ /* * Write rules to calculate equation parameters excluding internal variables. */ public void __internalRateVarInitFunc_0(double time, double[] x) { rate_Forming = cell*(Forming_k1*x[8]*x[7] - Forming_k7*x[9]); rate_reaction_1 = cell*(reaction_1_k2*x[9]*x[5] - reaction_1_k8*x[1]); rate_reaction_2 = cell*(reaction_2_k3*x[1] - reaction_2_k9*x[0]*x[3]); rate_reaction_3 = cell*(reaction_3_k4*x[0]*x[4] - reaction_3_k10*x[2]); rate_reaction_4 = cell*reaction_4_k5*x[2]; rate_reaction_5 = cell*reaction_5_k6*x[6]; } public void Init() { initialValues = getInitialValues(); /* * Initialize variables */ cell = 1.0; // initial value of $cell Forming_k1 = 5000000.0; // initial value of Forming_k1 Forming_k7 = 0.5; // initial value of Forming_k7 reaction_1_k2 = 1.0E8; // initial value of reaction_1_k2 reaction_1_k8 = 0.1; // initial value of reaction_1_k8 reaction_2_k3 = 0.1; // initial value of reaction_2_k3 reaction_2_k9 = 100000.0; // initial value of reaction_2_k9 reaction_3_k10 = 0.1; // initial value of reaction_3_k10 reaction_3_k4 = 1.0E7; // initial value of reaction_3_k4 reaction_4_k5 = 0.05; // initial value of reaction_4_k5 reaction_5_k6 = 0.1; // initial value of reaction_5_k6 } /* * Model variables initial values */ protected double rate_Forming; protected double rate_reaction_1; protected double rate_reaction_2; protected double rate_reaction_3; protected double rate_reaction_4; protected double rate_reaction_5; protected double cell; protected double Forming_k1; protected double Forming_k7; protected double reaction_1_k2; protected double reaction_1_k8; protected double reaction_2_k3; protected double reaction_2_k9; protected double reaction_3_k10; protected double reaction_3_k4; protected double reaction_4_k5; protected double reaction_5_k6; public double[] extendResult(double time,double [] x) { this.time = time; double[] y = new double[10]; y[0] = x[0]; y[1] = x[1]; y[2] = x[2]; y[3] = x[3]; y[4] = x[4]; y[5] = x[5]; y[6] = x[6]; y[7] = x[7]; y[8] = x[8]; y[9] = x[9]; return y; } public double[] getInitialValues() { double [] x = new double[10]; this.time = 0.0; x[0] = 0.0; // - $"cell.DRG" x[1] = 0.0; // - $"cell.DRG_GDP" x[2] = 0.0; // - $"cell.DRG_GTP" x[3] = 0.0; // - $"cell.GDP" x[4] = 1.0E-5; // - $"cell.GTP" x[5] = 1.0E-9; // - $"cell.G_GDP" x[6] = 0.0; // - $"cell.G_GTP" x[7] = 1.0E-9; // - $"cell.Recptor" x[8] = 1.0E-8; // - $"cell.agonist" x[9] = 0.0; // - $cell.DR __internalRateVarInitFunc_0(time, x); return x; } /* * code for algebraic rules calculations */ /* * end of code for algebraic rules calculations */ protected void calculateRates(double time, double[] x) { __internalRateVarInitFunc_0(time, x); } /* * calculate dy/dt for 'BIOMD0000000082.xml' model */ public void __internalDyDt_0(double time, double [] x, double[] result) { result[0] = +rate_reaction_2-rate_reaction_3; result[1] = +rate_reaction_1-rate_reaction_2; result[2] = +rate_reaction_3-rate_reaction_4; result[3] = +rate_reaction_2; result[4] = -rate_reaction_3; result[5] = -rate_reaction_1+rate_reaction_5; result[6] = +rate_reaction_4-rate_reaction_5; result[7] = -rate_Forming; result[8] = -rate_Forming; result[9] = +rate_Forming-rate_reaction_1+rate_reaction_4; } protected double [] calculateResult(double time, double[] x) { double[] result = new double[10]; __internalDyDt_0(time, x, result); return result; } public double[] dy_dt(double time, double[] x) { this.time = time; calculateRates( time,x ); return calculateResult( time,x ); } } // class ...