Пример #1
0
def C_ARCHIVAGE():
    return FACT(
        statut='d',
        max=1,
        regles=(EXCLUS('PAS_ARCH', 'LIST_INST', 'INST'), ),
        LIST_INST=SIMP(statut='f', typ=(listr8_sdaster)),
        INST=SIMP(statut='f', typ='R', validators=NoRepeat(), max='**'),
        PAS_ARCH=SIMP(statut='f', typ='I'),
        CRITERE=SIMP(statut='f',
                     typ='TXM',
                     defaut="RELATIF",
                     into=("RELATIF", "ABSOLU")),
        b_prec_rela=BLOC(
            condition="""(equal_to("CRITERE", 'RELATIF'))""",
            PRECISION=SIMP(
                statut='f',
                typ='R',
                defaut=1.E-6,
            ),
        ),
        b_prec_abso=BLOC(
            condition="""(equal_to("CRITERE", 'ABSOLU'))""",
            PRECISION=SIMP(
                statut='o',
                typ='R',
            ),
        ),
        CHAM_EXCLU=SIMP(
            statut='f',
            typ='TXM',
            validators=NoRepeat(),
            max='**',
        ),
    )
Пример #2
0
def C_INCREMENT(TYPE_CMD):  #COMMUN#
    #
    assert TYPE_CMD in (
        'THERMIQUE',
        'MECANIQUE',
    )
    kwargs = {}
    statut_liste_inst = ' '

    # La liste d'instants est facultative en thermique et obligatoire en mecanique

    if TYPE_CMD in ('THERMIQUE'):
        statut_liste_inst = 'f'
    elif TYPE_CMD in ('MECANIQUE'):
        statut_liste_inst = 'o'

    kwargs['LIST_INST'] = SIMP(statut=statut_liste_inst,
                               typ=(listr8_sdaster, list_inst))
    kwargs['NUME_INST_INIT'] = SIMP(statut='f', typ='I')
    kwargs['INST_INIT'] = SIMP(statut='f', typ='R')
    kwargs['NUME_INST_FIN'] = SIMP(statut='f', typ='I')
    kwargs['INST_FIN'] = SIMP(statut='f', typ='R')
    kwargs['PRECISION'] = SIMP(statut='f', typ='R', defaut=1.0E-6)

    mcfact = FACT(statut=statut_liste_inst,
                  regles=(
                      EXCLUS('NUME_INST_INIT', 'INST_INIT'),
                      EXCLUS('NUME_INST_FIN', 'INST_FIN'),
                  ),
                  **kwargs)

    return mcfact
Пример #3
0
def C_MESURE():
    return FACT(
        statut='d',
        max=1,
        TABLE=SIMP(statut='f', typ='TXM', defaut="NON", into=("OUI", "NON")),
        UNITE=SIMP(statut='f', typ=UnitType(), val_min=1, inout='out'),
    )
Пример #4
0
def C_AFFICHAGE():
    return FACT(
        statut='f',
        max=1,
        INFO_RESIDU=SIMP(statut='f',
                         typ='TXM',
                         defaut="NON",
                         into=("OUI", "NON")),
        INFO_TEMPS=SIMP(statut='f',
                        typ='TXM',
                        defaut="NON",
                        into=("OUI", "NON")),
        UNITE=SIMP(statut='f', typ=UnitType(), val_min=1, inout='out'),
        PAS=SIMP(statut='f', typ='I', val_min=1),
    )