Closed gmadd72891 closed 3 months ago
Thank you for the report. This seems to be a bug in modelx. What version of networkx was used in the erroneous run above?
Thank you for the report. This seems to be a bug in modelx. What version of networkx was used in the erroneous run above?
This error occurs when using networkx 2.7.1 as suggested by modelx requirements.txt to use networkx < 2.8, as well as the latest version of networkx, version 3.3.
I reproduced the issue. The following script throws the same error.
import modelx as mx
m = mx.new_model()
s1 = m.new_space("Space1")
s2 = s1.new_space("Space2")
@mx.defcells(space=s1)
def cells1(t):
return Space2.x
@mx.defcells(space=s1)
def cells2(t):
return cells1(t) + Space2.x
s2.x = 1
cells1(10)
cells2(10)
m.clear_all()
Thank you for the report. This seems to be a bug in modelx. What version of networkx was used in the erroneous run above?
This error occurs when using networkx 2.7.1 as suggested by modelx requirements.txt to use networkx < 2.8, as well as the latest version of networkx, version 3.3.
requirements-doc.txt
is only for rendering documents on readthedocs.org. You can use any networkx version higher than 2.8 with modelx
modelx v0.25.1 is just released and now available on PyPI. The release should address the issue. The document has not been updated. Please test with it and let me know how it goes.
This fix is working well after upgrading to modelx 0.25.1 along with networkx 3.3.
We are running into the issue below when using the model.clear_all() function. It is unclear why we are running into this issue. It appears the remove_with_referred logic was added in modelx v0.25.0. Our model performs as expected when using modelx v0.24.0.
Can you please help us understand why we might experience this error?