megamad

stochastic rule with multiple percentages workaround

Discussion created by megamad on Mar 8, 2017
Latest reply on Mar 21, 2017 by CLau-esristaff

HI, I was wondering if its possible to use more than 1 attribute as percentages in an stochastic rule, something like this:

 

attr mytrattribute1 = 0

attr mytrattribute2 = 0

attr mytrattribute3 = 0

 

Function01 -->

   mytrattribute1% : Do something

   mytrattribute2% : Do something

   mytrattribute3% : Do something

   else: Do something

 

I tried using P() like this:

 

Function01 -->

   case p (mytrattribute1):  Do something

   case p (mytrattribute2): Do something

   case p (mytrattribute3): Do something

   else:  Do something

 

but it does not accept more than one attr, i really wouldn't like to hardcode this percentages =/

 

thank you guys for your attention!

Outcomes