Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/spst/UnixTransition/doc/gimme_snaps.html
Дата изменения: Fri Apr 8 12:46:14 2016
Дата индексирования: Mon Apr 11 01:31:32 2016
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п п п п
Python: module gimme_snaps
 
 
gimme_snaps (version 9/25/08)
index
gimme_snaps.py

Reserves SUs from the specified 'pool' for the specified week.
 
TITLE:       gimme_snaps.py
DEVELOPER:   Merle Reinhart, 5-APR-2000
 
PURPOSE:     This tool will reserve the requested number of SUs from the
             specified pool for the specified week and create a file of
             the reserved SUs that can be used by the calendar builder.
 
USAGE:       do gimme_snaps <week_id> <pool> <number> [<week_size>]
               where: <week_id> is the calendar week the reservations are for
                      <pool>    is the SU 'pool' from which to make the
                                reservations
                      <number>  is the total number to attempt to reserve
                      <week_size> is the size of the calendar in days
 
RETURNS:     nothing
 
MOD HISTORY:
Pythonized the fetching of POOL SUs.  drc 2/21/02
Add constraint scenario check in supersnaps query. drc 5/6/03
Add the dead_sis parameter.  drc 9/21/04
move gimme_snaps.isql to python; add exclude configs option.  drc 2/6/07
Get the dead configs from spss_sys_util.get_dead_configs.  drc 9/25/08

 
Modules
       
os
spss_sys_util

 
Functions
       
exclude_dead_configs(sulist, dead_configs)
Remove SUs from the sulist that have configs that match the
dead_configs.  Returns a new su_list object.
get_configs_to_exclude()
get_lrp_sus(dbconn, lrp, cal_start, cal_end, dead_sis_bitmap=0)
Return a list of SUs which are in the specified LRP, have
plan windows intersecting the current week, are set to scheduling,
and do not have any exposures using the dead_sis.
get_other_pools(dbconn, pool, cal_start, cal_end, dead_sis_bitmap=0)
get_possible_supersnaps(dbconn, cal_start, cal_end, dead_sis_bitmap=0)
Find possible supersnaps.
 
Find SUs that
     -- are set to scheduling and
     -- are supersnap candidates and
     -- have DO windows that intersect the week and
     -- are not in link sets and
     -- are not in qsched_pool yet and
     -- have constraint windows that intersect the week in either the PMDB or assist with
        the default contraint scenario and
     -- are not using SIs in 'dead_sis' and
     -- have plan windows even if they are not for the week.
get_qsched_pool_sus(dbconn, week_id, order_num)
Return the SUs from qsched_pool matching a particular week and order_num.
in_qsched_pool(dbconn, su)
Determine if the input SU is in qsched_pool or not.
Returns True if it is found in qsched_pool, otherwise returns False.
qsched_pool_insert(dbconn, sulist, week_id, order_num)
Insert the SUs in sulist into qsched_pool.
run(week_id=None, snap_type=None, num_snaps=None, week_size=7.0, dead_sis=None, y_or_n=None)
update_qsched_pool(dbconn, sulist, week_id, snap_type)
usc_filter(sulist, cal_start, cal_end)
Return an su_list of all the SUs from the input su_list that have usc windows
that intersect the current week or don't have usc windows.

 
Data
        QSCHED_POOL_ORDER_NUM = {'LRP': 'LR', 'POOL': 'PR', 'SNAP': 'SR', 'SPEC': 'ER'}
SNAP_TYPES = ['SNAP', 'LRP', 'SPEC', 'POOL']
TEST = False
__version__ = '9/25/08'