Is it possible to constraint onehotencoding without using any special functions?

In reply to MP:

Thankyou MP.