Skip to content

Commit f3b6f1a

Browse files
committed
update Project.toml, fix substitution bug
1 parent 013d539 commit f3b6f1a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
4646
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
4747
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
4848
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
49-
Pyomo = "0e8e1daf-01b5-4eba-a626-3897743a3816"
5049
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
5150
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
5251
RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47"
@@ -74,6 +73,7 @@ DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6"
7473
FMI = "14a09403-18e3-468f-ad8a-74f8dda2d9ac"
7574
InfiniteOpt = "20393b10-9daf-11e9-18c9-8db751c92c57"
7675
LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800"
76+
Pyomo = "0e8e1daf-01b5-4eba-a626-3897743a3816"
7777

7878
[extensions]
7979
MTKBifurcationKitExt = "BifurcationKit"
@@ -142,6 +142,7 @@ OrdinaryDiffEqCore = "1.15.0"
142142
OrdinaryDiffEqDefault = "1.2"
143143
OrdinaryDiffEqNonlinearSolve = "1.5.0"
144144
PrecompileTools = "1"
145+
Pyomo = "0.1.0"
145146
REPL = "1"
146147
RecursiveArrayTools = "3.26"
147148
Reexport = "0.2, 1"

ext/MTKPyomoDynamicOptExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ function MTK.add_constraint!(pmodel::PyomoDynamicOptModel, cons; n_idxs = 1)
119119
else
120120
cons.lhs - cons.rhs 0
121121
end
122-
expr = Symbolics.substitute(expr, SPECIAL_FUNCTIONS_DICT)
122+
expr = Symbolics.substitute(Symbolics.unwrap(expr), SPECIAL_FUNCTIONS_DICT)
123123

124124
cons_sym = Symbol("cons", hash(cons))
125125
if occursin(Symbolics.unwrap(t_sym), expr)

0 commit comments

Comments
 (0)