This document contains Matlab code that implements the firefly algorithm to solve constrained optimization problems. The firefly algorithm is used to minimize an objective function with bounds on the variables. It initializes a population of fireflies randomly within the bounds, calculates their light intensities based on the objective function, and iteratively moves the fireflies towards more intense ones while enforcing the bounds.