fix relative position problem

introduced relative position in the constraint model.