Restricting the value of a Deterministic variable

There is a post about using random variables as bounds for prior distributions (see here) which is also helpful. Using the same method, early experiments indicate that the following works:

from theano import tensor as tt
alphaMax = tt.as_tensor_variable(0.5)
with pm.Model() as myModel:
    sig = pm.HalfNormal('sig', sd=2)
    kappa = pm.Normal('kappa', mu=1, sd=1)
    rhoCp_ = pm.Normal('rhoCp_', mu=4, sd=1)
    rhoCp = pm.Determinstic('rhoCp', tt.maximum(rhoCp, kappa/alphaMax))
    alpha = pm.Determinstic('alpha', kappa/rhoCp)
    SE = ComplicatedModel(alpha, data)    # Squared error between model output and data
    pm.Potential('res', -0.5*SE/sig**2)