-
-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into MTK
- Loading branch information
Showing
23 changed files
with
409 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "ModelingToolkit" | ||
uuid = "961ee093-0014-501f-94e3-6117800e7a78" | ||
authors = ["Yingbo Ma <[email protected]>", "Chris Rackauckas <[email protected]> and contributors"] | ||
version = "9.53.0" | ||
version = "9.54.0" | ||
|
||
[deps] | ||
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" | ||
|
@@ -64,6 +64,7 @@ BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665" | |
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" | ||
DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6" | ||
HomotopyContinuation = "f213a82b-91d6-5c5d-acf7-10f1c761b327" | ||
InfiniteOpt = "20393b10-9daf-11e9-18c9-8db751c92c57" | ||
LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" | ||
|
||
[extensions] | ||
|
@@ -72,6 +73,7 @@ MTKChainRulesCoreExt = "ChainRulesCore" | |
MTKDeepDiffsExt = "DeepDiffs" | ||
MTKHomotopyContinuationExt = "HomotopyContinuation" | ||
MTKLabelledArraysExt = "LabelledArrays" | ||
MTKInfiniteOptExt = "InfiniteOpt" | ||
|
||
[compat] | ||
AbstractTrees = "0.3, 0.4" | ||
|
@@ -104,6 +106,7 @@ FunctionWrappers = "1.1" | |
FunctionWrappersWrappers = "0.1" | ||
Graphs = "1.5.2" | ||
HomotopyContinuation = "2.11" | ||
InfiniteOpt = "0.5" | ||
InteractiveUtils = "1" | ||
JuliaFormatter = "1.0.47" | ||
JumpProcesses = "9.13.1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module MTKInfiniteOptExt | ||
import ModelingToolkit | ||
import SymbolicUtils | ||
import NaNMath | ||
import InfiniteOpt | ||
import InfiniteOpt: JuMP, GeneralVariableRef | ||
|
||
# This file contains method definitions to make it possible to trace through functions generated by MTK using JuMP variables | ||
|
||
for ff in [acos, log1p, acosh, log2, asin, tan, atanh, cos, log, sin, log10, sqrt] | ||
f = nameof(ff) | ||
# These need to be defined so that JuMP can trace through functions built by Symbolics | ||
@eval NaNMath.$f(x::GeneralVariableRef) = Base.$f(x) | ||
end | ||
|
||
# JuMP variables and Symbolics variables never compare equal. When tracing through dynamics, a function argument can be either a JuMP variable or A Symbolics variable, it can never be both. | ||
function Base.isequal(::SymbolicUtils.Symbolic, | ||
::Union{JuMP.GenericAffExpr, JuMP.GenericQuadExpr, InfiniteOpt.AbstractInfOptExpr}) | ||
false | ||
end | ||
function Base.isequal( | ||
::Union{JuMP.GenericAffExpr, JuMP.GenericQuadExpr, InfiniteOpt.AbstractInfOptExpr}, | ||
::SymbolicUtils.Symbolic) | ||
false | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.