def _update_mpcs(model, starting_id_dict, mpc_id, mpc_map):
    """updates the mpcs"""
    if 'mpc_id' in starting_id_dict and mpc_id is not None:
        for mpc_idi, mpc_group in sorted(model.mpcadds.items()):
            for unused_i, mpc in enumerate(mpc_group):
                assert hasattr(mpc, 'conid')
                mpc.conid = mpc_id
            mpc_map[mpc_idi] = mpc_id
            mpc_id += 1
        for mpc_idi, mpc_group in sorted(model.mpcs.items()):
            for unused_i, mpc in enumerate(mpc_group):
                assert hasattr(mpc, 'conid')
                mpc.conid = mpc_id
            mpc_map[mpc_idi] = mpc_id
            mpc_id += 1
    else:
        for mpc_id in model.mpcadds:
            mpc_map[mpc_id] = mpc_id
        for mpc_id in model.mpcs:
            mpc_map[mpc_id] = mpc_id
