Simplification of Ranges - Gnorion/BizVR GitHub Wiki

Simplification of Ranges

Here's an example of what VV is able to do in the way of simplifying overly complex expressions that a user might try to write:

ORIGINAL CONDITIONS BY RULE

R1 DT1 age: =0,[800..844],[100..345],[300..700],[0..1000],[500..600],[250..750][600..700],[700..800],[800..900]
R1 DT2 color: ='a',['bacon'..'egg'],['blue'..'brown'],['a'..'d'],['cat'..'dog'],['apple'..'banana'],['mango'..'pear'],['lemon'..'lime']

SIMPLIFIED CONDITIONS BY RULE

R1 DT1 age: in [0..1000]
R1 DT2 color: in ['mango'..'pear'], in ['lemon'..'lime'], in ['a'..'egg']

CONDITION GAPS BY ATTRIBUTE

DT1: age: < 0, > 1000

Note: By default VV doesn't list all the gaps in string ranges unless you specifically request it.

If you did, it would look like this

DT2: color: in ('lime'..'mango'), in ('egg'..'lemon'), > 'pear', < 'a'
⚠️ **GitHub.com Fallback** ⚠️