Knowing what package a function is from?

Are there plans to include integration in ModelingToolkit?

1 Like

Yes, we have a student working on this right now. Don’t expect it too soon though.

1 Like

Agree fully. A CAS is useful in research, and a CAS for undergrads as an open source alternative to Maple or Mathematica, but also as a way to introduce Julia programming at the undergrad and high school student.

Odly enough when I was reading the word docs I thought you said .docx, and I was thinking a Word add in notebook (a sort of Jupyter, or Pluto style notebook), would be really cool. There’s already the JuliaPro add in for Excel, and the combinitation of the 3 could do a lot of algebra, calculus and stats work.

2 Likes

How do I simplify a function in ModelToolkit? I’ve figured out how to do most things in SymEngine, but I can’t find a simplify command. (As of 2017 there wasn’t one). If I completely switch over, how do I do differentials and limits?

simplify.

1 Like

Makes sense, but I can’t install ModelingToolkit I typed the name directly but instead get

Error Unjustifiable requirements detected for package ModelingToolkit [961ee093]

You have to share the error message.

Sorry, I shared the first line. I can’t copy from the REPL in VS Code with a mouse, for some reason. But, I should use keyboard keys more for that.

julia> Pkg.add("ModelingToolkit")
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package ModelingToolkit [961ee093]:
 ModelingToolkit [961ee093] log:
 ├─possible versions are: [0.0.1-0.0.2, 0.1.0, 0.2.0, 0.4.0, 0.5.0, 0.6.0-0.6.1, 0.6.3-0.6.4, 0.7.0-0.7.2, 0.8.0, 0.9.0-0.9.1, 0.10.0, 1.0.0-1.0.3, 1.1.0-1.1.3, 1.2.0-1.2.10, 1.3.0-1.3.3, 1.4.0-1.4.3, 2.0.0, 3.0.0-3.0.2, 3.1.0-3.1.1, 3.2.0, 3.3.0, 3.4.0, 3.5.0, 3.6.0-3.6.4, 3.7.0-3.7.1, 3.8.0, 3.9.0, 3.10.0-3.10.2, 3.11.0-3.11.1, 3.12.0-3.12.2, 3.13.0, 3.14.0-3.14.2, 3.15.0, 3.16.0, 3.17.0, 3.18.0, 3.19.0, 3.20.0-3.20.1, 3.21.0] or uninstalled   
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.0.1-0.0.2, 0.1.0, 0.2.0, 0.4.0, 0.5.0, 0.6.0-0.6.1, 0.6.3-0.6.4, 0.7.0-0.7.2, 0.8.0, 0.9.0-0.9.1, 0.10.0, 1.0.0-1.0.3, 1.1.0-1.1.3, 1.2.0-1.2.10, 1.3.0-1.3.3, 1.4.0-1.4.3, 2.0.0, 3.0.0-3.0.2, 3.1.0-3.1.1, 3.2.0, 3.3.0, 
3.4.0, 3.5.0, 3.6.0-3.6.4, 3.7.0-3.7.1, 3.8.0, 3.9.0, 3.10.0-3.10.2, 3.11.0-3.11.1, 3.12.0-3.12.2, 3.13.0, 3.14.0-3.14.2, 3.15.0, 3.16.0, 3.17.0, 3.18.0, 3.19.0, 3.20.0-3.20.1, 3.21.0]
 ├─restricted by compatibility requirements with Latexify [23fbe1c1] to versions: [0.0.1-0.0.2, 0.1.0, 0.2.0, 0.4.0, 0.5.0, 0.6.0-0.6.1, 0.6.3-0.6.4, 
0.7.0-0.7.2, 0.8.0, 3.18.0, 3.19.0, 3.20.0-3.20.1, 3.21.0] or uninstalled, 
leaving only versions: [0.0.1-0.0.2, 0.1.0, 0.2.0, 0.4.0, 0.5.0, 0.6.0-0.6.1, 0.6.3-0.6.4, 0.7.0-0.7.2, 0.8.0, 3.18.0, 3.19.0, 3.20.0-3.20.1, 3.21.0] 
 │ └─Latexify [23fbe1c1] log:
 │   ├─possible versions are: [0.5.0-0.5.1, 0.6.0, 0.7.0, 0.8.1-0.8.2, 0.9.0, 0.10.0, 0.11.0, 0.12.0-0.12.3, 0.13.0-0.13.5, 0.14.0-0.14.1] or uninstalled
 │   └─restricted to versions 0.14.1 by an explicit requirement, leaving only versions 0.14.1
 ├─restricted by compatibility requirements with SpecialFunctions [276daf66] to versions: [1.1.3, 1.2.0-1.2.10, 1.3.0-1.3.3, 1.4.0-1.4.3, 2.0.0, 3.0.0-3.0.2, 3.1.0-3.1.1, 3.2.0, 3.3.0, 3.4.0, 3.5.0, 3.6.0-3.6.4, 3.7.0-3.7.1, 
3.8.0, 3.9.0, 3.10.0-3.10.2, 3.11.0-3.11.1, 3.12.0-3.12.2, 3.13.0, 3.14.0-3.14.2, 3.15.0, 3.16.0, 3.17.0, 3.18.0, 3.19.0, 3.20.0-3.20.1, 3.21.0] or uninstalled, leaving only versions: [3.18.0, 3.19.0, 3.20.0-3.20.1, 3.21.0]  
 │ └─SpecialFunctions [276daf66] log:
 │   ├─possible versions are: [0.7.0-0.7.2, 0.8.0, 0.9.0, 0.10.0-0.10.3] or uninstalled
 │   └─restricted to versions 0.10.0 by an explicit requirement, leaving only versions 0.10.0
 └─restricted by compatibility requirements with SymbolicUtils [d1185830] to versions: [0.0.1-0.0.2, 0.1.0, 0.2.0, 0.4.0, 0.5.0, 0.6.0-0.6.1, 0.6.3-0.6.4, 0.7.0-0.7.2, 0.8.0, 0.9.0-0.9.1, 0.10.0, 1.0.0-1.0.3, 1.1.0-1.1.3, 1.2.0-1.2.10, 1.3.0-1.3.3, 1.4.0-1.4.3, 2.0.0, 3.0.0-3.0.2, 3.1.0-3.1.1] or uninstalled — no versions left
   └─SymbolicUtils [d1185830] log:
     ├─possible versions are: [0.1.0-0.1.2, 0.2.0-0.2.1, 0.3.0-0.3.4, 0.4.0-0.4.3, 0.5.0-0.5.2, 0.6.0] or uninstalled
     └─restricted to versions 0.6.0 by an explicit requirement, leaving only versions 0.6.0
