Closed Github-Yilei closed 1 year ago
It's hard for me to identify the problem here without more information. Here are some things that could help:
import logging
logging.basicConfig(filename='debug.log', level=logging.DEBUG)
This is probably the same issue as here: https://github.com/popgenmethods/momi2/issues/59
I'm closing this issue now due to inactivity and to avoid duplication.
adding multiple pulse events to the existing model.
`model_1st.add_size_param('n_pop1') model_1st.add_leaf('pop1', N = 'n_pop1')
model_1st.add_size_param('n_pop2') model_1st.add_leaf('pop2', N = 'n_pop2')
model_1st.add_time_param("tmig_pop1_pop2") model_1st.add_pulse_param("mfrac_pop1_pop2") model_1st.move_lineages("pop1", "pop2", t = "tmig_pop1_pop2", p = "mfrac_pop1_pop2") model_1st.add_time_param("tmig_pop2_pop1") model_1st.add_pulse_param("mfrac_pop2_pop1") model_1st.move_lineages("pop2", "pop1", t = "tmig_pop2_pop1", p = "mfrac_pop2_pop1")
model_1st.add_time_param('t_pop2', lower_constraints=["tmig_pop1_pop2", "tmig_pop2_pop1"]) model_1st.move_lineages('pop1', 'pop2', t = 't_pop2')
model_2ed = model_1st.copy()
model_2ed.add_size_param('n_pop3') model_2ed.add_leaf('pop3', N = 'n_pop3')
model_2ed.add_time_param("tmig_pop3_pop2") model_2ed.add_pulse_param("mfrac__pop3_pop2") model_2ed.move_lineages("pop3", "pop2", t = "tmig_pop3_pop2", p = "mfrac_pop3_pop2") model_2ed.add_time_param("tmig_pop2_pop3") model_2ed.add_pulse_param("mfrac_pop2_pop3") model_2ed.move_lineages("pop2", "pop3", t = "tmig_pop2_pop3", p = "mfrac_pop2_pop3")
model_2ed.add_time_param('t_pop3"', lower_constraints=["tmig_pop3_pop2", "tmig_pop2_pop3"]) model_2ed.move_lineages('pop3', 'pop2', t = 't_pop3')
model_2ed.optimize(method="L-BFGS-B")`