By default, activities are created as non-breakable. The function setBreakable is used to define breakable activities (i.e., to define activities that can be suspended by breaks). setBreakable is used on all activities in this example except roofing, painting, and moving. As described previously, the duration is specified using the index of the duration design array.
/* CREATE THE ACTIVITIES. */
IloActivity masonry(env, dur[0], "masonry ");
masonry.setBreakable();
IloActivity carpentry(env, dur[1], "carpentry ");
carpentry.setBreakable();
IloActivity plumbing(env, dur[2], "plumbing ");
plumbing.setBreakable();
IloActivity ceiling(env, dur[3], "ceiling ");
ceiling.setBreakable();
IloActivity roofing(env, dur[4], "roofing ");
IloActivity painting(env, dur[5], "painting ");
IloActivity windows(env, dur[6], "windows ");
windows.setBreakable();
IloActivity facade(env, dur[7], "facade ");
facade.setBreakable();
IloActivity garden(env, dur[8], "garden ");
garden.setBreakable();
IloActivity moving(env, dur[9], "moving ");