Simulation of ordinal and discrete variables with given