465b / nemf

A novel three step network-based general ecosystem modeling framework
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Empty compartments become "recreated" even tho interactions wouldn't allow that #86

Open 465b opened 4 years ago

465b commented 4 years ago
# reimporting model to guarantee "default" config
model = nemf.load_model('phyto_sup_network_test.yml')

# Removing predator
model.compartment['Z']['value'] = 0
model.compartment['N']['value'] = 1e4
inwards_fixed_quadratic_balancing,outwards_fixed_quadratic_balancing = quadratic_balancing(equilibrium_point=1e6)
nemf.models.import_interaction_functions([inwards_fixed_quadratic_balancing,outwards_fixed_quadratic_balancing])

model = nemf.forward_model(model,method='Radau')

fig = nemf.plot.draw_output_summary(model)
fig.set_figwidth(7)
fig.set_figheight(3)
fig.set_dpi(150)
ax = fig.get_axes()[0]
ax.set_ylim(-1e3,1.2e4)
ax.set_xlim(0,2e6)

phyto_sup_network_test.txt bug.pdf