Doing so is non-trivial, I strongly encourage you to consider if you need to do this. Here is some code to get you started:

using JuMP, CPLEX
model = direct_model(CPLEX.Optimizer())
# ... build model ...
optimize!(model)
cpx = backend(model)
redlp_p = Ref{Ptr{Cvoid}}()
CPXgetredlp(cpx.env, cpx.lp, redlp_p)
lp = redlp_p[] # Use this pointer with CPX functions

Depending on what you mean by â€śnon redundant,â€ť there are better ways of doing this. For example, you could check the slack of each constraint to see if it is binding, or you could look for constraints with a dual of 0.0.

The 3 constraints are non-redundant, but presolve will eliminate all of them (they form a triangular system).

CPLEX also makes use of dual reductions. These are transformations that may remove some feasible solution, but keeps all optimal ones. Again, these may eliminate non-redundant constraints.

Finally, if you want a set of non-redundant constraints that are active at the optimum, you are looking for a basis, which you should be able to query from CPLEX without needing to go through the presolved model.