You are right, `nlcon_ineq_idx` and `nlcon_eq_idx` should be properties for the child class `NonlinearProgramWConstraint`, rather than in the base class. I need them in the child class because in each`NonlinearConstraint`, it evaluates the equality and inequality constraints together. I can then use 'nlcon_ineq_idx' and 'nlcon_eq_idx' to extract the equality and in-equality parts. If instead we require that in the NLP we sepecify nonlinear inequality constraints first, and then nonlinear equality constraints, we then need to reorder the constraints in each of the `NonlinearConstraint`, which I feel can be harder to implement.
These two properties would not be specified by the user of `NonlinearProgramWConstraint`,  the `addNonlinearConstraint` method would generate these two properties automatically.