physics_workload.app.models.load_function

Classes

LoadFunction

Evaluatable Python expression that determines the load for a number of students,

Module Contents

class physics_workload.app.models.load_function.LoadFunction

Bases: app.models.common.ModelCommon

Evaluatable Python expression that determines the load for a number of students, e.g. for number of tutees or when marking a dissertation.

icon = 'calculator'
url_root = 'function'
name
expression
plot_minimum
plot_maximum
notes
__str__() str
class Meta
ordering = ('name',)
verbose_name = 'Load Function'
verbose_name_plural = 'Load Functions'
constraints
evaluate(students: int, unit: object | None = None) float | None

Runs the equation for a given number of students.

Parameters:
  • students – The number of students.

  • unit – The unit.

Returns:

The output of the equation.

has_access(user: django.contrib.auth.models.AbstractUser | django.contrib.auth.models.AnonymousUser) bool

You can always see the load functions