Is there any way to put a constraint on number of decimal points a variable can take in LP?

E.g. Variable x(i,j,p) is taking values 0.00000000001

Can we force the variable to take only till 2 decimal places? In this case variables with this small values will become 0.

Or is there any other way possible to solve this issue?

Xpress-Optimizer works with floating point arithmetic and all solution values, including those for discrete decision variables (eg of type "binary" or "integer") will be real values that meet the constraints within certain tolerances. You can modify the default solver tolerances via the controls XPRS_FEASTOL and (for discrete problems) XPRS_MIPTOL.

When reporting solutions with Mosel, you can apply "round" to obtain integer values, or modify the number printing format globally:

setparam("realfmt", "%.2f")

or for an individual value:

writeln(strfmt(mynumber,0,2))

For rounding numbers within a model you could implement your own specific rounding function:

function round2d(r:real):real

returned:=round(100*r)/100

end-function

r:=12.3456

r2:=round2d(r)

writeln(r2) ! Output: 12.34