Reference &
User Manual
    RTXPS  On-line Reference Manual

      Release Level 2.0
      Release Date 2012 06
      Revision Level 1.0
    Document was last modified on:   Wednesday, 8-Aug-12 20:15 CEST

    RTXPS is "time aware", time (absolute and relative) expressed in a number of time related (user defined) variables can be used in the
    RULES of the forward chaining inference loop

    There are several predefined descriptors and associated buil-in functions relating to time:

    1. START_TIME: start time of the current RTXPS cycle, mainly used in interactive applications such as CourseWare or the RiskWare real-time emergency management applications.
    2. CURRENT_TIME: system (local) time for the system defined time zone, including day saving time shifts,   HH:MM:SS
    3. CURRENT_UTC: global standard time (Zulu, UTC, GMT),   HH:MM:SS please note that time zone of the current application and the time shift relative to UTC are set in the configuration data base TABLE. ELAPSED_TIME, difference between CURRENT_TIME and START_TIME.

      Time related Functions:

      • SECOND(number):   TRUE if the current second from HH:MM:SS matches;
      • MINUTE(number):   TRUE if the current minute from HH:MM:SS matches;
      • HOUR(number):   TRUE if the current hour from HH:MM:SS matches;
      • DAY(number), DAYN(string):
        • TRUE if DAY(number) argument matches the number of the day (1-31) within the current monthy.
        • TRUE if the string argument of DAY matches the three-character abbreviation for the current days name (system date function) as in SUN, MON, TUE, WED, THU, FRI, SAT, case insensitive;
        • MONTH(number), MONTHN(string), where string is a three character (upper case) abbreviation: JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, NOV, DEC;
        • YEAR()   TRUE if the argument matches the current year from date (YYYY).

    4. Manuipulating TIMERS:
          Sets the value of descriptor to current time; OThe timer descriptor is of type variable and represented by a string with the fomat hh:mm:ss
          Elapsed time since course was started
          Elapsed_time(descriptor) sets the specified descriptor to relative time or time elapsed since the last init() was called. Value of that descriptor can be diplayed or used in time computation.
          Function add_time(time1,time2,time3) implements operation: time1 = time2 + time3. Variables time1, time2, and time3 are of type timer (hh:mm:ss).
          Function subst_time(time1,time2,time3) implements operation: time1 = time2 - time3. Variables time1, time2, and time3 are of type timer (hh:mm:ss).

    The Descriptor definitions (in the respective application's KnowledgeBase) are shown below, with the TIMERS being of the TYPE: variable.

    RTXPS first initializes the dynamic knowledge base, then sets predefined descriptors to their current values based on system time, time zone, and any applicable time shift.

    Implementation: CourseWare

    START_TIME and ELAPSED_TIME rely on the fact that the first action of every course calls function init(). These descriptors can be used for computation as well as display. The behaviour of value(ELAPSED_TIME) is equivalent to header in-text function \elapsed_time and behaviour of value(CURRENT_TIME) is equivalent to header in-text function \time.

    Besides user can define application specific time descriptors and set their value using rtxps function set_time(descriptor_name).

    All time descriptors can be displayed with rtxps in-text function

    • \value whose format is hh:mm:ss or with rtxps in-text function
    • \valuef which displays an integer number in seconds.

    There are two operations defined for time descriptors:

    • addition: add_time(result,operand1,operand2)
    • substraction: subst_time(result,operand1,operand2)
    see also: RTXPS functions


© Copyright 1995-2018 by:   ESS   Environmental Software and Services GmbH AUSTRIA | print page