Module optseq2 :: Class Activity
[hide private]
[frames] | no frames]

Class Activity

source code

Instance Methods [hide private]
 
__init__(self, name='', duedate='inf', weight=1)
OptSeq activity class.
source code
 
__str__(self) source code
 
addModes(self, *modes)
Adds a mode or modes to the activity.
source code
Method Details [hide private]

__init__(self, name='', duedate='inf', weight=1)
(Constructor)

source code 

OptSeq activity class.

You can create an activity object by adding an activity to a model (using Model.addActivity) instead of by using an Activity constructor.

  • Arguments:
    • name: Name of activity. Remark that strings in OptSeq are restricted to a-z, A-Z, 0-9,[],_ and @. Also you cannot use "source" and "sink" for the name of an activity.
    • duedate(optional): Duedate of activity. A non-nagative integer or string "inf."
    • weight(optional): Panalty of one unit of tardiness. Positive integer.

addModes(self, *modes)

source code 

Adds a mode or modes to the activity.

  • Arguments:
    • modes: One or more mode objects.
  • Example usage:
    >>> activity.addModes(mode1,mode2)