Skip to content

Data Structures

Ioannis Paraskevakos edited this page Mar 3, 2020 · 5 revisions

There are three data structures that are common between all components of the campaign manager: Campaign, Workflow, and Resources. This page contains a description of these data structures.

Campaign: A set of workflows. This set can be changed only by the user through a command. Dictionaries are not hashable, and cannot be in a set. As a result the campaign is implemented as a list of dictionaries.

Workflow: A workflow is a dictionary with the following keys:

{ 'description': The description of the workflow. It matches the selected WMF description
  'id': A unique identifier for the specific workflow
  'num_oper': Total number of operations the workflow will execute. This number is not the performance of a workflow on a specific resource
  'requirements': Any hard requirements that the workflow may have
}

Resource: A resource is a dictionary with following keys:

{ 'id': A unique identifier for the specific resource
  'performance': The number of operations the resource can execute in a unit of time.
  'capabilities': A set of capabilities the resource may offer.
  'label': Method to connect to the specific resource and execute.
}

Plan: A list of tuples. Each tuple contains the following information: (workflowsID, resourceID, start time, end time)

Clone this wiki locally