It depends. Both shadow variables and score calculation use delta's to create incremental calculation. Those delta's are the key to scaling out and getting a high score calculation speed per second (see last INFO logging line and the benchmark report). Whatever you do, keep an eye on that value for at least datasets of different sizes.
In theory, it shouldn't matter much if there is a shadow variable to simplify the score rules, or if there is no shadow variable and the score rules are more complex (and might use insertLogicals
etc).
In practice, it often does matter: for vehicle routing, IIRC I 've seen that the shadow variable arrivalTime
noticeably improved performance and scalability.
My advice is to use a shadow variable when it makes sense to have that on the domain. For example the arrivalTime etc. But use a simple calculated getter (without loops) when that suffices: for example departureTime (= arrivalTime + duration). And use the score rules for the rest.
In the end, it's a design choice: do the score rules need to figure out the departureTime or arrivalTime themselves or can we abstract away over that - by putting them in the model - and make the rules more natural to read?