  The effects of confinement on colloidal self-assembly in the case of fixed
number of confined particles are studied in the one dimensional lattice model
solved exactly in the Grand Canonical Ensemble (GCE) in [J. P\k{e}kalski et al.
J. Chem. Phys. 142, 014903 (2015)]. The model considers a pair interaction
defined by a short-range attraction plus a longer-range repulsion. We consider
thermodynamic states corresponding to self-assembly into clusters. Both, fixed
and adaptive boundaries are studied. For fixed boundaries, there are particular
states in which, for equal average densities, the number of clusters in the GCE
is larger than in the Canonical Ensemble. The dependence of pressure on density
has a different form when the system size changes with fixed number of
particles and when the number of particles changes with fixed size of the
system. In the former case the pressure has a nonmonotonic dependence on the
system size. The anomalous increase of pressure for expanding system is
accompanied by formation of a larger number of smaller clusters. In the case of
elastic confining surfaces we observe a bistability, i.e. two significantly
different system sizes occur with almost the same probability. The mechanism of
the bistability in the closed system is different to that of the case of
permeable walls, where the two equilibrium system sizes correspond to a
different number of particles.
