The following is a list of scheduling specific constructs that are available.
The Task class allows for simplified modeling of tasks in scheduling applications. It encapsulates the earliest start time, latest end time (makespan), and duration. The following tables shows example calls to the constructor which results in different kinds of matrices.
Task() # creates a Task with an earliest start time of 0, latest end
# time of 1, and duration 1
Task(ub) # creates a Task with an earliest start time of 0, latest end
# time of 'ub', and duration 1
Task(ub, dur) # creates a Task with an earliest start time of 0,
# latest end time of 'ub', and duration 'dur'
Task(lb, ub, dur) # creates a Task with an earliest start time of 0,
# latest end time of 'ub', and duration 'dur'
When the model is solved, Numberjack.Expression.get_value() returns the start time of the task.
Creates a precedence expression on the task. Can be used to specify precedence between two tasks or that a task has finished before a certain time.
Parameters:  pred – if pred is an int then constrains that the task is finished by pred, if pred is another Task instance, then creates a toplevel Precedence constraint. 

Returns a string representing the current domain of the expression.
Parameters:  solver (NBJ_STD_Solver) – If specified, the solver for which this expression has been loaded. If not specified, the solver that has most recenlty loaded the expression will be used. 

Creates a new Domain instance representing the current domain of the expression.
Parameters:  solver (NBJ_STD_Solver) – If specified, the solver from which the domain will be sourced, if None then the most recently loaded solver is used. 

Returns:  The current domain of the expression. 
Return type:  Domain 
Current upper bound of variable.
Parameters:  solver (NBJ_STD_Solver) – If specified, the solver from which the upper bound will be sourced, if None then the most recently loaded solver is used. 

Returns:  The current upper bound of the variable. 
Return type:  The same as the original domain, either int, float, or str. 
Current lower bound of the expression.
Parameters:  solver (NBJ_STD_Solver) – If specified, the solver from which the lower bound will be sourced, if None then the most recently loaded solver is used. 

Returns:  The current lower bound of the expression. 
Return type:  The same as the original domain, either int, float, or str. 
The current size of the expression’s domain.
Parameters:  solver (NBJ_STD_Solver) – If specified, the solver from which the domain size will be sourced, if None then the most recently loaded solver is used. 

Returns:  The size of the expression’s domain. 
Return type:  int 
Returns the solver with which this expression was last loaded.
Returns:  The last loaded solver, or None if it has not been loaded anywhere. 

Return type:  NBJ_STD_Solver 
The current value of the expression. Should be used to retrieve the assigned value of a variable and the value of expressions like the objective function.
In the case of variables, it may not be passed in to the solver if it is not involved in a nontrivial constraint. For example, x <= 1, x will not get added (by this constraint alone) if it has a upper bound which is less or equal to 1. The variable’s lower bound will be returned as the value in this case.
Parameters:  solver (NBJ_STD_Solver) – If specified, the solver from which the value will be sourced, if None then the most recently loaded solver is used. 

Returns:  The current value of the expression. 
Return type:  The same as the original domain, either int, float, or str. 
Returns a string representing the initial domain of the expression. For example:
var1 = Variable(0, 10)
print var1.initial()
>>> x0 in {0..10}
Returns:  A String representation of original expression definition 

Return type:  str 
The name of the variable or the operator if this is an expression.
Deprecated since version 1.1: Instead you should use get_value(), this function is equivalent to calling str() on that.
Returns a string containing the solution value of the expression. For a native representation of the solution value, use get_value()
Parameters:  solver (NBJ_STD_Solver) – If specified, the solver from which the solution will be sourced, if None then the most recently loaded solver is used. 

Returns:  String representation of the expressions solution. 
Return type:  str 
Precedence constraint enforces a certain gap between the start time of two tasks. Equivalent to task_i + duration <= task_j.
Parameters: 


Binary disjunctive constraint enforces that two tasks do not overlap. Equivalent to (task_i + duration_i <= task_j)  (task_j + duration_j <= task_i) .
Parameters: 


Unary resource constraint ensures that only one of the specified list of tasks are running at each time point. An optional distance between tasks can be specified also.
Parameters: 


Add an additional task to the existing list of tasks obeying this unary resource.
Parameters:  new_task (Task) – the additional task to include. 
