I’m looking at the “Enforcing physical constraints via universal differential-algebraic equations” example (https://diffeqflux.sciml.ai/dev/examples/physical_constraints/), which trains a neural ordinary differential equation to solve a stiff ODE with constraints. The model is defined as follows:
As best I can tell, the mass matrix M = [1. 0 0 // 0 1. 0 // 0 0 0] and the constraint equation (u, p, t) -> [u[1] + u[2] + u[3] - 1] convey the same information: that the state variables of the ODE must always sum to 1. Why are both supplied in this example?