#########################
# scheduler_quotas.conf #
##############################################################################
# Only available in the scheduler:                                           #
#     - oar_sched_gantt_with_timesharing_and_fairsharing_and_quotas          #
# (type "oarnotify -l" to get the name of the used schedulers)               #
##############################################################################
#
# Implements quotas on:
#   - the amount of busy resources at a time
#   - the number of running jobs at a time
#   - the resource time in use at a time (nb_resources X hours)
#     This can be seen like a surface used by users, projects, types, ...
#
# depending on:
#
#  - job queue name ("-q" oarsub option)
#  - job project name ("--project" oarsub option)
#  - job types ("-t" oarsub options)
#  - job user
# 
# Syntax is like:
#
#   $Gantt_quotas->{queue}->{project}->{type}->{user} = [integer, integer, float];
#                                                           |        |       |
#                                maximum busy resources ----+        |       |
#                                maximum number of running jobs -----+       |
#                                maximum resource hours ---------------------+
#
#       '*' means "every" when used in place of queue, project,
#           type and user
#       '/' means "per" when used in place of queue, project and user
#           (NOT usable for type)
#        -1 means "no limit" as the value of the integer fields
#
# The lowest corresponding quota for each job is used (it depends on the
# consumptions of the other jobs). If specific values are defined then it is
# taken instead of '*' and '/'.
#
# The default quota configuration is (infinity of resources and jobs):
#
#       $Gantt_quotas->{'*'}->{'*'}->{'*'}->{'*'} = [-1, -1, -1] ;
#
# Examples:
#
#   - No more than 100 resources used by 'john' at a time:
#
#       $Gantt_quotas->{'*'}->{'*'}->{'*'}->{'john'} = [100, -1, -1] ;
#
#   - No more than 100 resources used by 'john' and no more than 4 jobs at a
#     time:
#
#       $Gantt_quotas->{'*'}->{'*'}->{'*'}->{'john'} = [100, 4, -1] ;
#
#   - No more than 150 resources used by jobs of besteffort type at a time:
#
#       $Gantt_quotas->{'*'}->{'*'}->{'besteffort'}->{'*'} = [150, -1, -1] ;
#
#   - No more than 150 resources used and no more than 35 jobs of besteffort
#     type at a time:
#
#       $Gantt_quotas->{'*'}->{'*'}->{'besteffort'}->{'*'} = [150, 35, -1] ;
#
#   - No more than 200 resources used by jobs in the project "proj1" at a
#     time:
#
#       $Gantt_quotas->{'*'}->{'proj1'}->{'*'}->{'*'} = [200, -1, -1] ;
#
#   - No more than 20 resources used by 'john' in the project 'proj12' at a
#     time:
#
#       $Gantt_quotas->{'*'}->{'proj12'}->{'*'}->{'john'} = [20, -1, -1] ;
#
#   - No more than 80 resources used by jobs in the project "proj1" per user
#     at a time:
#
#       $Gantt_quotas->{'*'}->{'proj1'}->{'*'}->{'/'} = [80, -1, -1] ;
#
#   - No more than 50 resources used per user per project at a time:
#
#       $Gantt_quotas->{'*'}->{'/'}->{'*'}->{'/'} = [50, -1, -1] ;
#
#   - No more than 200 resource hours used per user at a time:
#
#       $Gantt_quotas->{'*'}->{'*'}->{'*'}->{'/'} = [-1, -1, 200] ;
#
#     For example, a job can take 1 resource for 200 hours or 200 resources for
#     1 hour.
#
# Note: If the value is only one integer then it means that there is no limit
#       on the number of running jobs and rsource hours. So the 2 following
#       statements have the same meaning:
#
#           $Gantt_quotas->{'*'}->{'*'}->{'*'}->{'john'} = 100 ;
#           $Gantt_quotas->{'*'}->{'*'}->{'*'}->{'john'} = [100, -1, -1] ;
#
#############################################################################

#$Gantt_quotas->{'*'}->{'*'}->{'*'}->{'john'} = [80,10,100] ;
#$Gantt_quotas->{'*'}->{'proj1'}->{'*'}->{'/'} = [25,100,2000] ;

