Skip to content

Conversation

isaacsas
Copy link
Member

Closes SciML/Catalyst.jl#1035

In recent MTK versions registered functions have non-unit coefficients when using get_units, i.e.

mm(X, v, K) = v * X / (X + K)
mm2(X, v, K) = v * X / (X + K)
Symbolics.@register_symbolic mm2(X, v, K)
@parameters t [unit=u"s"] K [unit=u"mol/m^3"] v [unit=u"(m^6)/(s*mol^2)"]
@variables X(t) [unit=u"mol/m^3"]
mmunits = MT.get_unit(mm(X, v, K))         # 1.0 m⁶ s⁻¹ mol⁻²
mm2units = MT.get_unit(mm2(X, v, K))     # 0.5 m⁶ s⁻¹ mol⁻²

This seems to fix the issue.

@isaacsas
Copy link
Member Author

@ChrisRackauckas should be good to go if tests pass.

@isaacsas isaacsas closed this Aug 30, 2024
@isaacsas isaacsas reopened this Aug 30, 2024
@ChrisRackauckas ChrisRackauckas merged commit e0cbb9b into SciML:master Aug 30, 2024
40 of 46 checks passed
@isaacsas isaacsas deleted the unit_fix branch August 30, 2024 19:38
@isaacsas
Copy link
Member Author

@ChrisRackauckas can we get a bugfix release now so that Catalyst CI passes again? I'd like to run it through and then release a Catalyst version that is Symbolics 6 compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test for units currently broken
2 participants