Setting Dose as a Variable for an infusion

Problem: What dose would give me an X plasma concentration 2 hours after dosing of a 0.5 hour infusion?

I would like to set the dose as a variable to find the dose that would give a specific plasma concentration after 2 hours. The plasma concentration I would put in a dummy sheet after 2 hours. The dosing is an IV infusion with a duration of 0.5 hours.

If I define A1Dose as a variable an error of 2 definitions for the variable appears “Variable ‘A1Dose’ multiple definition”.

The sequence statement would be an easy fix for a bolus dose but not since this an infusion.

Anyone got a solution for this?

My model (as an example):

deriv(A1 = - (A1 * ke)

C=A1/V

error(CEps = 0.25)
observe(CObs = C * (1 + CEps))

dosepoint(A1, idosevar = A1Dose, infdosevar = A1InfDose, infratevar = A1InfRate)

stparm(ke=tvke)
stparm(V = tvV)

fixef(tvke (freeze) = c(0, 1, ))
fixef(tvV (freeze) = c(0, 1, ))