Stacktrace:
 [1] #propagate_constraints!#61(::Bool, ::typeof(Pkg.GraphType.propagate_constraints!), ::Pkg.GraphType.Graph, ::Set{Int64}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\GraphType.jl:1007     
 [2] propagate_constraints! at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\GraphType.jl:948 [inlined]
 [3] #simplify_graph!#121(::Bool, ::typeof(Pkg.GraphType.simplify_graph!), 
::Pkg.GraphType.Graph, ::Set{Int64}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\GraphType.jl:1462
 [4] simplify_graph! at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\GraphType.jl:1462 [inlined] (repeats 2 times)      
 [5] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Operations.jl:321
 [6] #add#112(::Bool, ::Pkg.BinaryPlatforms.Windows, ::typeof(Pkg.Operations.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Operations.jl:1010
 [7] #add at .\none:0 [inlined]
 [8] #add#25(::Bool, ::Pkg.BinaryPlatforms.Windows, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:102
 [9] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:72
 [10] #add#24 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:69 [inlined]
 [11] add at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:69 [inlined]
 [12] #add#21 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:67 [inlined]
 [13] add at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:67 [inlined]
 [14] #add#20(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.add), ::String) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:66
 [15] add(::String) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:66
 [16] top-level scope at REPL[640]:1

oddly enough, I was able to load NLsolve and SymUtils, so I was able to do all the differentiation I was doing in SymEngine, and the simplificiation from SymUtils.

Try up before you install again?

up?

up from update. This command update all packages Pkg ¡ The Julia Language

I just updated it, and I still get the same error.

What if you do ]add ModelingToolkit@4?

Same error.

Everything exactly the same? This is standard open source Julia v1.5?

My bad, I’m on v1.3 I can’t remember how to update (I was away on other stuff over the last year).

You can use a fresh new enviroment for testing. You are having some dependency troubles in the environment you are using now. Also, if you don’t mind this environment to much you can restart it by deleting its Project.toml and add packages again. On other hands, that will be a good Pkg practice section.

I might want to learn that, currently I like the way that ModelingToolkit writes derivatives, but it doesn’t do a good job of simplifying, while SymPy does do a good job of simplifying.

Ok, thanks good to know.