SMS: A decomposition/synchronization scheme for formulating and solving optimization problems