SNL-WaterPower / WecOptTool-MATLAB

WEC Design Optimization Toolbox
GNU General Public License v3.0
12 stars 9 forks source link

WaveBot via Blueprint #159

Closed ryancoe closed 3 years ago

ryancoe commented 4 years ago

Description

Porting #140 to the structure introduced by #144.

Fixes #123

Checklist:

H0R5E commented 4 years ago

OK, so I've put an example of the plots and summary table you added to the Performance class as functions that work on devices, in the waveBot example folder. You can follow it through from the WaveBot_caseA_Mat.m file.

Having looked at the waveBot code, compared it to the RM3 code, and from listening to our conversation last Thursday, I really think that dropping the concept of a framework for something like library supported examples is going to work better for the project at this stage.

In particular, I feel like it is an unwanted burden to fit new examples into the same structure each time or to update old examples to new code. For example, all of the analysis code for waveBot only considers a single sea-state problem and the outputs of the controllers differ from the RM3 case significantly (they are complex, for instance). It's clear there is still a desire to tweak the functionality particular to a example rather to the framework as a whole, so that all of the examples do not need to be changed at once.

So, in conclusion, I think we should get rid of all the classes (perhaps baring the SeaState class) and try and unroll them into two (super) functions that output structs and can be edited as required depending on the needs of the example at hand. In that case, the user can build the analysis that is most appropriate to them at the time (like not having to worry about dealing with multiple sea states if they are not going to use them or using the functionality of different toolboxes).

I don't think it would take me very long to do this, if you want me to have a crack at it?

H0R5E commented 4 years ago

As as example of what I am proposing see #161. I'll finish off the optimisation example tomorrow.

H0R5E commented 4 years ago

Yeah, so having got both examples working in #161, I'm strongly recommending moving over to the concept represented there (i.e. structured examples with a library of independent tools to help with the problems). Much as I have pushed a top down approach, I think it's evidently suffocating development of algorithms trying to put a structure over the entire problem at this stage. The "structured examples" approach in #161 will give a lot more flexibility in how the problems are built, but with the aid of "soft" framework for how they might go together. I think we can come back to trying to put a more formal data structure on the problem in the future (although it will be a task to get every example made to conform at that point) once it's clearer what all of the stages are going to produce. Parts of the structure might be transformed anyway if we turn to more complex tools for equation generation.

So, although binning 2000 lines of code and docs seems like a bit of a waste, I think it has been a useful exercise to "birth" the the two main functions in #161 and as it's stored in the history of the trunk, it can always be recovered at a later date should standardising the approach become more important.

H0R5E commented 4 years ago

This is now incorporated into #161, so can be closed.

ryancoe commented 3 years ago

now under #161