영역에 위치가 포함되는지 확인

영역에 위치가 포함되는지 또는 포함되지 않는지 발견합니다.

다음 연산자를 사용하여 일부 도형이 기타 도형을 포함하거나 이에 포함되는지 여부를 확인할 수 있습니다.
  • <a geometry> contains <a geometry>
  • the <geometries> contained in <a geometry>
  • the <geometries> containing <a geometry>

다음 예에서 주차장은 비즈니스 모델에서 다각형으로 정의됩니다.

다음의 규칙은 자동차가 지정된 주차장 외부에 주차한 경우에 경보를 전송합니다.

when a car returned event occurs
definitions
    set 'assigned parking area' to the parking area of the parking lot of this car returned event;
if    it is not true that 'assigned parking area' contains the location of this car returned event
then    print "The car is parked outside the assigned parking lot.";

다음 규칙은 주차장에 너무 많은 자동차가 주차되어 있음을 직원에게 경고합니다.

when a car returned event occurs
definitions
    set 'parking lot area' to the parking area of the parking lot of this car returned event;
    set 'cars in parking lot' to all cars in the cars of 'the organization'
        where 'parking lot area' contains the location of each car;
if    the number of elements in 'cars in parking lot' is more than the available places of the parking lot
then    print "Too many cars are parked in " + the name of the parking lot of this car returned event;