modified:   sim/impl/cdetmn.py