Skip to content

Global Configuration

LeonBein edited this page Nov 29, 2019 · 6 revisions

The Global Configuration file contains all global information for one simulation run. Thus, exactly one GC is used for one simulation run. The information inside the GC can include resource assignment strategies, a global simulation seed, timetables for resources and resources definitions themselves.

General structure of file

The GC is encoded in xml format. Its root element is a <globalConfiguration> tag. The configuration elements are child elements of this root. The root contains an id attribute to uniquely identify the GC.

Resource assignment strategies

Resource assignment strategies determine which work items are prioritized when multiple one compete for the same resources. When multiple strategies are defined, Scylla tries to resolve resource conflicts with the first, then, if it fails, with the second and so on. Resource assignment strategies are defined inside a <resourceAssignmentOrder> tag that is a child of the root. The names of the used strategies are put into the body of this tag, separated by commas.

Without plugins, Scylla supports two strategies:

  • Priority Strategy, defined in class EventOrderPriority. This strategy dependends on assignment priorities defined in task configurations of the respective Simulation Configurations. Tasks with the higher priority are prioritized, tasks with no priority are assumed to have the lowest priority. For this strategy the name to put into the global configuration is priority.
  • Simulation Time Strategy, defined in class EventOrderSimulationTime. This strategy prioritizes Tasks by the time their enablement Event occured. For this strategy the name to put into the global configuration is simulationTime.

Per default, if no strategy is defined, the simulation time strategy is used.

Addition strategies can be defined by creating a plugin for the entry point EventOrderType. Note that the plugin getName() method determines which name to put into the resource assignment order tag of the GC file.

Simulation Seed

The simulation seed of the gc is used as general seed for the desmoJ experiment. If not overriden, it is also used as seed for the Simulation Configurations i.e. that all random elements in the respective model of the sc are determined by this seed. This includes for example event arrival rates and task durations. In the GC file, the seed is defined as body of a <randomSeed> tag.

Zone offset

TODO

Resource timetables

Timetables describe the availability of resources. Each timetable consists of one or more items that describe the start and end time for each of an interval of days.

Inside the GC file, all timetables are defined as <timetable> tags inside one <timetables> tag under the root node. Each timetable tag has an id attribute for it to be uniquely identified. Each timetable tag has one or more <timetableItem/> tags as children.

Each timetableItem tag defines the attributes from, to, beginTime and endTime. All four are strings. From and to are the weekdays for this item coded by ther java DayOfWeek enum names. beginTime and endTime are the beginning and end time on all those days defined in ISO-8601 hh:mm:ss format or similar (should be parseable by java LocalTime.parse).