This is a script I used to solve the Generalized Selective Household Activity Routing Problem using GA (benchmark algorithm from which I tested my reoptimization algorithm). G-SHARP is an extension of Recker's (1995) HAPP model, to include different activity types, candidate destinations by type, and destination choice along with the original routing and scheduling for a household. It allows for both compulsory and non-compulsory activity types. For more information, see my paper on: "Activity-based travel scenario analysis with routing problem reoptimization". Disclaimer: this is meant to illustrate one implementation of the algorithm, please do not assume it is ready to be run straight out of the box.