*--------------------------------------------------------------* * Test Problem 6 from Chapter 8, section 5.8 * * Pharmacokinetic Model * *--------------------------------------------------------------* Sets m number of data sets /1*8/ n number of variabels /1*2/ p number of parameter sets /1*2/ j number of parameters in each set /1*3/; Parameters ze(m,n) observed data values; Variables z(m) fitted data variables a(p,j) model parameters c cost function; table ze(m,n) 1 2 1 4.0 0.1622 2 8.0 0.6791 3 12.0 0.6790 4 24.0 0.3875 5 48.0 0.1822 6 72.0 0.1249 7 94.0 0.0857 8 118.0 0.0616; Equations obj objective function con(m) model constraint; obj.. c =e= sum(m,sqr((z(m)-ze(m,'2'))/z(m))); con(m) .. -z(m) + sum(j,a('1',j) * exp(-a('2',j)*ze(m,'1'))) =e= 0; model problem /obj,con/; z.lo(m) = 0; z.up(m) = 1; a.lo('1',j) = -10; a.lo('2',j) = 0; a.up('1',j) = 10; a.up('2',j) = 0.5; z.l(m) = uniform(z.lo(m),z.up(m)); a.l('1','1') = 0.355; a.l('1','2') = 2.007; a.l('1','3') = -4.575; a.l('2','1') = 0.015; a.l('2','2') = 0.110; a.l('2','3') = 0.285; solve problem using nlp minimizing c;