def lTdot(m, i, k): if i > 0: return m.Tdot[i, k] ==\ -(m.pm[i, k] - m.pn[i, k]) * m.xdot[i, k] / \ (m.x[i, k] * exp(m.CapAm - m.CapBm/(m.T[i, k] + m.CapCm)) * m.CapBm/(m.T[i, k] + m.CapCm)**2 + (1 - m.x[i, k]) * exp(m.CapAn - m.CapBn/(m.T[i, k] + m.CapCn)) * m.CapBn/(m.T[i, k] + m.CapCn)**2) else: return Constraint.Skip
def _odet_rule(mod, t): if t > 0: return mod.dT_dt[t] == \ ((mod.yf - mod.T[t]) / mod.theta + mod.k10 * exp(-mod.n / mod.T[t]) * mod.C[t] - mod.alpha[0] * mod.u[t] * (mod.T[t] - mod.yc)) else: return Constraint.Skip
def _odet_rule(mod, i, j): if i <= mod.nfe: return mod.tdot[i, j] == \ (mod.yf - mod.T[i, j])/mod.theta + mod.k10 * exp(-mod.n/mod.T[i, j]) * mod.C[i, j] - \ mod.alpha[0] * mod.u[i, j] * (mod.T[i, j] - mod.yc) else: return Constraint.Skip
def _odec_rule(mod, i, j): if i <= mod.nfe: return mod.cdot[ i, j] == (1 - mod.C[i, j]) / mod.theta - mod.k10 * exp( -mod.n / mod.T[i, j]) * mod.C[i, j] else: return Constraint.Skip
def _odet_rule(mod, i, j): if j > 0: return mod.dT_dt[i, j] == \ ((mod.yf - mod.T[i, j]) / mod.theta + mod.k10 * exp(-mod.n / mod.T[i, j]) * mod.C[i, j] - mod.alpha[0] * mod.u[i, j] * (mod.T[i, j] - mod.yc)) * mod.h[i] else: return Constraint.Skip
def lpn(m, i, k): if i > 0: return m.pn[i, k] == exp(m.CapAn - m.CapBn/(m.T[i, k] + m.CapCn)) else: return Constraint.Skip
def lpm(m, i, k): if i > 0: return m.pm[i, k] == exp(m.CapAm - m.CapBm/(m.T[i, k] + m.CapCm)) else: return Constraint.Skip
def _odec_rule(mod, t): if t > 0: return mod.dC_dt[t] == \ ((1 - mod.C[t]) / mod.theta - mod.k10 * exp(-mod.n / mod.T[t]) * mod.C[t]) else: return Constraint.Skip
def _odec_rule(mod, i, j): if j > 0: return mod.dC_dt[i, j] == \ ((1 - mod.C[i, j]) / mod.theta - mod.k10 * exp(-mod.n / mod.T[i, j]) * mod.C[i, j]) * mod.h[i] else: return Constraint.Skip