We propose a quantitative model of the effective interaction between the ma
gnetic flux-lines in a layered superconductor. It is derived from the Lawre
nce-Doniach model with all of its parameters derivable from experiments. Nu
merical simulations are performed using Langevin dynamics technique for par
ameters suitable for Bi-2212. We studied the elastic properties of flux lin
e lattices with various values of interlayer coupling strength and pinning
strengths. We show that the "softening" of the flux-line lattices with incr
easing temperature is mainly due to the increase of configurational entropy
of the lattice. The calculated results show good agreement with experiment
al observations and provide a unique way to study the properties of flux-li
ne lattices with random pinning.