mikegough / 3D-Landscape-Simulator

A web based ST-Sim application with 3D visualization.
0 stars 1 forks source link

Add transition target UI #15

Closed TaylorMutch closed 7 years ago

TaylorMutch commented 7 years ago

We could add transition targets for a vegetation type along a given transition type.

The UI could be something akin to the seedsource tool's 'add variable' ability, inside which we could allow the user to add a vegetation type and a transition type as part of the model run.
image

TaylorMutch commented 7 years ago

Another example of the UI, expanded out:

image

TaylorMutch commented 7 years ago

From email conversation with @mikegough

Hey Taylor,

Thanks for looking into this! Responses inline...

On Wed, Sep 14, 2016 at 10:13 PM, Taylor Mutch taylor.mutch@consbio.org wrote: Hey Mike,

I was looking at SyncroSim this evening, and it looks like the transition targets are actually based on TransitionGroups, which are tightly related to TransitionTypes - the relationship is that a transition group can have 1 or more transition types associated with it.

Right, I was exposing four of the Transition Groups in the "Manage" popup: Prescribed fire, Restoration Tree Encroached H, Exotic Control, and Thin/Mech/Chem. Hard coded at this point, but I imagine we would select all the ones that are meaningful and include them in the configuration file.

Additionally, a transition target is only specified if a user wants the specific quantity to be determined. For instance, the castle creek non-spatial library specifies transition targets for Basin Big Sagebrush Upland by specifying the goals of 0 seedling, 0 depleted sage, etc, while allowing 40 acres of restoration in Tree Encroachment. Otherwise, no transition target is specified, no multipliers are added to the transition probabilities, I believe (based on what Leonardo said today).

Yeah, this is more-or-less my understanding as well. The "Restoration Tree Encroachment L" Transition Group only comprises a single Transition Type: "REF-Restoration L". Since the Curleaf Mountain Mahogany veg type has a Target Area of 40 Acres for this transition group, my understanding is that at the first iteration, ST sim will adjust the probability showing in red below, to whatever number gets you to 40 acres worth of cells that undergo that transition type.

So effectively what is happening here is that management actions are resulting in a deterministic outcome rather than a probabilistic one.

Inline image 3

Another thing to note that if you right click on any of the field headers, you can enable the timestep field. Since the timestep isn't specified for any of these in the Castle Creek library, I believe it applies these targets to the first timestep as well as every subsequent timestep. Although, you could say, "At year 10, let's do a prescribed fire on 400 acres". And unless you then set that back to 0 for timestep 11, you'd get a controlled burn on 400 acres for every timestep after year 10. There's some good documentation on this here: http://syncrosim.com/index.php?title=Scenario_properties#Transition_Targets

Inline image 1 That changes how we want to represent this in the UI methinks, but I think its an important thing for us to handle, since it exposes some very useful functionality to the user. For example, the restoration groups and seeding groups would probably be of interest.

Agreed.

This means that we will want to send an additional set of parameters to the frontend based on the transition groups (and their related vegetation type) that we want to expose to the user, doing something like this... (long story short, for each vegetation type, if we specify a transition type to expose to the user, select the transition group and collect them all together with that vegetation type)...

The transition targets table you're showing above is for the Current Management scenario, but since we're allowing users to create their own management scenario by allowing them to manipulate the transition targets, I don't believe we need to limit the user options to the veg type/transition group combos that are currently present in the Transition Targets table. What if someone wants to do a prescribed burn on Basin Big Sagebursh Upland, for example? So, I think you're on the right track here, but I don't think we need to hit the library and export all the transition groups....we just pre-select the ones we want to expose for each veg type and add those combos to our configuration file (sort of like with what we're planning on doing with the probabilistic transitions.

all_transition_groups = stsim.transition_groups(pid=project_id) # all transition groups defined by the project/library selected_transition_groups = set() all_vegetation_type_transitions = stsim.export_probabilistic_transition_map(sid=scenario_id) for transition_type in transition_type_config: # where transition_type_config are the transition types we want to expose for vegetation_type in all_vegetation_type_transitions: if transition_type in all_vegetation_type_transitions[vegetation_type] for transition_group in all_transition_groups: if transition_type in all_transition_groups[transition_group] selected_transition_groups.add({vegetation_type: transition_group}) return sorted(list(selected_transition_groups))

Or something like that.

I'll see if I can pull something like this together tomorrow or Friday so that you can get the proper transition targets to populate the fields in the UI.

Thanks again Taylor. I'm super glad you asked about the Transition Targets. This gets us to the juicy stuff everyone we interviewed seemed to be asking for in one way or another.

TaylorMutch commented 7 years ago

We have a transitions target UI now! Woo!

mikegough commented 7 years ago

The "manage" options aren't hooked up yet, are they?

On Fri, Sep 30, 2016 at 8:19 AM, Taylor Mutch notifications@github.com wrote:

Closed #15 https://github.com/mikegough/3D-Landscape-Simulator/issues/15 .

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/mikegough/3D-Landscape-Simulator/issues/15#event-808613221, or mute the thread https://github.com/notifications/unsubscribe-auth/AH0q2R-2K4xaxRAN8LI7rWgshuNzQij4ks5qvSiBgaJpZM4J9HD1 .

Mike Gough | GIS Analyst Conservation Biology Institute http://www.consbio.org 136 SW Washington Avenue, Suite 202 | Corvallis, OR 97333 ph: (541) 368-5809 |fax: (541) 752-0518 http://www.facebook.com/Conservation.Biology.Institute https://twitter.com/ConsBio databasin.org http://www.databasin.org

TaylorMutch commented 7 years ago

The UI is there, but no they aren't hooked up. You're correct, I'll leave this open; I have a separate issue open on the stsimpy issue tracker to actually implement that.

TaylorMutch commented 7 years ago

This was implemented.