Closed ConnectedSystems closed 2 years ago
Hi @Rosejoycrocker
Please see this example which should give you an idea on how to update your own scripts
Hi @ConnectedSystems , Thanks for that, that's great. It seems like the units used for some of the parameters have changed also? (as Seed1 =15000). Are the new bounds for parameters etc now available in the default parameter table?
Hi, yes all the run examples have been updated (in this branch) so please have a look through those.
Off the top of my head the full parameter detail table get be had with ai.parameterDetails()
Sorry for the brevity, I'm on my mobile as I've stepped out to grab a late lunch
Thanks @ConnectedSystems , enjoy your lunch :)
@ConnectedSystems, this is excellent - exactly what we need. I have spent the weekend thinking about how we generate a generalised structure for running different constellations of simulations. All in vain, because you were steps ahead of me - thank you.
Takuya, would you be able to show us tomorrow how you see this running, please? Also, please let us know what you need from the team to make this work.
With the business case in mind, a high priority for me (and hopefully the team) is to be able to run batches of simulations that allow us to analyse:
how different intervention R&D assumptions affect the performance of different metrics under optimised deployment. This is part of our task to inform R&D reprioritisation.
How different intervention intensities (e.g. seeding rates) and site-selection criteria combine to demonstrate optimised intervention deployments for Moore Reef and other clusters
There are more, but if we can nail these before end of Feb, I'd be happy.
Meant to extend this last reply to the whole team: @ConnectedSystems , @Rosejoycrocker, @BarbaraRobson and @veroniquelago
Sounds good @KRNA01, I've started to adapt my optimisation code to use the new ADRIA() interface
Hi @Rosejoycrocker,
In case useful.
Let me know if you need some other things done.
Just in case, the interface implementation can be found here
% These map to the individual parameter detail tables.
interv_params = ai.interventions;
criteria_weights = ai.criterias;
coral_params = ai.corals;
% These get just the raw and sample bounds, respectively
% table with: name, lower_bound, upper_bound
raw_bnds = ai.raw_bounds
sample_bnds = ai.sample_bounds
% Get the raw and sample default values as a parameter table
raw_values = ai.raw_defaults
sample_values = ai.sample_defaults
% To split a parameter table back into intervention, criteria, corals:
[interv_params, crit_params, coral_params] = ai.splitParameterTable(raw_values)
Thanks @ConnectedSystems. I'm wondering how to test my code when I've got it mostly worked out- at the moment I'm making changes on the optimisation_trials branch but this won't have the ADRIA interface functions- should I create a branch off your coral_samples branch or just wait to merge with main when your finished with developing that branch?
Started writing an essay and then realised I could work something out for you real quick, give me a tick.
Thanks for that :) . I'll be away from my computer for a bit soon, but I'll be back later in the evening, so if I don't answer for a bit that is why.
Please checkout coral-optimization-merge
- this should have your optimization-trials
code with the recent changes in coral-sampling
.
As coral-sampling
is a branch off 40corals
, there should be no issues collapsing everything back into 40corals
and then (when we're ready) main
.
Thanks @ConnectedSystems, that's perfect!
Hey @ConnectedSystems, is ai.defaultParams no longer an object under the ADRIA class? I've got some code which tries to assign params = ai.defaultParams in the coral-optimisation-merge branch and its saying the object doesn't exist for the ADRIA class. Should I wait a bit for the code to get smoothed out before I have a go at integrating into the optimisation code? (or maybe I'm using the class in the wrong way ...)
Hey Rose, when I first posted I hadn't actually implemented about half the code in the example snippet in the first post above - it was mainly for discussion to see if the team saw something missing or needed something else supported.
Right now I think everything is fairly stable. The only exception would be if something is missing or you want to suggest alternate names for the methods/properties.
Apart from slight adjustments to property/method names, the biggest difference between the example above and the actual implementation is that I realised using methods to access the underlying tables is a bit redundant - these you can access via the object properties instead.
I think what you're after is shown here
Have a look at the implementation as well which lists out what is actually available, and let me know if you need anything else supported.
I will earmark this Documentation Friday for writing this up.
Right, sorry, I wasn't sure how much was pseudo code, thanks for the clarification :)
Just flagging that we could do something like:
ai.optimize(@some_optimization_method, @some_metric, some_additional_options)
May take a bit of work but possible.
Ok cool, I'll write the optimisation as external functions initially and then we can integrate them into ai
I think we're all happy with how this got implemented at this stage so closing this issue.
While waiting on metric data structures to be finalized I've started on the long promised work to simplify the usage of ADRIA's
run
functions.EDIT: Updated this post to cut down on fluff.
The proposed approach (not yet fully implemented):
As indicated in the code example above, the distinction between
runADRIA
andrunScenario
is abstracted away at the high-level - a single scenario is run simply by providing an input table with a single row of parameter values.In the example above I've assumed users will never provide their own RCP/wave damage data, so the process of loading and inputting data is kept internal to ADRIA and hidden from users at this high-level.
Note as part of this change the
alg_ind
parameter is merged intointerventionDetails()
, thereby addressing #57.Thoughts/comments/feedback appreciated.