-
Notifications
You must be signed in to change notification settings - Fork 0
Recursive Array Tools Notebook #281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@aarmey here's the notebook I mentioned in lab meeting today |
Codecov Report
@@ Coverage Diff @@
## master #281 +/- ##
=======================================
Coverage 66.74% 66.74%
=======================================
Files 7 7
Lines 451 451
=======================================
Hits 301 301
Misses 150 150 Continue to review full report at Codecov.
|
@sumedha-k I don't see the code you showed me? |
@aarmey sorry about that, just updated it |
I think I figured out the issue—take a look at the first cell I updated. The named elements in an SLVector just need to be single elements, not vectors. |
@aarmey I included the information in recursive.ipynb in the last three cells. |
I'm not sure I see the problem? You show that you can access |
Oh, I see the issue. We do use structs as essentially labeled ArrayPartitions. Let me do a little digging... |
I think I have an alternative approach for plugging this into ModelingToolkit. The TAMrates struct is really not the problem—it's the need to have an AbstractVector type at the ODE function interface. Do you see how to write a function that takes in a TAMrates and outputs a vector with all the values flattened out, and then vice versa? In other words, concatenate all the values in the struct to one vector? If we have these conversion functions I think we can accomplish the same thing without changing a ton of code. |
Sounds good, should I add these function to the types.jl file or should I create a new file? |
Yes, this can go in types.jl |
@aarmey I couldn't figure out the source of this build error. It appears to be a result of the most recent merge commit. |
Get rid of the changes you made to the Manifest file and I bet it'll work. |
@aarmey I deleted the whole Manifest file and copied the one in the master branch but I'm still getting the error |
elseif d isa TAMsType{T} | ||
arr = ArrayPartition(flatten(d.Axl), flatten(d.MerTK), flatten(d.Tyro3)) | ||
elseif d isa hetRates{T} | ||
arr = ArrayPartition(flatten(d.AM), flatten(d.MT), flatten(d.TM)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sumedha-k you need an end
on the end of this ifelse
block.
No description provided.