refactored pplan_add: moved this method to constraint and variable classes