starts_at

Mixing group property that sets the hours of operation of the mixing group during each day of the week

Synopsis

starts_at_<1..12><am|pm>_on_<day-of-week> = <number-of-hours-open>
starts_at_<1..12><am|pm>_on_weekends = <number-of-hours-open>
    starts_at_<1..12><am|pm>_on_weekdays = <number-of-hours-open>

Description

These properties are included in the mixing group’s code block to define the times and days that a group is usually open. These properties apply to all instances of this group type (e.g. all schools).

There can be any number of instances of the starts_at property. If more than one occurs, they accumulate in effect, and later instance override earlier instances.

The property clear_schedule = 1 causes any previously defined open hours to be cleared.

Each starting time is specified using a 12-hour clock (that is, the time specification must end in am or pm).

The day of the week is one of the values {Sun, Mon, Tue, Wed, Thu, Fri, Sat}.

The right-hand side value must be a positive integer that indicates the number of consecutive hours the mixing group operates starting at the indicated hour.

starts_at_<1..12><am|pm>_on_weekends = <number-of-hours-open>

is equivalent to the following statements:

starts_at_<1..12><am|pm>_on_Sat = <number-of-hours-open>
starts_at_<1..12><am|pm>_on_Sun = <number-of-hours-open>

Similarly, the property statement

starts_at_<1..12><am|pm>_on_weekdays = <number-of-hours-open>

is equivalent to the following statements:

starts_at_<1..12><am|pm>_on_Mon = <number-of-hours-open>
starts_at_<1..12><am|pm>_on_Tue = <number-of-hours-open>
starts_at_<1..12><am|pm>_on_Wed = <number-of-hours-open>
starts_at_<1..12><am|pm>_on_Thu = <number-of-hours-open>
starts_at_<1..12><am|pm>_on_Fri = <number-of-hours-open>

There are no default opening hours for any mixing group. They must be explicitly defined in the model, or no agents will attend the mixing group.

Examples

The following defines a schedule for a place type called Mall, which normally opens between 11am and 9pm on Monday through Friday, between 9am and 9pm on Saturday, and between noon and 8pm on Sunday.

place Mall {
    starts_at_11am_on_weekdays = 10
    starts_at_9am_on_Sat = 12
    starts_at_12pm_on_Sun = 8
}

See Also

attend() clear_schedule() close() has_group_agent() is_at() is_open() is_temporarily_closed() skip()