def forward()

in models/relay_constant.py [0:0]


    def forward(self, t, state):
        x, rfp, yfp, cfp, f530, f480, luxR, lasR, luxI, lasI = torch.unbind(state[:, :, : self.n_species], axis=2)

        # Cells growing or not (not before lag-time)
        gr = self.r * torch.sigmoid(4.0 * (t - self.tlag))

        # Specific growth and dilution
        g = 1.0 - x / self.K
        gamma = gr * g

        # Promoter activity
        boundLuxR = luxR * luxR * self.fracLuxR
        boundLasR = lasR * lasR * self.fracLasR
        P76 = (self.e76 + self.KGR_76 * boundLuxR + self.KGS_76 * boundLasR) / (
            1.0 + self.KGR_76 * boundLuxR + self.KGS_76 * boundLasR
        )
        P81 = (self.e81 + self.KGR_81 * boundLuxR + self.KGS_81 * boundLasR) / (
            1.0 + self.KGR_81 * boundLuxR + self.KGS_81 * boundLasR
        )

        # Right-hand sides
        d_x = gamma * x
        d_rfp = self.rc - (gamma + self.drfp) * rfp
        d_yfp = self.rc * self.aYFP * P81 - (gamma + self.dyfp) * yfp
        d_cfp = self.rc * self.aCFP * P76 - (gamma + self.dcfp) * cfp
        d_f530 = self.rc * self.a530 - gamma * f530
        d_f480 = self.rc * self.a480 - gamma * f480
        d_luxR = self.rc * self.aR - (gamma + self.dR) * luxR
        d_lasR = self.rc * self.aS - (gamma + self.dS) * lasR

        d_luxI = self.rc * P81 - (gamma + self.dluxI) * luxI
        d_lasI = self.rc * P76 - (gamma + self.dlasI) * lasI

        d_c6 = (self.KC6 * self.rc * x * luxI) / (1.0 + luxI / self.Klux)
        d_c12 = (self.KC12 * self.rc * x * lasI) / (1.0 + lasI / self.Klas)

        dX = torch.stack(
            [d_x, d_rfp, d_yfp, d_cfp, d_f530, d_f480, d_luxR, d_lasR, d_luxI, d_lasI, d_c6, d_c12], axis=2,
        )
        if self.precisions is not None:
            dV = self.precisions(t, state, None, self.n_batch, self.n_iwae)
            return torch.cat([dX, dV], dim=2)
        else:
            return dX