10-29-2020, 07:09 AM
(This post was last modified: 10-29-2020, 07:11 AM by Eric Piette.)
Hi,
OK I checked you can not used the
in your version because the (from) condition is always true when it reaches a site satisfying the condition (only the (to) changes). But if you use in the version I put at the beginning with the version 1.1.0 (release during the day), that works at you expect.
Sorry for the suggestion with the version 8 or 9, my mistake ;)
And yes, the intersection with the occupied sites is now useless.
My working version of this define is:
Regards,
Eric
OK I checked you can not used the
Code:
(or
(= (who at:(from)) P1)
(= (who at:(to)) P1)
)
in your version because the (from) condition is always true when it reaches a site satisfying the condition (only the (to) changes). But if you use in the version I put at the beginning with the version 1.1.0 (release during the day), that works at you expect.
Sorry for the suggestion with the version 8 or 9, my mistake ;)
And yes, the intersection with the occupied sites is now useless.
My working version of this define is:
Code:
(define "CalculateScore"
(and
(forEach Group Orthogonal
if:(= (who at:(to)) P1)
(addScore P1
(*
(count Sites
in:(sites)
)
(count Sites
in:(sites)
)
)
)
)
(forEach Group Orthogonal
if:(= (who at:(to)) P2)
(addScore P2
(*
(count Sites
in:(sites)
)
(count Sites
in:(sites)
)
)
)
)
)
)
Regards,
Eric