This code is for determining the optimal combination of cycle plans, amongst other things