Codes to construct AECOPD algorithms