A Methodological Approach to Model CBR-based Systems