Skip to content

Conversation

@jtgrasb
Copy link
Contributor

@jtgrasb jtgrasb commented Jul 28, 2021

I went through and found all MATLAB function blocks within the WEC-Sim blocks and changed them to call an m file of the same name that completed the desired function. I located all of these functions within a new folder called "FunctionsCalledbySimBlocks" within the sources/functions directory. This will allow for easier access to the functions as well as better tracking of their changes.

@salhus salhus requested a review from kmruehl July 28, 2021 14:18
@kmruehl kmruehl added the Feature new feature request label Jul 28, 2021
Copy link
Collaborator

@kmruehl kmruehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtgrasb thanks for working on this, this will really help us manage the WEC-Sim library. A few requested revisions:

  • save the WEC-Sim library as 2019b, the current version we support
  • also, when saving the library, save it at the top level, the default is for the library to open up to the level it's saved from

All tests are passing, so the revisions appear to work, but I cannot view the library until it's re-saved. Thanks!

@jtgrasb
Copy link
Contributor Author

jtgrasb commented Jul 29, 2021

@kmruehl Thanks for the suggestions! I updated those 2 things and also changed the name of 2 function folders after discussing with Adam. Let me know if you find any other issues.

@kmruehl
Copy link
Collaborator

kmruehl commented Jul 29, 2021

@jtgrasb it looks like the WEC-Sim library is saved in 2021a. We have a bit of a strange workflow for how to save the library that I hope to fix with sub-libraries. But you'll have to open the library and save it as a prior version, as 2019b.

image

DISREGARD above comment I had an issue when I pulled your fork. I'll review this tomorrow.

Copy link
Collaborator

@kmruehl kmruehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtgrasb this is great, thank you! I just had a few minor comments:

  • Can we remove some of the output initialization so that we are just calling the function from a script? I've highlighted a few examples of Simulink blocks where the outputs are initialized prior to calling the function. If not, that's alright
  • Please remove inline comments meant for debugging. Before those were buried in the Library so we couldn't see them as easily, but now that the functions are tracked as separate *.m files we should remove superfluous comments.

Thank you!

@jtgrasb
Copy link
Contributor Author

jtgrasb commented Aug 3, 2021

@kmruehl I've removed all the unnecessary comments and initializations as requested, except for the non-linear yaw cases as explained above.

Copy link
Collaborator

@kmruehl kmruehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtgrasb thank you so much, this is great and all tests passed on my end, so I'll go ahead and merge your PR.

kmruehl added a commit that referenced this pull request Sep 30, 2021
* body element sublibrary

* frames sublibrary

* constraints sublibrary

* moorings sublibrary

* ptos sublibrary

* resolving broken links in body elements

* adding SimulinkModelFunctions

* cleaning up the library

* removing 2020a test from CI

* resolving missing Simulink Function and displaying library links
@jtgrasb jtgrasb deleted the sim_funcs branch November 17, 2021 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature new feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants