Optical orthogonal codes play an important role in optical code-division multiple access systems. In order to support heterogeneous quality of service, it is of interests to employ optical orthogonal codes in which different codewords may have different Hamming weights. In this paper a construction method of variable-weight optical orthogonal codes combining meta-heuristic search algorithm and combinatorial block designs is studied. This method is capable of producing variable-weight optical orthogonal codes with large and flexible parameters. We construct three infinite families of optimal variable-weight optical orthogonal codes using the proposed method.