From: pascale.noyret Date: Wed, 21 Jul 2021 15:30:47 +0000 (+0200) Subject: chgt Copyrigth X-Git-Tag: livraison11Oct21~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e4f9ed44499c18435beb762c4deb1df9f1c8343a;p=tools%2Feficas.git chgt Copyrigth --- diff --git a/Accas/A_ASSD.py b/Accas/A_ASSD.py index 22c98794..88cc13af 100644 --- a/Accas/A_ASSD.py +++ b/Accas/A_ASSD.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -22,15 +22,15 @@ from __future__ import absolute_import from Ihm import I_ASSD from Ihm import I_LASSD from Ihm import I_FONCTION -from Noyau import N_ASSD -from Noyau import N_GEOM -from Noyau import N_FONCTION -from Noyau import N_CO -from Noyau import N_UserASSD +from Noyau import N_ASSD +from Noyau import N_GEOM +from Noyau import N_FONCTION +from Noyau import N_CO +from Noyau import N_UserASSD -# On ajoute la classe ASSD dans l'heritage multiple pour recreer +# On ajoute la classe ASSD dans l'heritage multiple pour recreer # une hierarchie d'heritage identique a celle de Noyau -# pour faire en sorte que isinstance(o,ASSD) marche encore apres +# pour faire en sorte que isinstance(o,ASSD) marche encore apres # derivation class ASSD(I_ASSD.ASSD,N_ASSD.ASSD):pass @@ -41,26 +41,24 @@ class UserASSD(N_UserASSD.UserASSD,ASSD): pass class assd(N_ASSD.assd,I_ASSD.assd,ASSD):pass class FONCTION(N_FONCTION.FONCTION,I_FONCTION.FONCTION,ASSD): - def __init__(self,etape=None,sd=None,reg='oui'): - N_FONCTION.FONCTION.__init__(self,etape=etape,sd=sd,reg=reg) - I_FONCTION.FONCTION.__init__(self,etape=etape,sd=sd,reg=reg) + def __init__(self,etape=None,sd=None,reg='oui'): + N_FONCTION.FONCTION.__init__(self,etape=etape,sd=sd,reg=reg) + I_FONCTION.FONCTION.__init__(self,etape=etape,sd=sd,reg=reg) class formule(I_FONCTION.formule,N_FONCTION.formule,ASSD): - def __init__(self,etape=None,sd=None,reg='oui'): - N_FONCTION.formule.__init__(self,etape=etape,sd=sd,reg=reg) - I_FONCTION.formule.__init__(self,etape=etape,sd=sd,reg=reg) + def __init__(self,etape=None,sd=None,reg='oui'): + N_FONCTION.formule.__init__(self,etape=etape,sd=sd,reg=reg) + I_FONCTION.formule.__init__(self,etape=etape,sd=sd,reg=reg) class formule_c(formule):pass # On conserve fonction (ceinture et bretelles) # fonction n'existe plus dans N_FONCTION on le remplace par formule class fonction(N_FONCTION.formule,I_FONCTION.fonction,ASSD): - def __init__(self,etape=None,sd=None,reg='oui'): - N_FONCTION.formule.__init__(self,etape=etape,sd=sd,reg=reg) - I_FONCTION.fonction.__init__(self,etape=etape,sd=sd,reg=reg) + def __init__(self,etape=None,sd=None,reg='oui'): + N_FONCTION.formule.__init__(self,etape=etape,sd=sd,reg=reg) + I_FONCTION.fonction.__init__(self,etape=etape,sd=sd,reg=reg) class GEOM(N_GEOM.GEOM,I_ASSD.GEOM,ASSD):pass class geom(N_GEOM.geom,I_ASSD.geom,ASSD):pass class CO(N_CO.CO,I_ASSD.CO,ASSD):pass - - diff --git a/Accas/A_AU_MOINS_UN.py b/Accas/A_AU_MOINS_UN.py index e8945759..743f7d03 100644 --- a/Accas/A_AU_MOINS_UN.py +++ b/Accas/A_AU_MOINS_UN.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -23,8 +23,8 @@ from Validation import V_AU_MOINS_UN from Ihm import I_REGLE class AU_MOINS_UN(V_AU_MOINS_UN.AU_MOINS_UN,I_REGLE.REGLE,N_REGLE.REGLE): - """ - La classe utilise l'initialiseur de REGLE. Il n'est pas - necessaire d'expliciter son initialiseur car - V_AU_MOINS_UN.AU_MOINS_UN n'en a pas - """ + """ + La classe utilise l'initialiseur de REGLE. Il n'est pas + necessaire d'expliciter son initialiseur car + V_AU_MOINS_UN.AU_MOINS_UN n'en a pas + """ diff --git a/Accas/A_AU_PLUS_UN.py b/Accas/A_AU_PLUS_UN.py index 1cf38da6..197f936a 100644 --- a/Accas/A_AU_PLUS_UN.py +++ b/Accas/A_AU_PLUS_UN.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -23,8 +23,8 @@ from Validation import V_AU_PLUS_UN from Ihm import I_REGLE class AU_PLUS_UN(V_AU_PLUS_UN.AU_PLUS_UN,I_REGLE.REGLE,N_REGLE.REGLE): - """ - La classe utilise l'initialiseur de REGLE. Il n'est pas - necessaire d'expliciter son initialiseur car - V_AU_PLUS_UN.AU_PLUS_UN n'en a pas - """ + """ + La classe utilise l'initialiseur de REGLE. Il n'est pas + necessaire d'expliciter son initialiseur car + V_AU_PLUS_UN.AU_PLUS_UN n'en a pas + """ diff --git a/Accas/A_AVANT.py b/Accas/A_AVANT.py index 63aa2507..2f697723 100644 --- a/Accas/A_AVANT.py +++ b/Accas/A_AVANT.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -22,8 +22,8 @@ from Noyau import N_REGLE from Ihm import I_REGLE, I_AVANT class AVANT(I_AVANT.I_AVANT,I_REGLE.REGLE,N_REGLE.REGLE): - """ - La classe utilise l'initialiseur de REGLE. Il n'est pas - necessaire d'expliciter son initialiseur car - I_AVANT.I_AVANT n'en a pas - """ + """ + La classe utilise l'initialiseur de REGLE. Il n'est pas + necessaire d'expliciter son initialiseur car + I_AVANT.I_AVANT n'en a pas + """ diff --git a/Accas/A_A_CLASSER.py b/Accas/A_A_CLASSER.py index 70ec47a8..1e9e3fcc 100644 --- a/Accas/A_A_CLASSER.py +++ b/Accas/A_A_CLASSER.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -23,7 +23,7 @@ from Validation import V_A_CLASSER from Ihm import I_A_CLASSER class A_CLASSER(V_A_CLASSER.A_CLASSER,N_REGLE.REGLE,I_A_CLASSER.A_CLASSER): - """ - La classe utilise l'initialiseur du module V_. - Il faut absolument que V_A_CLASSER soit en premier dans l'heritage - """ + """ + La classe utilise l'initialiseur du module V_. + Il faut absolument que V_A_CLASSER soit en premier dans l'heritage + """ diff --git a/Accas/A_BLOC.py b/Accas/A_BLOC.py index badd8d9d..d68b28e3 100644 --- a/Accas/A_BLOC.py +++ b/Accas/A_BLOC.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -25,8 +25,7 @@ from Efi2Xsd.AccasXsd import X_BLOC class BLOC(N_BLOC.BLOC,X_BLOC,I_ENTITE.ENTITE): - class_instance=A_MCBLOC.MCBLOC - def __init__(self,*tup,**args): - I_ENTITE.ENTITE.__init__(self) - N_BLOC.BLOC.__init__(self,*tup,**args) - + class_instance=A_MCBLOC.MCBLOC + def __init__(self,*tup,**args): + I_ENTITE.ENTITE.__init__(self) + N_BLOC.BLOC.__init__(self,*tup,**args) diff --git a/Accas/A_ENSEMBLE.py b/Accas/A_ENSEMBLE.py index 8b4a3a78..e60c16be 100644 --- a/Accas/A_ENSEMBLE.py +++ b/Accas/A_ENSEMBLE.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -23,8 +23,8 @@ from Validation import V_ENSEMBLE from Ihm import I_REGLE class ENSEMBLE(I_REGLE.REGLE,V_ENSEMBLE.ENSEMBLE,N_REGLE.REGLE): - """ - La classe utilise l'initialiseur de REGLE. Il n'est pas - necessaire d'expliciter son initialiseur car - V_ENSEMBLE.ENSEMBLE n'en a pas - """ + """ + La classe utilise l'initialiseur de REGLE. Il n'est pas + necessaire d'expliciter son initialiseur car + V_ENSEMBLE.ENSEMBLE n'en a pas + """ diff --git a/Accas/A_ETAPE.py b/Accas/A_ETAPE.py index 11dc12de..301dfd9f 100644 --- a/Accas/A_ETAPE.py +++ b/Accas/A_ETAPE.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -24,6 +24,6 @@ from Ihm import I_ETAPE from Efi2Xsd.MCAccasXML import X_ETAPE class ETAPE(I_ETAPE.ETAPE,V_ETAPE.ETAPE,X_ETAPE,N_ETAPE.ETAPE): - def __init__(self,oper=None,reuse=None,args={}): - N_ETAPE.ETAPE.__init__(self,oper,reuse,args) - V_ETAPE.ETAPE.__init__(self) + def __init__(self,oper=None,reuse=None,args={}): + N_ETAPE.ETAPE.__init__(self,oper,reuse,args) + V_ETAPE.ETAPE.__init__(self) diff --git a/Accas/A_EVAL.py b/Accas/A_EVAL.py index eb04237d..16905ee2 100644 --- a/Accas/A_EVAL.py +++ b/Accas/A_EVAL.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,8 +18,8 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # from __future__ import absolute_import -from Ihm import I_EVAL +from Ihm import I_EVAL class EVAL(I_EVAL.EVAL): - def __init__(self,str): - I_EVAL.EVAL.__init__(self,str) + def __init__(self,str): + I_EVAL.EVAL.__init__(self,str) diff --git a/Accas/A_EXCLUS.py b/Accas/A_EXCLUS.py index 432dc45b..d69af075 100644 --- a/Accas/A_EXCLUS.py +++ b/Accas/A_EXCLUS.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -23,8 +23,8 @@ from Validation import V_EXCLUS from Ihm import I_EXCLUS class EXCLUS(I_EXCLUS.EXCLUS,V_EXCLUS.EXCLUS,N_REGLE.REGLE): - """ - La classe utilise l'initialiseur de REGLE. Il n'est pas - necessaire d'expliciter son initialiseur car - V_EXCLUS.EXCLUS n'en a pas - """ + """ + La classe utilise l'initialiseur de REGLE. Il n'est pas + necessaire d'expliciter son initialiseur car + V_EXCLUS.EXCLUS n'en a pas + """ diff --git a/Accas/A_FACT.py b/Accas/A_FACT.py index ebccc614..776c6f10 100644 --- a/Accas/A_FACT.py +++ b/Accas/A_FACT.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -26,15 +26,14 @@ from Efi2Xsd.AccasXsd import X_FACT class FACT(N_FACT.FACT,X_FACT,I_ENTITE.ENTITE): - class_instance=A_MCFACT.MCFACT - list_instance=A_MCLIST.MCList - def __init__(self,*tup,**args): - I_ENTITE.ENTITE.__init__(self) - N_FACT.FACT.__init__(self,*tup,**args) + class_instance=A_MCFACT.MCFACT + list_instance=A_MCLIST.MCList + def __init__(self,*tup,**args): + I_ENTITE.ENTITE.__init__(self) + N_FACT.FACT.__init__(self,*tup,**args) from Noyau import N_OBJECT from Ihm import I_OBJECT class ErrorObj(I_OBJECT.ErrorObj,N_OBJECT.ErrorObj):pass N_OBJECT.ErrorObj=ErrorObj - diff --git a/Accas/A_FICHIER.py b/Accas/A_FICHIER.py index d7aab167..473f4058 100644 --- a/Accas/A_FICHIER.py +++ b/Accas/A_FICHIER.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -25,7 +25,5 @@ from __future__ import absolute_import from Ihm import I_FICHIER class Fichier (I_FICHIER.Fichier): - def __init__(self,*tup,**args): - I_FICHIER.FICHIER.__init__(self,*tup,**args) - - + def __init__(self,*tup,**args): + I_FICHIER.FICHIER.__init__(self,*tup,**args) diff --git a/Accas/A_FORM.py b/Accas/A_FORM.py index 06af6942..c310fa11 100644 --- a/Accas/A_FORM.py +++ b/Accas/A_FORM.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -20,7 +20,7 @@ from __future__ import absolute_import from Noyau import N_FORM from Ihm import I_ENTITE -from . import A_FORM_ETAPE +from . import A_FORM_ETAPE class FORM(N_FORM.FORM,I_ENTITE.ENTITE): - class_instance=A_FORM_ETAPE.FORM_ETAPE + class_instance=A_FORM_ETAPE.FORM_ETAPE diff --git a/Accas/A_FORM_ETAPE.py b/Accas/A_FORM_ETAPE.py index 5eb2c1e0..b6161946 100644 --- a/Accas/A_FORM_ETAPE.py +++ b/Accas/A_FORM_ETAPE.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -24,8 +24,7 @@ from Validation import V_MACRO_ETAPE from Ihm import I_FORM_ETAPE class FORM_ETAPE(I_FORM_ETAPE.FORM_ETAPE,V_MACRO_ETAPE.MACRO_ETAPE,N_FORM_ETAPE.FORM_ETAPE): - def __init__(self,oper=None,reuse=None,args={}): - N_FORM_ETAPE.FORM_ETAPE.__init__(self,oper,reuse,args) - V_MACRO_ETAPE.MACRO_ETAPE.__init__(self) - I_FORM_ETAPE.FORM_ETAPE.__init__(self) - + def __init__(self,oper=None,reuse=None,args={}): + N_FORM_ETAPE.FORM_ETAPE.__init__(self,oper,reuse,args) + V_MACRO_ETAPE.MACRO_ETAPE.__init__(self) + I_FORM_ETAPE.FORM_ETAPE.__init__(self) diff --git a/Accas/A_JDC.py b/Accas/A_JDC.py index 3748913d..cc05f305 100644 --- a/Accas/A_JDC.py +++ b/Accas/A_JDC.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -25,12 +25,12 @@ from Ihm import I_JDC from Efi2Xsd.MCAccasXML import X_JDC class JDC(jdc.JDC,I_JDC.JDC,X_JDC,V_JDC.JDC,N_JDC.JDC): - from .A_ASSD import CO,assd + from .A_ASSD import CO,assd - def __init__(self,*pos,**args): - N_JDC.JDC.__init__(self,*pos,**args) - X_JDC.__init__(self) - V_JDC.JDC.__init__(self) - I_JDC.JDC.__init__(self) - jdc.JDC.__init__(self) - self.icmd=0 + def __init__(self,*pos,**args): + N_JDC.JDC.__init__(self,*pos,**args) + X_JDC.__init__(self) + V_JDC.JDC.__init__(self) + I_JDC.JDC.__init__(self) + jdc.JDC.__init__(self) + self.icmd=0 diff --git a/Accas/A_JDC_CATA.py b/Accas/A_JDC_CATA.py index fd8a248d..1e34ba10 100644 --- a/Accas/A_JDC_CATA.py +++ b/Accas/A_JDC_CATA.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -24,9 +24,9 @@ from Ihm import I_JDC_CATA from Efi2Xsd.AccasXsd import X_JDC_CATA class JDC_CATA(I_JDC_CATA.JDC_CATA,N_JDC_CATA.JDC_CATA,X_JDC_CATA): - class_instance=A_JDC.JDC - def __init__(self,*pos,**kw): - #print pos - #print kw - N_JDC_CATA.JDC_CATA.__init__(self,*pos,**kw) - I_JDC_CATA.JDC_CATA.__init__(self) + class_instance=A_JDC.JDC + def __init__(self,*pos,**kw): + #print pos + #print kw + N_JDC_CATA.JDC_CATA.__init__(self,*pos,**kw) + I_JDC_CATA.JDC_CATA.__init__(self) diff --git a/Accas/A_MACRO.py b/Accas/A_MACRO.py index 2a059062..b8f7b93b 100644 --- a/Accas/A_MACRO.py +++ b/Accas/A_MACRO.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -20,11 +20,10 @@ from __future__ import absolute_import from Noyau import N_MACRO from Ihm import I_ENTITE -from . import A_MACRO_ETAPE +from . import A_MACRO_ETAPE class MACRO(N_MACRO.MACRO,I_ENTITE.ENTITE): - class_instance=A_MACRO_ETAPE.MACRO_ETAPE - def __init__(self,*tup,**args): - I_ENTITE.ENTITE.__init__(self) - N_MACRO.MACRO.__init__(self,*tup,**args) - + class_instance=A_MACRO_ETAPE.MACRO_ETAPE + def __init__(self,*tup,**args): + I_ENTITE.ENTITE.__init__(self) + N_MACRO.MACRO.__init__(self,*tup,**args) diff --git a/Accas/A_MACRO_ETAPE.py b/Accas/A_MACRO_ETAPE.py index 28a3ce74..74ef0b4b 100644 --- a/Accas/A_MACRO_ETAPE.py +++ b/Accas/A_MACRO_ETAPE.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -28,8 +28,8 @@ class MACRO_ETAPE(I_MACRO_ETAPE.MACRO_ETAPE, X_MCCOMPO, V_MACRO_ETAPE.MACRO_ETAPE, N_MACRO_ETAPE.MACRO_ETAPE): - typeCO=CO - def __init__(self,oper=None,reuse=None,args={}): - N_MACRO_ETAPE.MACRO_ETAPE.__init__(self,oper,reuse,args) - V_MACRO_ETAPE.MACRO_ETAPE.__init__(self) - I_MACRO_ETAPE.MACRO_ETAPE.__init__(self) + typeCO=CO + def __init__(self,oper=None,reuse=None,args={}): + N_MACRO_ETAPE.MACRO_ETAPE.__init__(self,oper,reuse,args) + V_MACRO_ETAPE.MACRO_ETAPE.__init__(self) + I_MACRO_ETAPE.MACRO_ETAPE.__init__(self) diff --git a/Accas/A_MCBLOC.py b/Accas/A_MCBLOC.py index 5bd5cebd..e871ffda 100644 --- a/Accas/A_MCBLOC.py +++ b/Accas/A_MCBLOC.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -25,6 +25,6 @@ from Efi2Xsd.MCAccasXML import X_MCBLOC class MCBLOC(I_MCBLOC.MCBLOC,N_MCBLOC.MCBLOC,X_MCBLOC,V_MCBLOC.MCBLOC): - def __init__(self,val,definition,nom,parent,dicoPyxbDeConstruction=None): - N_MCBLOC.MCBLOC.__init__(self,val,definition,nom,parent,dicoPyxbDeConstruction=dicoPyxbDeConstruction) - V_MCBLOC.MCBLOC.__init__(self) + def __init__(self,val,definition,nom,parent,dicoPyxbDeConstruction=None): + N_MCBLOC.MCBLOC.__init__(self,val,definition,nom,parent,dicoPyxbDeConstruction=dicoPyxbDeConstruction) + V_MCBLOC.MCBLOC.__init__(self) diff --git a/Accas/A_MCFACT.py b/Accas/A_MCFACT.py index 769dcd28..87c5a3d4 100644 --- a/Accas/A_MCFACT.py +++ b/Accas/A_MCFACT.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -24,6 +24,6 @@ from Ihm import I_MCFACT from Efi2Xsd.MCAccasXML import X_MCFACT class MCFACT(I_MCFACT.MCFACT,N_MCFACT.MCFACT,X_MCFACT,V_MCFACT.MCFACT): - def __init__(self,val,definition,nom,parent,dicoPyxbDeConstruction=None): - N_MCFACT.MCFACT.__init__(self,val,definition,nom,parent,dicoPyxbDeConstruction=dicoPyxbDeConstruction) - V_MCFACT.MCFACT.__init__(self) + def __init__(self,val,definition,nom,parent,dicoPyxbDeConstruction=None): + N_MCFACT.MCFACT.__init__(self,val,definition,nom,parent,dicoPyxbDeConstruction=dicoPyxbDeConstruction) + V_MCFACT.MCFACT.__init__(self) diff --git a/Accas/A_MCLIST.py b/Accas/A_MCLIST.py index 922abb89..f80f1368 100644 --- a/Accas/A_MCLIST.py +++ b/Accas/A_MCLIST.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -25,5 +25,5 @@ from Efi2Xsd.MCAccasXML import X_MCLIST class MCList(I_MCLIST.MCList,N_MCLIST.MCList,X_MCLIST,V_MCLIST.MCList): - def __init__(self): - N_MCLIST.MCList.__init__(self) + def __init__(self): + N_MCLIST.MCList.__init__(self) diff --git a/Accas/A_MCNUPLET.py b/Accas/A_MCNUPLET.py index 465eae7c..74515270 100644 --- a/Accas/A_MCNUPLET.py +++ b/Accas/A_MCNUPLET.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -22,5 +22,5 @@ from Extensions import mcnuplet from Ihm import I_MCCOMPO class MCNUPLET(mcnuplet.MCNUPLET,I_MCCOMPO.MCCOMPO): - def __init__(self,*pos,**args): - mcnuplet.MCNUPLET.__init__(self,*pos,**args) + def __init__(self,*pos,**args): + mcnuplet.MCNUPLET.__init__(self,*pos,**args) diff --git a/Accas/A_MCSIMP.py b/Accas/A_MCSIMP.py index 7c7ecbca..d24cd7a6 100644 --- a/Accas/A_MCSIMP.py +++ b/Accas/A_MCSIMP.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -24,7 +24,7 @@ from Ihm import I_MCSIMP from Efi2Xsd.MCAccasXML import X_MCSIMP class MCSIMP(I_MCSIMP.MCSIMP,N_MCSIMP.MCSIMP,X_MCSIMP,V_MCSIMP.MCSIMP): - def __init__(self,val,definition,nom,parent,objPyxbDeConstruction=None): - #def __init__(self,val,definition,nom,parent,objPyxbDeConstruction) quand cela sera correct dans les update_etape. pour l instant on laisse le defaut a None : 9 Aout 18: - N_MCSIMP.MCSIMP.__init__(self,val,definition,nom,parent,objPyxbDeConstruction) - V_MCSIMP.MCSIMP.__init__(self) + def __init__(self,val,definition,nom,parent,objPyxbDeConstruction=None): + #def __init__(self,val,definition,nom,parent,objPyxbDeConstruction) quand cela sera correct dans les update_etape. pour l instant on laisse le defaut a None : 9 Aout 18: + N_MCSIMP.MCSIMP.__init__(self,val,definition,nom,parent,objPyxbDeConstruction) + V_MCSIMP.MCSIMP.__init__(self) diff --git a/Accas/A_MEME_NOMBRE.py b/Accas/A_MEME_NOMBRE.py index 93efdd27..39f4dcb5 100644 --- a/Accas/A_MEME_NOMBRE.py +++ b/Accas/A_MEME_NOMBRE.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -23,8 +23,8 @@ from Validation import V_MEME_NOMBRE from Ihm import I_REGLE class MEME_NOMBRE(V_MEME_NOMBRE.MEME_NOMBRE,I_REGLE.REGLE,N_REGLE.REGLE): - """ - La classe utilise l'initialiseur de REGLE. Il n'est pas - necessaire d'expliciter son initialiseur car - V_MEME_NOMBRE.MEME_NOMBRE n'en a pas - """ + """ + La classe utilise l'initialiseur de REGLE. Il n'est pas + necessaire d'expliciter son initialiseur car + V_MEME_NOMBRE.MEME_NOMBRE n'en a pas + """ diff --git a/Accas/A_NUPLET.py b/Accas/A_NUPLET.py index d9fbe353..6546f5a5 100644 --- a/Accas/A_NUPLET.py +++ b/Accas/A_NUPLET.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -23,5 +23,5 @@ from . import A_MCLIST from . import A_MCNUPLET class NUPL(nuplet.NUPL): - class_instance=A_MCNUPLET.MCNUPLET - list_instance=A_MCLIST.MCList + class_instance=A_MCNUPLET.MCNUPLET + list_instance=A_MCLIST.MCList diff --git a/Accas/A_OPER.py b/Accas/A_OPER.py index c1a4f0a5..353a69ef 100644 --- a/Accas/A_OPER.py +++ b/Accas/A_OPER.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -20,12 +20,12 @@ from __future__ import absolute_import from Noyau import N_OPER from Ihm import I_ENTITE -from Accas import A_ETAPE +from Accas import A_ETAPE from Efi2Xsd.AccasXsd import X_OPER class OPER(N_OPER.OPER,X_OPER,I_ENTITE.ENTITE): - class_instance=A_ETAPE.ETAPE - def __init__(self,*tup,**args): - I_ENTITE.ENTITE.__init__(self) - N_OPER.OPER.__init__(self,*tup,**args) + class_instance=A_ETAPE.ETAPE + def __init__(self,*tup,**args): + I_ENTITE.ENTITE.__init__(self) + N_OPER.OPER.__init__(self,*tup,**args) diff --git a/Accas/A_PRESENT_ABSENT.py b/Accas/A_PRESENT_ABSENT.py index 00f6e2eb..3572b84a 100644 --- a/Accas/A_PRESENT_ABSENT.py +++ b/Accas/A_PRESENT_ABSENT.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -24,8 +24,8 @@ from Ihm import I_PRESENT_ABSENT class PRESENT_ABSENT(I_PRESENT_ABSENT.PRESENT_ABSENT,V_PRESENT_ABSENT.PRESENT_ABSENT, N_REGLE.REGLE): - """ - La classe utilise l'initialiseur de REGLE. Il n'est pas - necessaire d'expliciter son initialiseur car - V_PRESENT_ABSENT.PRESENT_ABSENT n'en a pas - """ + """ + La classe utilise l'initialiseur de REGLE. Il n'est pas + necessaire d'expliciter son initialiseur car + V_PRESENT_ABSENT.PRESENT_ABSENT n'en a pas + """ diff --git a/Accas/A_PRESENT_PRESENT.py b/Accas/A_PRESENT_PRESENT.py index 397bf769..f46b32f8 100644 --- a/Accas/A_PRESENT_PRESENT.py +++ b/Accas/A_PRESENT_PRESENT.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -25,8 +25,8 @@ from Ihm import I_PRESENT_PRESENT class PRESENT_PRESENT(I_PRESENT_PRESENT.PRESENT_PRESENT, V_PRESENT_PRESENT.PRESENT_PRESENT, N_REGLE.REGLE): - """ - La classe utilise l'initialiseur de REGLE. Il n'est pas - necessaire d'expliciter son initialiseur car - V_PRESENT_PRESENT.PRESENT_PRESENT n'en a pas - """ + """ + La classe utilise l'initialiseur de REGLE. Il n'est pas + necessaire d'expliciter son initialiseur car + V_PRESENT_PRESENT.PRESENT_PRESENT n'en a pas + """ diff --git a/Accas/A_PROC.py b/Accas/A_PROC.py index 0ae8bb48..a22a170e 100644 --- a/Accas/A_PROC.py +++ b/Accas/A_PROC.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -20,14 +20,13 @@ from __future__ import absolute_import from Noyau import N_PROC from Ihm import I_ENTITE -from Accas import A_PROC_ETAPE +from Accas import A_PROC_ETAPE from Efi2Xsd.AccasXsd import X_PROC class PROC(N_PROC.PROC,X_PROC,I_ENTITE.ENTITE): - class_instance=A_PROC_ETAPE.PROC_ETAPE - def __init__(self,*tup,**args): - #print (tup) - #print (args) - I_ENTITE.ENTITE.__init__(self) - N_PROC.PROC.__init__(self,*tup,**args) - + class_instance=A_PROC_ETAPE.PROC_ETAPE + def __init__(self,*tup,**args): + #print (tup) + #print (args) + I_ENTITE.ENTITE.__init__(self) + N_PROC.PROC.__init__(self,*tup,**args) diff --git a/Accas/A_PROC_ETAPE.py b/Accas/A_PROC_ETAPE.py index 6fdd8361..9f395ee0 100644 --- a/Accas/A_PROC_ETAPE.py +++ b/Accas/A_PROC_ETAPE.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -27,6 +27,6 @@ class PROC_ETAPE(I_PROC_ETAPE.PROC_ETAPE, V_PROC_ETAPE.PROC_ETAPE, X_MCCOMPO, N_PROC_ETAPE.PROC_ETAPE): - def __init__(self,oper=None,args={}): - N_PROC_ETAPE.PROC_ETAPE.__init__(self,oper=oper,args=args) - V_PROC_ETAPE.PROC_ETAPE.__init__(self) + def __init__(self,oper=None,args={}): + N_PROC_ETAPE.PROC_ETAPE.__init__(self,oper=oper,args=args) + V_PROC_ETAPE.PROC_ETAPE.__init__(self) diff --git a/Accas/A_SALOME_ENTRY.py b/Accas/A_SALOME_ENTRY.py index e420831b..e52b4cf9 100644 --- a/Accas/A_SALOME_ENTRY.py +++ b/Accas/A_SALOME_ENTRY.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -23,4 +23,4 @@ #from builtins import object #class SalomeEntry(object): class SalomeEntry: - pass + pass diff --git a/Accas/A_SENSIBILITE.py b/Accas/A_SENSIBILITE.py index 6bf30627..f59759a7 100644 --- a/Accas/A_SENSIBILITE.py +++ b/Accas/A_SENSIBILITE.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -20,9 +20,8 @@ from __future__ import absolute_import from Ihm import I_REGLE -from Noyau import N_SENSIBILITE +from Noyau import N_SENSIBILITE class REUSE_SENSIBLE(I_REGLE.REGLE,N_SENSIBILITE.REUSE_SENSIBLE):pass class CONCEPT_SENSIBLE(I_REGLE.REGLE,N_SENSIBILITE.CONCEPT_SENSIBLE):pass class DERIVABLE(I_REGLE.REGLE,N_SENSIBILITE.DERIVABLE):pass - diff --git a/Accas/A_SIMP.py b/Accas/A_SIMP.py index 584627ed..59c5f444 100644 --- a/Accas/A_SIMP.py +++ b/Accas/A_SIMP.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -24,10 +24,9 @@ from Accas import A_MCSIMP from Efi2Xsd.AccasXsd import X_SIMP class SIMP(N_SIMP.SIMP,X_SIMP,I_ENTITE.ENTITE): - class_instance=A_MCSIMP.MCSIMP - def __init__(self,*tup,**args): - #print tup - #print args - I_ENTITE.ENTITE.__init__(self) - N_SIMP.SIMP.__init__(self,*tup,**args) - + class_instance=A_MCSIMP.MCSIMP + def __init__(self,*tup,**args): + #print tup + #print args + I_ENTITE.ENTITE.__init__(self) + N_SIMP.SIMP.__init__(self,*tup,**args) diff --git a/Accas/A_TUPLE.py b/Accas/A_TUPLE.py index 4cbd14e3..cdc2e7da 100644 --- a/Accas/A_TUPLE.py +++ b/Accas/A_TUPLE.py @@ -1,16 +1,15 @@ import types class Tuple: - def __init__(self,ntuple): - self.ntuple=ntuple + def __init__(self,ntuple): + self.ntuple=ntuple - def __convert__(self,valeur): - try: - if isinstance(valeur, basestring) : return None - except NameError: - if isinstance(valeur, str): return None - if len(valeur) != self.ntuple: return None - return valeur - - def info(self): - return "Tuple de %s elements" % self.ntuple + def __convert__(self,valeur): + try: + if isinstance(valeur, basestring) : return None + except NameError: + if isinstance(valeur, str): return None + if len(valeur) != self.ntuple: return None + return valeur + def info(self): + return "Tuple de %s elements" % self.ntuple diff --git a/Accas/A_UN_PARMI.py b/Accas/A_UN_PARMI.py index 109a3e76..af03b09a 100644 --- a/Accas/A_UN_PARMI.py +++ b/Accas/A_UN_PARMI.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -23,8 +23,8 @@ from Validation import V_UN_PARMI from Ihm import I_UN_PARMI class UN_PARMI(I_UN_PARMI.UN_PARMI,V_UN_PARMI.UN_PARMI,N_REGLE.REGLE): - """ - La classe utilise l'initialiseur de REGLE. Il n'est pas - necessaire d'expliciter son initialiseur car - V_UN_PARMI.UN_PARMI n'en a pas - """ + """ + La classe utilise l'initialiseur de REGLE. Il n'est pas + necessaire d'expliciter son initialiseur car + V_UN_PARMI.UN_PARMI n'en a pas + """ diff --git a/Accas/A_VALIDATOR.py b/Accas/A_VALIDATOR.py index 725a9a7a..e3f227ed 100644 --- a/Accas/A_VALIDATOR.py +++ b/Accas/A_VALIDATOR.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Accas/__init__.py b/Accas/__init__.py index 52682045..ce4722da 100644 --- a/Accas/__init__.py +++ b/Accas/__init__.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2019 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -94,7 +94,7 @@ from .A_VALIDATOR import RangeVal, EnumVal, TypeVal, PairVal from .A_VALIDATOR import CardVal, InstanceVal from .A_VALIDATOR import VerifTypeTuple, VerifExiste from .A_VALIDATOR import FileExtVal, FunctionVal -from .A_VALIDATOR import CreeMotClef +from .A_VALIDATOR import CreeMotClef # On remplace la factory des validateurs initialement dans Noyau par celle # de A_VALIDATOR @@ -107,9 +107,9 @@ from .A_SENSIBILITE import CONCEPT_SENSIBLE, REUSE_SENSIBLE, DERIVABLE from Extensions.niveau import NIVEAU from Extensions.etape_niveau import ETAPE_NIVEAU from Extensions.commentaire import COMMENTAIRE -from Extensions.parametre import PARAMETRE +from Extensions.parametre import PARAMETRE from Extensions.parametre_eval import PARAMETRE_EVAL -from Extensions.commande_comm import COMMANDE_COMM +from Extensions.commande_comm import COMMANDE_COMM from Extensions.mcnuplet import MCNUPLET from .A_SALOME_ENTRY import SalomeEntry diff --git a/Adao/configuration_Adao.py b/Adao/configuration_Adao.py index 735905fb..e757a2d0 100644 --- a/Adao/configuration_Adao.py +++ b/Adao/configuration_Adao.py @@ -38,27 +38,26 @@ from InterfaceQT4 import configuration # et sauvegarder les fichiers utilisateurs class CONFIG(configuration.configBase): - def __init__(self,appli,repIni): - - self.labels_eficas=['lang','rep_cata','catalogues','closeAutreCommande','closeFrameRechercheCommande','closeEntete','taille'] - configuration.configBase.__init__(self,appli,repIni) - - #self.rep_user = os.environ["HOME"] - self.rep_user = os.path.expanduser("~") - self.appli = appli - self.code = appli.code - # self.lang = "fr" - self.rep_ini = repIni - self.rep_mat=" " # Compatbilite Aster - self.savedir = self.rep_user - self.generator_module = "generator_adao" - self.convert_module = "convert_adao" - - # Format des catalogues... - # (code, version, catalogue, formatIn, formatOut) - # Il faut les mettre dans un tuple - #self.catalogues = (("ADAO", "V0", os.path.join(self.rep_ini, 'ADAO_Cata_V0.py'), "adao"),) + def __init__(self,appli,repIni): + + self.labels_eficas=['lang','rep_cata','catalogues','closeAutreCommande','closeFrameRechercheCommande','closeEntete','taille'] + configuration.configBase.__init__(self,appli,repIni) + + #self.rep_user = os.environ["HOME"] + self.rep_user = os.path.expanduser("~") + self.appli = appli + self.code = appli.code + # self.lang = "fr" + self.rep_ini = repIni + self.rep_mat=" " # Compatbilite Aster + self.savedir = self.rep_user + self.generator_module = "generator_adao" + self.convert_module = "convert_adao" + + # Format des catalogues... + # (code, version, catalogue, formatIn, formatOut) + # Il faut les mettre dans un tuple + #self.catalogues = (("ADAO", "V0", os.path.join(self.rep_ini, 'ADAO_Cata_V0.py'), "adao"),) def make_config(appli,rep): return CONFIG(appli,rep) - diff --git a/Adao/monCode_Cata.py b/Adao/monCode_Cata.py index 2f370716..5e4e4292 100644 --- a/Adao/monCode_Cata.py +++ b/Adao/monCode_Cata.py @@ -15,7 +15,7 @@ ASSIMILATION_STUDY = PROC(nom="ASSIMILATION_STUDY", op=None, repetable Study_repertory = SIMP(statut="f", typ = "Repertoire", min=1, max=1), Debug = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0), Algorithm = SIMP(statut="o", typ = "TXM", into=("3DVAR", "Blue", "EnsembleBlue", "KalmanFilter", "LinearLeastSquares", "NonLinearLeastSquares", "ParticleSwarmOptimization", "QuantileRegression", )), - Background = FACT(statut="o", + Background = FACT(statut="o", regles=(UN_PARMI('SCRIPT_DATA_FILE','VECTOR_STRING'),), Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), SCRIPT_DATA_FILE = SIMP(statut = "f", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing the definition of an internal variable of the same name as the parent concept"), diff --git a/Adao/prefs.py b/Adao/prefs.py index 5cbdc263..c235a3e8 100644 --- a/Adao/prefs.py +++ b/Adao/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -code="Adao" +code="Adao" import sys, os if os.path.dirname(os.path.abspath(__file__)) not in sys.path : - sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) + sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/Adao/prefs_Adao.py b/Adao/prefs_Adao.py index 4e758db6..5555f082 100644 --- a/Adao/prefs_Adao.py +++ b/Adao/prefs_Adao.py @@ -33,4 +33,3 @@ closeArbre = True translatorFichier = os.path.join(repIni,'Adao') nombreDeBoutonParLigne=1 #dumpXSD=True - diff --git a/Adao/qtDico.py b/Adao/qtDico.py index 51156caa..09866c03 100755 --- a/Adao/qtDico.py +++ b/Adao/qtDico.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Adao/qtEficas_Adao.py b/Adao/qtEficas_Adao.py index 43605163..9ff2b4c3 100755 --- a/Adao/qtEficas_Adao.py +++ b/Adao/qtEficas_Adao.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Carmel3D/CMakeLists.txt b/Carmel3D/CMakeLists.txt deleted file mode 100644 index 2f241464..00000000 --- a/Carmel3D/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -# CONFIGURATION MANAGEMENT OF EDF VERSION -# ====================================================================== -# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# -# -# ====================================================================== - - -install ( FILES - qtEficas_Carmel3D.py prefs_CARMEL3D.py prefs.py configuration_CARMEL3D.py - Carmel3D_Cata_frequentiel_V0.py opsCarmel.py ajoutGroupe.py - DESTINATION ${CMAKE_INSTALL_PREFIX}/Carmel3D - ) - -add_subdirectory (materiaux) - -### Local Variables: -### mode: cmake -### End: diff --git a/Carmel3D/Carmel3D_Cata_V0.py b/Carmel3D/Carmel3D_Cata_V0.py deleted file mode 100644 index 6fe6de90..00000000 --- a/Carmel3D/Carmel3D_Cata_V0.py +++ /dev/null @@ -1,553 +0,0 @@ -# -*- coding: utf-8 -*- -# -------------------------------------------------- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# -------------------------------------------------- - -import os -import sys -from Accas import * -import types -from decimal import Decimal -# repertoire ou sont stockés le catalogue carmel3d -# et les fichiers de donnees des materiaux de reference -from prefs_CARMEL3D import repIni - -#print "catalogue carmel" -#print "repIni = ", repIni - -# Version du catalogue -VERSION_CATA = "2.3.1 for harmonic problems" -# -------------------------------------------------- -# definition d une classe pour les materiaux -# definition d une classe pour les sources -# definition d une classe pour les groupes de mailles -# -------------------------------------------------- -class material ( ASSD ) : pass -class source ( ASSD ) : pass -class grmaille ( ASSD ) : pass - -#CONTEXT.debug = 1 -# -------------------------------------------------- -# déclaration du jeu de commandes : 1ere instruction du catalogue obligatoire -#--------------------------------------------------- - -JdC = JDC_CATA ( code = 'CARMEL3D', -# execmodul = None, - regles =( - AU_MOINS_UN ('MATERIAL','INCLUDE'), - ENSEMBLE ('SOURCE','MESHGROUP'), - ), - ) # Fin JDC_CATA -##========================================================= -# création d'une macro pour traiter les INCLUDE -# -#---------------------------------------------------------- - -import opsCarmel -INCLUDE = MACRO ( nom = "INCLUDE", - op = None, - UIinfo = { "groupes" : ( "Gestion du travail", ) }, - sd_prod = opsCarmel.INCLUDE, - op_init = opsCarmel.INCLUDE_context, - fichier_ini = 1, - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'comm Files (*.comm);;All Files (*)',), - fr = u"bibliothèque des matériaux", - ang = "material library file", - ), - - ) # Fin MACRO - -# -------------------------------------------------- -# definition de groupe de mailles -# il est associe a un materiau ou a une source -#--------------------------------------------------- - -MESHGROUP = OPER (nom = "MESHGROUP", - op = None, - repetable = 'n', - UIinfo= {"groupes":("Definition",)}, - fr= u"attribution d'un matériau ou d'une source à un groupe du maillage", - ang = "mesh group association to material or source", - sd_prod= grmaille, - regles =( - EXCLUS ('MATERIAL','SOURCE'), - ), - -# ---------------------------------------------------------- -# le mot cle SIMP doit etre facultatif sinon la recuperation -# des groupes de mailles sous SALOME ne fonctionne pas car -# le concept ne peut pas etre nomme car non valide -#----------------------------------------------------------- - MATERIAL = SIMP (statut="f", - typ=(material,), - ang="name of the linked material", - fr =u"nom du matériau associé", - ), - SOURCE = SIMP (statut="f", - typ=(source,), - ang="name of the linked source", - fr =u"nom de la source associée", - ), - ) - - -#====================================================================== -# le fichier .PHYS contient 3 blocs et jusqu'a 3 niveaux de sous-blocs -# -#====================================================================== -# 1er bloc : bloc VERSION -# ce bloc est volontairement cache dans l IHM -#=================================================== - -VERSION = PROC ( nom = "VERSION", - op = None, - repetable = 'n', - UIinfo= {"groupes":("CACHE",)}, - ang= "version block definition", - -#---------------------- -# Liste des parametres -#---------------------- - - NUM = SIMP (statut="o", - typ="I", - defaut=1, - ang="version number of the physical model", - into=( 1,), - ), - FILETYPE = SIMP (statut="o", - typ="TXM", - defaut="PHYS", - ang="file type", - into=( "PHYS",), - ), - -) # Fin PROC VERSION - -#=================================================================== -# 2eme bloc : bloc MATERIALS -#=================================================================== -# definition des matériaux utilisateurs -# a partir des materiaux de reference ou de materiaux generiques -#------------------------------------------------------------------- -# -MATERIAL = OPER (nom = "MATERIAL", - op = None, - repetable = 'n', - ang= "material block definition", - fr= u"définition d'un matériau", - sd_prod= material, - regles=EXCLUS('PERMITTIVITY','CONDUCTIVITY'), - -#--------------------------------------------------------------------- -# liste des matériaux de reference fournis par THEMIS et des -# materiaux generiques (les materiaux generiques peuvent etre utilises -# si aucun materiau de reference ne convient) -#--------------------------------------------------------------------- -# debut commentaire PN pour que le fichier materiaux soit valide -# TYPE = SIMP(statut='o', - MAT_REF = SIMP(statut='f', - typ='TXM', - into=( -# matériaux génériques - "DIELECTRIC", - "CONDUCTOR", - "ZINSULATOR","ZSURFACIC", - "NILMAT","EM_ISOTROPIC","EM_ANISOTROPIC", - ), - ang = "generic materials list", - fr = u"liste des matériaux génériques", - ), - -############################################################################## -# Remarque generale a tous les materiaux : -# pour conserver l'affichage scientifique le nombre derriere l'exposant doit -# etre strictement superieur au nombre de decimales -# - -##---------------------------------------------------------------------------------------------- -# Données de perméabilité, utilisée pour les diélectriques, conducteurs et impédances de surface -#----------------------------------------------------------------------------------------------- - #HAS_PERMEABILITY = BLOC(condition="TYPE in ('DIELECTRIC','CONDUCTOR','ZSURFACIC')", - -#------------------------------------------------ -# sous bloc niveau 2 : PERMEABILITY -#------------------------------------------------ -# - PERMEABILITY = FACT ( statut="f", - ang ="Permeability properties", - fr =u"propriétés de perméabilité du matériau", - HOMOGENEOUS = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is homogeneous or not", - fr = u"le matériau est homogène ou non", - ), - ISOTROPIC = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is isotropic or not", - fr = u"le matériau est isotrope ou non", - ), - HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", - TYPE_LAW = SIMP (statut="o", - typ="TXM", - defaut="LINEAR_REAL", - into = ("LINEAR_REAL","NONLINEAR"), - ang = "harmonic or time-domain linear or nonlinear law only for homogeneous and isotropic materials", - fr = u"loi linéaire (fréquentielle ou temporelle) ou non (homogène et isotrope seulement)", - ), - VALUE = SIMP (statut="o", - typ="C", - defaut=('RI',1,0), - ang = "Relative linear permeability value, also used at first nonlinear iteration", - fr = u"Valeur de la perméabilité relative à l'air utilisée pour une loi linéaire ou pour la première itération non-linéaire", - ), - NONLINEAR_LAW_PROPERTIES = BLOC (condition="LAW=='NONLINEAR'", - NATURE = SIMP (statut="o", - typ="TXM", - defaut="MARROCCO", - into = ("SPLINE","MARROCCO","MARROCCO+SATURATION"), - ang = "nature law", - fr = u"nature de la loi", - ), - SPLINE_LAW_PROPERTIES = BLOC (condition="NATURE=='SPLINE'", - FILENAME = SIMP (statut="o", - typ=("FichierNoAbs",'All Files (*)',), # l'existence du fichier n'est pas vérifiée - ang="data file name", - fr =u"nom du fichier contenant les mesures expérimentales B(H)", - ), - ), # Fin BLOC SPLINE_PROPERTIES - MARROCCO_LAW_PROPERTIES = BLOC (condition="NATURE in ('MARROCCO','MARROCCO+SATURATION')", - ALPHA = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="alpha parameter", - fr =u"paramètre alpha de la loi de Marrocco" , - ), - TAU = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="tau parameter", - fr =u"paramètre tau de la loi de Marrocco" , - ), - C = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="c parameter", - fr =u"paramètre c de la loi de Marrocco" , - ), - EPSILON = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="epsilon parameter", - fr =u"paramètre epsilon de la loi de Marrocco" , - ), - ), # Fin BLOC MARROCCO_LAW_PROPERTIES - SATURATION_LAW_PROPERTIES = BLOC (condition="NATURE=='MARROCCO+SATURATION'", - BMAX = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="intersection B", - fr = u"valeur de B marquant la fin de la loi de Marrocco et le début du raccord à la loi de saturation", - ), - HSAT = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="H value", - fr = u"valeur de H définissant la loi de saturation", - ), - BSAT = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="B value", - fr = u"valeur de B définissant la loi de saturation", - ), - JOIN = SIMP (statut="o", - typ="TXM", - defaut="SPLINE", - into= ("SPLINE","PARABOLIC","LINEAR"), - ang="type of join between laws", - fr =u"type de raccord entre la loi choisie et la loi de saturation" , - ), - ), # Fin BLOC SATURATION_LAW_PROPERTIES - APPLIEDTO = SIMP (statut="o", - typ="TXM", - into=("B(H)&H(B)","B(H)","H(B)"), - defaut="B(H)&H(B)", - ang="join applied to", - fr =u"Le raccord tel que défini est appliqué à la courbe B(H) seulement, à la courbe H(B) seulement ou aux deux courbes à la fois. Dans les deux premiers cas, le raccord de la courbe H(B) est inversé numériquement à partir du raccord défini pour la courbe B(H), et vice-versa.", - ), - ), # Fin BLOC NONLINEAR_LAW_PROPERTIES - ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES - ), # fin FACT PERMEABILITY - #), # Fin BLOC HAS_PERMEABILITY - -##------------------------------------------------------------------ -# Données de permittivité, utilisée pour les diélectriques seulement -#------------------------------------------------------------------- - #HAS_PERMITTIVITY = BLOC(condition="TYPE == 'DIELECTRIC'", - -#------------------------------------------------ -# sous bloc niveau 2 : PERMITTIVITY -#------------------------------------------------ - PERMITTIVITY = FACT ( statut="f", - ang ="Permittivity properties", - fr = u"propriétés de permittivité du matériau", - HOMOGENEOUS = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is homogeneous or not", - fr = u"le matériau est homogène ou non", - ), - ISOTROPIC = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is isotropic or not", - fr = u"le matériau est isotrope ou non", - ), - HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", - LAW = SIMP (statut="o", - typ="TXM", - defaut="LINEAR", - into = ("LINEAR",), - ang = "linear law", - fr = u"loi linéaire", - ), - VALUE = SIMP (statut="o", - typ="C", - defaut=('RI',1,0), - ang = "enter a complex relative value", - fr = u"saisir une valeur complexe relative", - ), - ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES - ), # fin FACT PERMITTIVITY - - #), # Fin BLOC HAS_PERMITTIVITY - -##---------------------------------------------------------------------------------------------- -# Données de conductivité, utilisée pour les conducteurs et impédances de surface -#----------------------------------------------------------------------------------------------- - #HAS_CONDUCTIVITY = BLOC(condition="TYPE in ('CONDUCTOR','ZSURFACIC')", -#------------------------------------------------ -# sous bloc niveau 2 : CONDUCTIVITY -#------------------------------------------------ - CONDUCTIVITY = FACT ( statut="f", - ang ="Permittivity properties", - fr = u"propriétés de permittivité du matériau", - HOMOGENEOUS = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is homogeneous or not", - fr = u"le matériau est homogène ou non", - ), - ISOTROPIC = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is isotropic or not", - fr = u"le matériau est isotrope ou non", - ), - HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", - LAW = SIMP (statut="o", - typ="TXM", - defaut="LINEAR", - into = ("LINEAR",), - ang = "linear law", - fr = u"loi linéaire", - ), - VALUE = SIMP (statut="o", - typ="C", - defaut=('RI',1,0), - ang = "enter a complex relative value", - fr = u"saisir une valeur complexe relative", - ), - ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES - ), # fin FACT CONDUCTIVITY - - #), # Fin BLOC HAS_CONDUCTICITY - -################################################################################################### -#--------------------------------------------- -# sous bloc niveau 1 -#--------------------------------------- -# matériau generique de type ZINSULATOR -#--------------------------------------- - -# aucun parametre a saisir pour ce materiau - - -################################################################################################### -#--------------------------------------------- -# sous bloc niveau 1 -#--------------------------------------------- -# matériau generique de type NILMAT (fictif) -#--------------------------------------------- - -# aucun parametre a saisir pour ce materiau - - -################################################################################################### -#---------------------------------------------------------- -# sous bloc niveau 1 : EM_ISOTROPIC_FILES -#------------------------------------------------- -# matériau isotropique non homogene generique -#------------------------------------------------- - EM_ISOTROPIC_properties=BLOC(condition="TYPE=='EM_ISOTROPIC'", - - CONDUCTIVITY_File = SIMP (statut="o", - typ=("FichierNoAbs",'MED Files (*.med)',), - ang="CONDUCTIVITY MED data file name", - fr = u"nom du fichier MED CONDUCTIVITY", - ), - PERMEABILITY_File = SIMP (statut="o", - typ=("FichierNoAbs",'MED Files (*.med)',), - ang="PERMEABILITY MED data file name", - fr = u"nom du fichier MED PERMEABILITY", - ), - ), # fin bloc EM_ISOTROPIC_properties - - -#--------------------------------------------------- -# matériau anisotropique non homogene generique -#--------------------------------------------------- - EM_ANISOTROPIC_properties=BLOC(condition="TYPE=='EM_ANISOTROPIC'", - - PERMEABILITY_File = SIMP (statut="o", - #typ=("Fichier",'.mater Files (*.mater)'), # le fichier doit exister dans le répertoire d'où on lancer Eficas si le fichier est défini par un nom relatif, ce qui est trop contraignant - #typ=("Fichier",'.mater Files (*.mater)','Sauvegarde'), # Le fichier peut ne pas exister, mais on propose de le sauvegarder et d'écraser un fichier existant : pas approprié - typ=("FichierNoAbs",'.mater Files (*.mater)'), # l'existence du fichier n'est pas vérifiée, mais on peut le sélectionner quand même via la navigateur. C'est suffisant et permet une bibliothèque de matériaux. - ang="PERMEABILITY .mater data file name", - fr ="nom du fichier .mater PERMEABILITY", - ), - CONDUCTIVITY_File = SIMP (statut="o", - typ=("FichierNoAbs",'.mater Files (*.mater)'), - ang="CONDUCTIVITY .mater data file name", - fr ="nom du fichier .mater CONDUCTIVITY", - ), - ), # fin bloc EM_ANISOTROPIC_properties - - -) # fin OPER MATERIAL - -#=================================================================== -# 3eme bloc : bloc SOURCES -#==================================================================== -# definition des differentes sources qui seront dans le bloc SOURCES -#------------------------------------------------------------------- -# - -SOURCE = OPER ( nom = "SOURCE", - op = None, - repetable = 'n', - ang = "source definition", - fr = u"définition d'une source", - sd_prod = source, - regles = (UN_PARMI('STRANDED_INDUCTOR','HPORT','EPORT'), # choix d'un type de source - UN_PARMI('WAVEFORM_CONSTANT','WAVEFORM_SINUS'), # choix d'une forme de source - ), - -#---------------------------------------------------------- -# sous bloc niveau 1 : stranded inductor source -##--------------------------------------------------------- - STRANDED_INDUCTOR = FACT(statut='f', - ang="Stranded inductor source", - fr=u"source de type inducteur bobiné", - NTURNS = SIMP (statut="o", - typ="I", - defaut=1, - ang="number of turns in the inductor", - fr= u"nombre de tours dans l'inducteur bobiné", - ), - TYPE = SIMP (statut="o", - typ="TXM", - defaut="CURRENT", - into=("CURRENT",), - fr= u"source de type courant", - ang="current source type", - ), - ), # FIN de FACT STRANDED_INDUCTOR - HPORT = FACT(statut='f', - ang="Magnetic port source", - fr=u"source de type port magnétique", - TYPE = SIMP (statut="o", - typ="TXM", - into=("VOLTAGE","CURRENT"), - fr= u"source de type tension ou courant", - ang="voltage or current source type", - ), - ), # FIN de FACT HPORT - EPORT = FACT(statut='f', - ang="Electric port source", - fr=u"source de type port électrique", - TYPE = SIMP (statut="o", - typ="TXM", - into=("VOLTAGE","CURRENT"), - fr= u"source de type tension ou courant", - ang="voltage or current source type", - ), - ), # FIN de FACT EPORT - WAVEFORM_CONSTANT = FACT(statut='f', - ang="constant source", - fr=u"source constante", - AMPLITUDE = SIMP (statut="o", - typ="R", - defaut=1, - ang = "enter the source magnitude value, in A or V units", - fr = u"saisir la valeur de l'amplitude de la source, en unités A ou V", - ), - ), # FIN de FACT WAVEFORM_CONSTANT - WAVEFORM_SINUS = FACT(statut='f', - ang="sinus variation source", - fr=u"source variant avec une forme sinusoïdale, définie par son amplitude, sa fréquence et sa phase", - AMPLITUDE = SIMP (statut="o", - typ="R", - defaut=1, - ang = "enter the source magnitude value, in A or V units", - fr = u"saisir la valeur de l'amplitude de la source, en unités A ou V", - ), - FREQUENCY = SIMP (statut="o", - typ="R", - defaut=50.0, - ang = "enter the source frequency value, in Hz units", - fr = u"saisir la valeur de la fréquence de la source, en Hz", - ), - PHASE = SIMP (statut="o", - typ="R", - defaut=0.0, - ang = "enter the source phase value, in degrees units", - fr = u"saisir la valeur de la phase de la source, en degrés", - ), - ), # FIN de FACT WAVEFORM_SINUS -) # Fin OPER SOURCE diff --git a/Carmel3D/Carmel3D_Cata_frequentiel_V0.py b/Carmel3D/Carmel3D_Cata_frequentiel_V0.py deleted file mode 100755 index a90c5626..00000000 --- a/Carmel3D/Carmel3D_Cata_frequentiel_V0.py +++ /dev/null @@ -1,552 +0,0 @@ -# -*- coding: utf-8 -*- -# -------------------------------------------------- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# -------------------------------------------------- - -import os -import sys -from Accas import * -import types -from decimal import Decimal -# repertoire ou sont stockés le catalogue carmel3d -# et les fichiers de donnees des materiaux de reference -from prefs_CARMEL3D import repIni - -#print "catalogue carmel" -#print "repIni = ", repIni - -# Version du catalogue -VERSION_CATA = "2.3.1 for harmonic problems" -# -------------------------------------------------- -# definition d une classe pour les materiaux -# definition d une classe pour les sources -# definition d une classe pour les groupes de mailles -# -------------------------------------------------- -class material ( ASSD ) : pass -class source ( ASSD ) : pass -class grmaille ( ASSD ) : pass - -#CONTEXT.debug = 1 -# -------------------------------------------------- -# déclaration du jeu de commandes : 1ere instruction du catalogue obligatoire -#--------------------------------------------------- - -##========================================================= -JdC = JDC_CATA ( code = 'CARMEL3D', -# execmodul = None, - regles =( - AU_MOINS_UN ('MATERIAL','INCLUDE'), - AU_MOINS_UN ('SOURCE','INCLUDE'), - AU_MOINS_UN ('MESHGROUP'), - ), - ) # Fin JDC_CATA -##========================================================= -# création d'une macro pour traiter les INCLUDE -# -#---------------------------------------------------------- - -import opsCarmel -INCLUDE = MACRO ( nom = "INCLUDE", - op = None, - UIinfo = { "groupes" : ( "Gestion du travail", ) }, - sd_prod = opsCarmel.INCLUDE, - op_init = opsCarmel.INCLUDE_context, - fichier_ini = 1, - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'comm Files (*.comm);;All Files (*)',), - fr = u"bibliothèque des matériaux", - ang = "material library file", - ), - - ) # Fin MACRO -# -------------------------------------------------- -# definition de groupe de mailles -# il est associe a un materiau ou a une source -#--------------------------------------------------- - -MESHGROUP = OPER (nom = "MESHGROUP", - op = None, - repetable = 'n', - UIinfo= {"groupes":("Definition",)}, - fr= u"attribution d'un matériau ou d'une source à un groupe du maillage", - ang = "mesh group association to material or source", - sd_prod= grmaille, - regles =( - EXCLUS ('MATERIAL','SOURCE'), - ), - -# ---------------------------------------------------------- -# le mot cle SIMP doit etre facultatif sinon la recuperation -# des groupes de mailles sous SALOME ne fonctionne pas car -# le concept ne peut pas etre nomme car non valide -#----------------------------------------------------------- - MATERIAL = SIMP (statut="f", - typ=(material,), - ang="name of the linked material", - fr =u"nom du matériau associé", - ), - SOURCE = SIMP (statut="f", - typ=(source,), - ang="name of the linked source", - fr =u"nom de la source associée", - ), - ) - - -#====================================================================== -# le fichier .PHYS contient 3 blocs et jusqu'a 3 niveaux de sous-blocs -# -#====================================================================== -# 1er bloc : bloc VERSION -# ce bloc est volontairement cache dans l IHM -#=================================================== - -VERSION = PROC ( nom = "VERSION", - op = None, - repetable = 'n', - UIinfo= {"groupes":("CACHE",)}, - ang= "version block definition", - -#---------------------- -# Liste des parametres -#---------------------- - - NUM = SIMP (statut="o", - typ="I", - defaut=1, - ang="version number of the physical model", - into=( 1,), - ), - FILETYPE = SIMP (statut="o", - typ="TXM", - defaut="PHYS", - ang="file type", - into=( "PHYS",), - ), - -) # Fin PROC VERSION - -#=================================================================== -# 2eme bloc : bloc MATERIALS -#=================================================================== -# definition des matériaux utilisateurs -# a partir des materiaux de reference ou de materiaux generiques -#------------------------------------------------------------------- -# -MATERIAL = OPER (nom = "MATERIAL", - op = None, - repetable = 'n', - ang= "material block definition", - fr= u"définition d'un matériau", - sd_prod= material, - regles=EXCLUS('PERMITTIVITY','CONDUCTIVITY'), - -#--------------------------------------------------------------------- -# liste des matériaux de reference fournis par THEMIS et des -# materiaux generiques (les materiaux generiques peuvent etre utilises -# si aucun materiau de reference ne convient) -#--------------------------------------------------------------------- - TYPE = SIMP(statut='o', - typ='TXM', - into=( -# matériaux génériques - "DIELECTRIC", - "CONDUCTOR", - "ZINSULATOR","ZSURFACIC", - "NILMAT","EM_ISOTROPIC","EM_ANISOTROPIC", - ), - ang = "generic materials list", - fr = u"liste des matériaux génériques", - ), - -############################################################################## -# Remarque generale a tous les materiaux : -# pour conserver l'affichage scientifique le nombre derriere l'exposant doit -# etre strictement superieur au nombre de decimales -# - -##---------------------------------------------------------------------------------------------- -# Données de perméabilité, utilisée pour les diélectriques, conducteurs et impédances de surface -#----------------------------------------------------------------------------------------------- - #HAS_PERMEABILITY = BLOC(condition="TYPE in ('DIELECTRIC','CONDUCTOR','ZSURFACIC')", - -#------------------------------------------------ -# sous bloc niveau 2 : PERMEABILITY -#------------------------------------------------ -# - PERMEABILITY = FACT ( statut="f", - ang ="Permeability properties", - fr =u"propriétés de perméabilité du matériau", - HOMOGENEOUS = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is homogeneous or not", - fr = u"le matériau est homogène ou non", - ), - ISOTROPIC = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is isotropic or not", - fr = u"le matériau est isotrope ou non", - ), - HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", - LAW = SIMP (statut="o", - typ="TXM", - defaut="LINEAR", - into = ("LINEAR","NONLINEAR"), - ang = "harmonic or time-domain linear or nonlinear law only for homogeneous and isotropic materials", - fr = u"loi linéaire (fréquentielle ou temporelle) ou non (homogène et isotrope seulement)", - ), - VALUE = SIMP (statut="o", - typ="C", - defaut=('RI',1,0), - ang = "Relative linear permeability value, also used at first nonlinear iteration", - fr = u"Valeur de la perméabilité relative à l'air utilisée pour une loi linéaire ou pour la première itération non-linéaire", - ), - NONLINEAR_LAW_PROPERTIES = BLOC (condition="LAW=='NONLINEAR'", - NATURE = SIMP (statut="o", - typ="TXM", - defaut="MARROCCO", - into = ("SPLINE","MARROCCO","MARROCCO+SATURATION"), - ang = "nature law", - fr = u"nature de la loi", - ), - SPLINE_LAW_PROPERTIES = BLOC (condition="NATURE=='SPLINE'", - FILENAME = SIMP (statut="o", - typ=("FichierNoAbs",'All Files (*)',), # l'existence du fichier n'est pas vérifiée - ang="data file name", - fr =u"nom du fichier contenant les mesures expérimentales B(H)", - ), - ), # Fin BLOC SPLINE_PROPERTIES - MARROCCO_LAW_PROPERTIES = BLOC (condition="NATURE in ('MARROCCO','MARROCCO+SATURATION')", - ALPHA = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="alpha parameter", - fr =u"paramètre alpha de la loi de Marrocco" , - ), - TAU = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="tau parameter", - fr =u"paramètre tau de la loi de Marrocco" , - ), - C = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="c parameter", - fr =u"paramètre c de la loi de Marrocco" , - ), - EPSILON = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="epsilon parameter", - fr =u"paramètre epsilon de la loi de Marrocco" , - ), - ), # Fin BLOC MARROCCO_LAW_PROPERTIES - SATURATION_LAW_PROPERTIES = BLOC (condition="NATURE=='MARROCCO+SATURATION'", - BMAX = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="intersection B", - fr = u"valeur de B marquant la fin de la loi de Marrocco et le début du raccord à la loi de saturation", - ), - HSAT = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="H value", - fr = u"valeur de H définissant la loi de saturation", - ), - BSAT = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="B value", - fr = u"valeur de B définissant la loi de saturation", - ), - JOIN = SIMP (statut="o", - typ="TXM", - defaut="SPLINE", - into= ("SPLINE","PARABOLIC","LINEAR"), - ang="type of join between laws", - fr =u"type de raccord entre la loi choisie et la loi de saturation" , - ), - ), # Fin BLOC SATURATION_LAW_PROPERTIES - APPLIEDTO = SIMP (statut="o", - typ="TXM", - into=("B(H)&H(B)","B(H)","H(B)"), - defaut="B(H)&H(B)", - ang="join applied to", - fr =u"Le raccord tel que défini est appliqué à la courbe B(H) seulement, à la courbe H(B) seulement ou aux deux courbes à la fois. Dans les deux premiers cas, le raccord de la courbe H(B) est inversé numériquement à partir du raccord défini pour la courbe B(H), et vice-versa.", - ), - ), # Fin BLOC NONLINEAR_LAW_PROPERTIES - ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES - ), # fin FACT PERMEABILITY - #), # Fin BLOC HAS_PERMEABILITY - -##------------------------------------------------------------------ -# Données de permittivité, utilisée pour les diélectriques seulement -#------------------------------------------------------------------- - #HAS_PERMITTIVITY = BLOC(condition="TYPE == 'DIELECTRIC'", - -#------------------------------------------------ -# sous bloc niveau 2 : PERMITTIVITY -#------------------------------------------------ - PERMITTIVITY = FACT ( statut="f", - ang ="Permittivity properties", - fr = u"propriétés de permittivité du matériau", - HOMOGENEOUS = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is homogeneous or not", - fr = u"le matériau est homogène ou non", - ), - ISOTROPIC = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is isotropic or not", - fr = u"le matériau est isotrope ou non", - ), - HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", - LAW = SIMP (statut="o", - typ="TXM", - defaut="LINEAR", - into = ("LINEAR",), - ang = "linear law", - fr = u"loi linéaire", - ), - VALUE = SIMP (statut="o", - typ="C", - defaut=('RI',1,0), - ang = "enter a complex relative value", - fr = u"saisir une valeur complexe relative", - ), - ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES - ), # fin FACT PERMITTIVITY - - #), # Fin BLOC HAS_PERMITTIVITY - -##---------------------------------------------------------------------------------------------- -# Données de conductivité, utilisée pour les conducteurs et impédances de surface -#----------------------------------------------------------------------------------------------- - #HAS_CONDUCTIVITY = BLOC(condition="TYPE in ('CONDUCTOR','ZSURFACIC')", -#------------------------------------------------ -# sous bloc niveau 2 : CONDUCTIVITY -#------------------------------------------------ - CONDUCTIVITY = FACT ( statut="f", - ang ="Permittivity properties", - fr = u"propriétés de permittivité du matériau", - HOMOGENEOUS = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is homogeneous or not", - fr = u"le matériau est homogène ou non", - ), - ISOTROPIC = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is isotropic or not", - fr = u"le matériau est isotrope ou non", - ), - HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", - LAW = SIMP (statut="o", - typ="TXM", - defaut="LINEAR", - into = ("LINEAR",), - ang = "linear law", - fr = u"loi linéaire", - ), - VALUE = SIMP (statut="o", - typ="C", - defaut=('RI',1,0), - ang = "enter a complex relative value", - fr = u"saisir une valeur complexe relative", - ), - ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES - ), # fin FACT CONDUCTIVITY - - #), # Fin BLOC HAS_CONDUCTICITY - -################################################################################################### -#--------------------------------------------- -# sous bloc niveau 1 -#--------------------------------------- -# matériau generique de type ZINSULATOR -#--------------------------------------- - -# aucun parametre a saisir pour ce materiau - - -################################################################################################### -#--------------------------------------------- -# sous bloc niveau 1 -#--------------------------------------------- -# matériau generique de type NILMAT (fictif) -#--------------------------------------------- - -# aucun parametre a saisir pour ce materiau - - -################################################################################################### -#---------------------------------------------------------- -# sous bloc niveau 1 : EM_ISOTROPIC_FILES -#------------------------------------------------- -# matériau isotropique non homogene generique -#------------------------------------------------- - EM_ISOTROPIC_properties=BLOC(condition="TYPE=='EM_ISOTROPIC'", - - CONDUCTIVITY_File = SIMP (statut="o", - typ=("FichierNoAbs",'MED Files (*.med)',), - ang="CONDUCTIVITY MED data file name", - fr = u"nom du fichier MED CONDUCTIVITY", - ), - PERMEABILITY_File = SIMP (statut="o", - typ=("FichierNoAbs",'MED Files (*.med)',), - ang="PERMEABILITY MED data file name", - fr = u"nom du fichier MED PERMEABILITY", - ), - ), # fin bloc EM_ISOTROPIC_properties - - -#--------------------------------------------------- -# matériau anisotropique non homogene generique -#--------------------------------------------------- - EM_ANISOTROPIC_properties=BLOC(condition="TYPE=='EM_ANISOTROPIC'", - - PERMEABILITY_File = SIMP (statut="o", - #typ=("Fichier",'.mater Files (*.mater)'), # le fichier doit exister dans le répertoire d'où on lancer Eficas si le fichier est défini par un nom relatif, ce qui est trop contraignant - #typ=("Fichier",'.mater Files (*.mater)','Sauvegarde'), # Le fichier peut ne pas exister, mais on propose de le sauvegarder et d'écraser un fichier existant : pas approprié - typ=("FichierNoAbs",'.mater Files (*.mater)'), # l'existence du fichier n'est pas vérifiée, mais on peut le sélectionner quand même via la navigateur. C'est suffisant et permet une bibliothèque de matériaux. - ang="PERMEABILITY .mater data file name", - fr ="nom du fichier .mater PERMEABILITY", - ), - CONDUCTIVITY_File = SIMP (statut="o", - typ=("FichierNoAbs",'.mater Files (*.mater)'), - ang="CONDUCTIVITY .mater data file name", - fr ="nom du fichier .mater CONDUCTIVITY", - ), - ), # fin bloc EM_ANISOTROPIC_properties - - -) # fin OPER MATERIAL - -#=================================================================== -# 3eme bloc : bloc SOURCES -#==================================================================== -# definition des differentes sources qui seront dans le bloc SOURCES -#------------------------------------------------------------------- -# - -SOURCE = OPER ( nom = "SOURCE", - op = None, - repetable = 'n', - ang = "source definition", - fr = u"définition d'une source", - sd_prod = source, - regles = (UN_PARMI('STRANDED_INDUCTOR','HPORT','EPORT'), # choix d'un type de source - UN_PARMI('WAVEFORM_CONSTANT','WAVEFORM_SINUS'), # choix d'une forme de source - ), - -#---------------------------------------------------------- -# sous bloc niveau 1 : stranded inductor source -##--------------------------------------------------------- - STRANDED_INDUCTOR = FACT(statut='f', - ang="Stranded inductor source", - fr=u"source de type inducteur bobiné", - NTURNS = SIMP (statut="o", - typ="I", - defaut=1, - ang="number of turns in the inductor", - fr= u"nombre de tours dans l'inducteur bobiné", - ), - TYPE = SIMP (statut="o", - typ="TXM", - defaut="CURRENT", - into=("CURRENT",), - fr= u"source de type courant", - ang="current source type", - ), - ), # FIN de FACT STRANDED_INDUCTOR - HPORT = FACT(statut='f', - ang="Magnetic port source", - fr=u"source de type port magnétique", - TYPE = SIMP (statut="o", - typ="TXM", - into=("VOLTAGE","CURRENT"), - fr= u"source de type tension ou courant", - ang="voltage or current source type", - ), - ), # FIN de FACT HPORT - EPORT = FACT(statut='f', - ang="Electric port source", - fr=u"source de type port électrique", - TYPE = SIMP (statut="o", - typ="TXM", - into=("VOLTAGE","CURRENT"), - fr= u"source de type tension ou courant", - ang="voltage or current source type", - ), - ), # FIN de FACT EPORT - WAVEFORM_CONSTANT = FACT(statut='f', - ang="constant source", - fr=u"source constante", - AMPLITUDE = SIMP (statut="o", - typ="R", - defaut=1, - ang = "enter the source magnitude value, in A or V units", - fr = u"saisir la valeur de l'amplitude de la source, en unités A ou V", - ), - ), # FIN de FACT WAVEFORM_CONSTANT - WAVEFORM_SINUS = FACT(statut='f', - ang="sinus variation source", - fr=u"source variant avec une forme sinusoïdale, définie par son amplitude, sa fréquence et sa phase", - AMPLITUDE = SIMP (statut="o", - typ="R", - defaut=1, - ang = "enter the source magnitude value, in A or V units", - fr = u"saisir la valeur de l'amplitude de la source, en unités A ou V", - ), - FREQUENCY = SIMP (statut="o", - typ="R", - defaut=50.0, - ang = "enter the source frequency value, in Hz units", - fr = u"saisir la valeur de la fréquence de la source, en Hz", - ), - PHASE = SIMP (statut="o", - typ="R", - defaut=0.0, - ang = "enter the source phase value, in degrees units", - fr = u"saisir la valeur de la phase de la source, en degrés", - ), - ), # FIN de FACT WAVEFORM_SINUS -) # Fin OPER SOURCE diff --git a/Carmel3D/Carmel3D_Cata_frequentiel_V1.py b/Carmel3D/Carmel3D_Cata_frequentiel_V1.py deleted file mode 100644 index b70bb964..00000000 --- a/Carmel3D/Carmel3D_Cata_frequentiel_V1.py +++ /dev/null @@ -1,903 +0,0 @@ -# -*- coding: utf-8 -*- -# -------------------------------------------------- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# -------------------------------------------------- - -import os -import sys -from Accas import * -import types -from decimal import Decimal -# repertoire ou sont stockés le catalogue carmel3d -# et les fichiers de donnees des materiaux de reference -from prefs_CARMEL3D import repIni - -class Tuple: - def __init__(self,ntuple): - self.ntuple=ntuple - - def __convert__(self,valeur): - if type(valeur) == types.StringType: - return None - if len(valeur) != self.ntuple: - return None - return valeur - - def info(self): - return "Tuple de %s elements" % self.ntuple - - - -#print "catalogue carmel" -#print "repIni = ", repIni - -# Version du catalogue -VERSION_CATA = "Code_Carmel3D 2.4.0 for harmonic problems" -# -------------------------------------------------- -# definition d une classe pour les materiaux -# definition d une classe pour les sources -# definition d une classe pour les groupes de mailles -# -------------------------------------------------- -class material ( ASSD ) : pass -class source ( ASSD ) : pass -class grmaille ( ASSD ) : pass -class stranded_inductor_geometry ( ASSD ) : pass -class macro_groupe ( ASSD ) : pass - -#CONTEXT.debug = 1 -# -------------------------------------------------- -# déclaration du jeu de commandes : 1ere instruction du catalogue obligatoire -#--------------------------------------------------- - -##========================================================= -JdC = JDC_CATA ( code = 'CARMEL3D', - execmodul = None, - regles =( - AU_MOINS_UN ('PARAMETERS'), - AU_PLUS_UN ('PARAMETERS'), - AU_MOINS_UN ('SOLVEUR'), - AU_PLUS_UN ('SOLVEUR'), - AU_MOINS_UN ('POST_COMMANDS'), - AU_PLUS_UN ('POST_COMMANDS'), - AU_MOINS_UN ('MATERIAL','INCLUDE'), - AU_MOINS_UN ('SOURCE','INCLUDE'), - AU_MOINS_UN ('MESHGROUP'), - ), - ) # Fin JDC_CATA - -import opsCarmel - -#====================================================================== -# 1er bloc : bloc VERSION -# ce bloc est volontairement cache dans l IHM -#=================================================== - -VERSION = PROC ( nom = "VERSION", - op = None, - repetable = 'n', - UIinfo= {"groupes":("CACHE",)}, - ang= "version block definition", - -#---------------------- -# Liste des parametres -#---------------------- - - NUM = SIMP (statut="o", - typ="I", - defaut=1, - ang="version number of the physical model", - into=( 1,), - ), - FILETYPE = SIMP (statut="o", - typ="TXM", - defaut="PHYS", - ang="file type", - into=( "PHYS",), - ), - -) # Fin PROC VERSION - -PARAMETERS= PROC ( nom = "PARAMETERS", - op = None, - repetable = 'n', - UIinfo = { "groupes" : ( "1) Parametres", ) }, - ang= "General parameters for this study", - fr= u"Paramètres généraux de l'étude", -#---------------------- -# Liste des parametres -#---------------------- - RepCarmel=SIMP(typ='Repertoire', statut='o', - ang= "Code_Carmel3D executables directory", - fr= u"Répertoire contenant les programmes de Code_Carmel3D", - ), - Fichier_maillage = SIMP (statut="o", typ=("FichierNoAbs",'All Files (*)',), # l'existence du fichier n'est pas vérifiée - ang="Mesh file path (relative, aka file name, or absolute path).", - fr =u"Emplacement du fichier contenant le maillage (relatif, i.e., nom du fichier, ou absolu, i.e., chemin complet).", - ), - - Echelle_du_maillage = SIMP (statut='o', typ="TXM", defaut= "Millimetre", into = ("Metre", "Millimetre"), - ang="Mesh geometry units.", - fr =u"Unités géométriques du maillage.", - ), - - Formulation=SIMP(statut='o', typ='TXM', into=("TOMEGA","APHI"), - ang="Problem formulation.", - fr =u"Formulation du problème.", - ), - - FREQUENCY = SIMP (statut="o", - typ="R", - defaut=50.0, - ang = "enter the source frequency value, in Hz units", - fr = u"saisir la valeur de la fréquence de la source, en Hz", - val_min=0.0, - ), - - Realiser_topologie_gendof = SIMP (statut='o', typ="TXM", defaut="TRUE", into=("TRUE", "FALSE"), - ang="Build topology (.car file) using gendof.exe.", - fr =u"Construction de la topologie (fichier .car) en éxécutant gendof.exe.", - ), - Resoudre_probleme = SIMP (statut='o', typ="TXM", defaut="TRUE", into=("TRUE", "FALSE"), - ang="Solve the problem using fcarmel.exe.", - fr =u"Résolution du problème en éxécutant fcarmel.exe.", - ), - - Realiser_post_traitement_aposteriori = SIMP (statut='o', typ="TXM", defaut="TRUE", into=("TRUE", "FALSE"), - ang="Make post-processing using postprocess.exe.", - fr =u"Réalisation du post-traitement en éxécutant postprocess.exe.", - ), -) # Fin PROC PARAMETERS - -SOLVEUR = PROC ( nom ="SOLVEUR", - op=None, - repetable = 'n', - UIinfo= {"groupes":("1) Parametres",)}, - ang= "Solver parameters for this study", - fr= u"Paramètres liés au solveur de l'étude", - - Type= SIMP (statut="o", - typ="TXM", - into=("Solveur_lineaire"), - defaut='Solveur_lineaire', - ang="Linear solver only for harmonic problems.", - fr =u"Solveur linéaire seulement pour les problèmes fréquentiels.", - ), - - Solveur_lineaire=BLOC(condition="Type=='Solveur_lineaire'", - ang="This block contains whole linear solver properties.", - fr =u"Ce bloc contient toutes les propriétés du solveur linéaire.", - Methode_lineaire=SIMP(statut='o', typ='TXM', into=("Methode iterative BICGCR", "Methode directe MUMPS"), - ang="Algorithm used for this linear solver.", - fr =u"Méthode (algorithme) utilisée par ce solveur linéaire.", - ), - - Parametres_methode_iterative_BICGCR=BLOC(condition="Methode_lineaire=='Methode iterative BICGCR'", - ang="This block contains whole BICGCR algorithm properties used for the linear solver.", - fr =u"Ce bloc contient toutes les propriétés de la méthode BICGCR utilisée par le solveur linéaire.", - Precision=SIMP(statut='o', typ='R', defaut=1e-9, - ang="Accuracy on linear computations.", - fr =u"Précision du calcul linéaire.", - ), - Nombre_iterations_max=SIMP(statut='o', typ='I',defaut=10000, - ang="Maximal number of iterations.", - fr =u"Nombre maximal d'itérations.", - ), - Preconditionneur=SIMP(statut='f', typ='TXM', into=("Jacobi"), defaut='Jacobi', - ang="Preconditioner choice. Jacobi only.", - fr =u"Choix du préconditioneur. Jacobi disponible seulement.", - ), - ), - - Parametres_methode_directe_MUMPS=BLOC(condition="Methode_lineaire=='Methode directe MUMPS'", - ang="This block contains whole MUMPS properties used for the linear solver.", - fr =u"Ce bloc contient toutes les propriétés de la méthode MUMPS utilisée par le solveur linéaire.", - Type_de_matrice=SIMP(statut='o', typ='I', defaut=2, - ang="Matrix type (symetry). 2: symetric. Please refer to MUMPS documentation.", - fr =u"Type de matrice (symétrie). Choisir 2 pour une matrice symétrique. Expliqué dans la documentation MUMPS.", - ), - ICNTL_Control_Parameters=SIMP(statut='o', typ='I', defaut=7, - ang="ICNTL control parameter. Please refer to MUMPS documentation.", - fr =u"Paramètre de contrôle ICNTL. Expliqué dans la documentation MUMPS.", - ), - CNTL_Control_Parameters=SIMP(statut='o', typ='I', defaut=5, - ang="CNTL control parameter. Please refer to MUMPS documentation.", - fr =u"Paramètre de contrôle CNTL. Expliqué dans la documentation MUMPS.", - ), - ), - ), - ) - -POST_COMMANDS = PROC ( nom = "POST_COMMANDS", - op = None, - repetable = 'n', - UIinfo = { "groupes" : ( "1) Parametres", ) }, - ang= "post-processing commands .cmd or .post file", - fr= u"fichiers .cmd ou .post de commandes de post-traitement", - # Sous-parties, moins indentées pour améliorer la lisibilité - # Grandeurs globales - GLOBAL = FACT ( statut="f", - ang ="Post-processing of global quantities", - fr =u"Post-traitement des grandeurs globales", - ), - # Carte de tous les champs possibles - VISU = FACT ( statut="f", - ang ="Post-processing of field maps", - fr =u"Post-traitement des cartes de champ", - VISU_Format=SIMP(statut='o', typ='TXM', into=("MED", "VTK"), defaut="MED"), - VISU_Type=SIMP(statut='o', typ='TXM', into=("ELEMENT", "NOEUD"), defaut="ELEMENT"), - ), - # Ligne de coupe - CUTLINE = FACT ( statut="f", - ang = "Post-processing of one cutline", - fr = u"Post-traitement d'une ligne de coupe", - first_point = SIMP(statut='o', - typ = Tuple(3),validators = VerifTypeTuple(('R','R','R')), - ang="First point of the cutline (cartesian coordinates).", - fr=u"Point de départ (premier point) de la ligne de coupe (coordonnées cartésiennes).", - ), - - last_point = SIMP(statut='o', typ='R', min=3, max=3, - ang="Last point of the cutline (cartesian coordinates).", - fr=u"Point d'arrivée (dernier point) de la ligne de coupe (coordonnées cartésiennes)." - ), - number_of_points = SIMP(statut='o', typ='I', - ang="Number of points of the cutline.", - fr=u"Nombre de points de la ligne de coupe." - ), - name = SIMP(statut='o', typ='TXM', - ang="Name of the cutline, used in the output filename.", - fr=u"Nom de la ligne de coupe, utilisé dans le nom du fichier de sortie." - ), - field = SIMP(statut='o', typ='TXM', into=("H", "B", "J", "E"), - ang="Field on which the cutline is applied.", - fr=u"Champ pour lequel la ligne de coupe est définie." - ), - ), - # Plan de coupe - CUTPLANE = FACT ( statut="f", - ang = "Post-processing of one cutplane", - fr = u"Post-traitement d'un plan de coupe", - normal_vector = SIMP(statut='o', typ='TXM', into=("Ox", "Oy", "Oz"), - ang="Cutplane normal vector, i.e., perpendicular axis, 3 possible cartesian values: Ox, Oy, Oz.", - fr=u"Vecteur normal au plan de coupe, i.e., son axe perpendiculaire, parmi les 3 valeurs cartésiennes Ox, Oy et Oz." - ), - plane_position = SIMP(statut='o', typ='R', - ang="Cutplane position, i.e., its coordinate along the normal vector axis.", - fr=u"Position du plan de coupe, i.e., coordonnée le long de l'axe de vecteur normal." - ), - number_of_points = SIMP(statut='o', typ='I', min=2, max=2, - ang="Number of points on the cutplane, which define a cartesian grid along its canonical directions, e.g., Ox and Oy if plane normal to Oz.", - fr=u"Nombre de points sur le plan de coupe dans les deux directions (grille cartésienne), e.g., Ox et Oy si le plan est normal à Oz." - ), - name = SIMP(statut='o', typ='TXM', - ang="Name of the cutplane, used in the output filename.", - fr=u"Nom du plan de coupe, utilisé dans le nom du fichier de sortie." - ), - field = SIMP(statut='o', typ='TXM', into=("H", "B", "J", "E"), - ang="Field on which the cutplane is applied.", - fr=u"Champ pour lequel le plan de coupe est défini." - ), - ), - -) # Fin PROC POST_COMMANDS - - -#====================================================================== -# le fichier .PHYS contient 3 blocs et jusqu'a 3 niveaux de sous-blocs -# -#====================================================================== - -#=================================================================== -# 2eme bloc : bloc MATERIALS -#=================================================================== -# definition des matériaux utilisateurs -# a partir des materiaux de reference ou de materiaux generiques -#------------------------------------------------------------------- - -MATERIAL = OPER (nom = "MATERIAL", - op = None, - repetable = 'n', - UIinfo = { "groupes" : ( "2) Proprietes", ) }, - ang= "real material block definition", - fr= u"définition d'un matériau réel", - sd_prod= material, - # regles=EXCLUS('PERMITTIVITY','CONDUCTIVITY'), - -#--------------------------------------------------------------------- -# liste des matériaux de reference fournis par THEMIS et des -# materiaux generiques (les materiaux generiques peuvent etre utilises -# si aucun materiau de reference ne convient) -#--------------------------------------------------------------------- - TYPE = SIMP(statut='o', - typ='TXM', - into=( -# matériaux génériques - "DIELECTRIC", - "CONDUCTOR", - "ZINSULATOR","ZSURFACIC", - "NILMAT","EM_ISOTROPIC","EM_ANISOTROPIC", - ), - ang = "generic materials list", - fr = u"liste des matériaux génériques", - ), - -############################################################################## -# Remarque generale a tous les materiaux : -# pour conserver l'affichage scientifique le nombre derriere l'exposant doit -# etre strictement superieur au nombre de decimales -# - -##---------------------------------------------------------------------------------------------- -# Données de perméabilité, utilisée pour les diélectriques, conducteurs et impédances de surface -#----------------------------------------------------------------------------------------------- - #HAS_PERMEABILITY = BLOC(condition="TYPE in ('DIELECTRIC','CONDUCTOR','ZSURFACIC')", - -#------------------------------------------------ -# sous bloc niveau 2 : PERMEABILITY -#------------------------------------------------ -# - PERMEABILITY_properties = BLOC (condition="TYPE=='DIELECTRIC' or TYPE=='CONDUCTOR'", - PERMEABILITY = FACT ( statut="o", - ang ="Permeability properties", - fr =u"propriétés de perméabilité du matériau", - HOMOGENEOUS = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is homogeneous or not", - fr = u"le matériau est homogène ou non", - ), - ISOTROPIC = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is isotropic or not", - fr = u"le matériau est isotrope ou non", - ), - HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", - LAW = SIMP (statut="o", - typ="TXM", - defaut="LINEAR", - into = ("LINEAR","NONLINEAR"), - ang = "harmonic or time-domain linear or nonlinear law only for homogeneous and isotropic materials", - fr = u"loi linéaire (fréquentielle ou temporelle) ou non (homogène et isotrope seulement)", - ), - VALUE = SIMP (statut="o", - typ="C", - defaut=1, - ang = "Relative linear permeability value, also used at first nonlinear iteration", - fr = u"Valeur de la perméabilité relative à l'air utilisée pour une loi linéaire ou pour la première itération non-linéaire", - ), - - NONLINEAR_LAW_PROPERTIES = BLOC (condition="LAW=='NONLINEAR'", - NATURE = SIMP (statut="o", - typ="TXM", - defaut="MARROCCO", - into = ("SPLINE","MARROCCO","MARROCCO+SATURATION"), - ang = "nature law", - fr = u"nature de la loi", - ), - SPLINE_LAW_PROPERTIES = BLOC (condition="NATURE=='SPLINE'", - FILENAME = SIMP (statut="o", - typ=("FichierNoAbs",'All Files (*)',), # l'existence du fichier n'est pas vérifiée - ang="data file name", - fr =u"nom du fichier contenant les mesures expérimentales B(H)", - ), - ), # Fin BLOC SPLINE_PROPERTIES - MARROCCO_LAW_PROPERTIES = BLOC (condition="NATURE in ('MARROCCO','MARROCCO+SATURATION')", - ALPHA = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="alpha parameter", - fr =u"paramètre alpha de la loi de Marrocco" , - ), - TAU = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="tau parameter", - fr =u"paramètre tau de la loi de Marrocco" , - ), - C = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="c parameter", - fr =u"paramètre c de la loi de Marrocco" , - ), - EPSILON = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="epsilon parameter", - fr =u"paramètre epsilon de la loi de Marrocco" , - ), - ), # Fin BLOC MARROCCO_LAW_PROPERTIES - SATURATION_LAW_PROPERTIES = BLOC (condition="NATURE=='MARROCCO+SATURATION'", - BMAX = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="intersection B", - fr = u"valeur de B marquant la fin de la loi de Marrocco et le début du raccord à la loi de saturation", - ), - HSAT = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="H value", - fr = u"valeur de H définissant la loi de saturation", - ), - BSAT = SIMP (statut="o", - typ="R", - defaut=0, - val_min=0, - ang="B value", - fr = u"valeur de B définissant la loi de saturation", - ), - JOIN = SIMP (statut="o", - typ="TXM", - defaut="SPLINE", - into= ("SPLINE","PARABOLIC","LINEAR"), - ang="type of join between laws", - fr =u"type de raccord entre la loi choisie et la loi de saturation" , - ), - ), # Fin BLOC SATURATION_LAW_PROPERTIES - APPLIEDTO = SIMP (statut="o", - typ="TXM", - into=("B(H)&H(B)","B(H)","H(B)"), - defaut="B(H)&H(B)", - ang="join applied to", - fr =u"Le raccord tel que défini est appliqué à la courbe B(H) seulement, à la courbe H(B) seulement ou aux deux courbes à la fois. Dans les deux premiers cas, le raccord de la courbe H(B) est inversé numériquement à partir du raccord défini pour la courbe B(H), et vice-versa.", - ), - ), # Fin BLOC NONLINEAR_LAW_PROPERTIES - ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES - ), - ),# fin FACT PERMEABILITY - - -##---------------------------------------------------------------------------------------------- -# Données de conductivité, utilisée pour les conducteurs et impédances de surface -#----------------------------------------------------------------------------------------------- - #HAS_CONDUCTIVITY = BLOC(condition="TYPE in ('CONDUCTOR','ZSURFACIC')", -#------------------------------------------------ -# sous bloc niveau 2 : CONDUCTIVITY -#------------------------------------------------ - - CONDUCTIVITY_properties= BLOC (condition="TYPE=='CONDUCTOR'", - CONDUCTIVITY = FACT ( statut="o", - ang ="Permittivity properties", - fr = u"propriétés de permittivité du matériau", - HOMOGENEOUS = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is homogeneous or not", - fr = u"le matériau est homogène ou non", - ), - ISOTROPIC = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is isotropic or not", - fr = u"le matériau est isotrope ou non", - ), - HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", - LAW = SIMP (statut="o", - typ="TXM", - defaut="LINEAR", - into = ("LINEAR",), - ang = "linear law", - fr = u"loi linéaire", - ), - VALUE = SIMP (statut="o", - typ="C", - defaut=1, - ang = "enter a complex relative value", - fr = u"saisir une valeur complexe relative", - ), - ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES - ), - - ), - - - # fin FACT CONDUCTIVITY - - - -################################################################################################### -#--------------------------------------------- -# sous bloc niveau 1 -#--------------------------------------- -# matériau generique de type ZINSULATOR -#--------------------------------------- - -# aucun parametre a saisir pour ce materiau - - -################################################################################################### -#--------------------------------------------- -# sous bloc niveau 1 -#--------------------------------------------- -# matériau generique de type NILMAT (fictif) -#--------------------------------------------- - -# aucun parametre a saisir pour ce materiau - - -################################################################################################### -#---------------------------------------------------------- -# sous bloc niveau 1 : EM_ISOTROPIC_FILES -#------------------------------------------------- -# matériau isotropique non homogene generique -#------------------------------------------------- - EM_ISOTROPIC_properties=BLOC(condition="TYPE=='EM_ISOTROPIC'", - regles =( - AU_MOINS_UN ('CONDUCTIVITY_File','PERMEABILITY_File'), - ), - CONDUCTIVITY_File = SIMP (statut="f", - typ=("FichierNoAbs",'MED Files (*.med)',), - ang="CONDUCTIVITY MED data file name", - fr = u"nom du fichier MED CONDUCTIVITY", - ), - PERMEABILITY_File = SIMP (statut="f", - typ=("FichierNoAbs",'MED Files (*.med)',), - ang="PERMEABILITY MED data file name", - fr = u"nom du fichier MED PERMEABILITY", - ), - ), # fin bloc EM_ISOTROPIC_properties - - -#--------------------------------------------------- -# matériau anisotropique non homogene generique -#--------------------------------------------------- - EM_ANISOTROPIC_properties=BLOC(condition="TYPE=='EM_ANISOTROPIC'", - regles =( - AU_MOINS_UN ('CONDUCTIVITY_File','PERMEABILITY_File'), - ), - PERMEABILITY_File = SIMP (statut="f", - #typ=("Fichier",'.mater Files (*.mater)'), # le fichier doit exister dans le répertoire d'où on lancer Eficas si le fichier est défini par un nom relatif, ce qui est trop contraignant - #typ=("Fichier",'.mater Files (*.mater)','Sauvegarde'), # Le fichier peut ne pas exister, mais on propose de le sauvegarder et d'écraser un fichier existant : pas approprié - typ=("FichierNoAbs",'.mater Files (*.mater)'), # l'existence du fichier n'est pas vérifiée, mais on peut le sélectionner quand même via la navigateur. C'est suffisant et permet une bibliothèque de matériaux. - ang="PERMEABILITY .mater data file name", - fr ="nom du fichier .mater PERMEABILITY", - ), - CONDUCTIVITY_File = SIMP (statut="f", - typ=("FichierNoAbs",'.mater Files (*.mater)'), - ang="CONDUCTIVITY .mater data file name", - fr ="nom du fichier .mater CONDUCTIVITY", - ), - ), # fin bloc EM_ANISOTROPIC_properties - - -#------------------------------------------------------------------ -# Données de permittivité, utilisée pour les diélectriques seulement -#------------------------------------------------------------------- - #HAS_PERMITTIVITY = BLOC(condition="TYPE == 'DIELECTRIC'", - -#------------------------------------------------ -# sous bloc niveau 2 : PERMITTIVITY -#------------------------------------------------ - - Utiliser_la_permittivite = SIMP (statut='o', - typ='TXM', - into = ("OUI","NON"), - defaut="NON", - ang ="Optionnaly use permittivity or not (default)", - fr = u"Utilisation optionnelle de la permittivité du matériau. Pas d'utilisation par défaut.", - ), - PERMITTIVITY_properties = BLOC (condition="Utiliser_la_permittivite=='OUI'", - PERMITTIVITY = FACT ( statut="o", - ang ="Permittivity properties", - fr = u"propriétés de permittivité du matériau", - HOMOGENEOUS = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is homogeneous or not", - fr = u"le matériau est homogène ou non", - ), - ISOTROPIC = SIMP (statut="o", - typ="TXM", - defaut="TRUE", - into = ("TRUE","FALSE"), - ang = "the material is isotropic or not", - fr = u"le matériau est isotrope ou non", - ), - HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", - LAW = SIMP (statut="o", - typ="TXM", - defaut="LINEAR", - into = ("LINEAR",), - ang = "linear law", - fr = u"loi linéaire", - ), - VALUE = SIMP (statut="o", - typ="C", - defaut=1, - ang = "enter a complex relative value", - fr = u"saisir une valeur complexe relative", - ), - ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES - ), - ),# fin FACT PERMITTIVITY - - ) # fin OPER MATERIAL - - - -############################################################################## -# Remarque generale a tous les materiaux : -# pour conserver l'affichage scientifique le nombre derriere l'exposant doit -# etre strictement superieur au nombre de decimales - - -#=================================================================== -# 3eme bloc : bloc SOURCES -#==================================================================== -# definition des differentes sources qui seront dans le bloc SOURCES -#------------------------------------------------------------------- - - - -SOURCE = OPER ( nom = "SOURCE", - op = None, - repetable = 'n', - UIinfo = { "groupes" : ( "2) Proprietes", ) }, - ang = "source definition", - fr = u"définition d'une source", - sd_prod = source, -# regles = (UN_PARMI('STRANDED_INDUCTOR','HPORT','EPORT'), # choix d'un type de source -# UN_PARMI('WAVEFORM_CONSTANT','WAVEFORM_SINUS'), # choix d'une forme de source - - -#---------------------------------------------------------- -# sous bloc niveau 1 : stranded inductor source -##--------------------------------------------------------- - Type=SIMP(statut='o', - typ='TXM', - into=("STRANDED_INDUCTOR", "HPORT", "EPORT"), - ang = "Source type", - fr = u"Type de source", - ), - - STRANDED_INDUCTOR_properties = BLOC (condition="Type=='STRANDED_INDUCTOR'", - STRANDED_INDUCTOR = FACT(statut='o', - ang="Stranded inductor source", - fr=u"source de type inducteur bobiné", - NTURNS = SIMP (statut="o", - typ="I", - defaut=1, - ang="number of turns in the inductor", - fr= u"nombre de tours dans l'inducteur bobiné", - ), - TYPE = SIMP (statut="o", - typ="TXM", - defaut="CURRENT", - into=("CURRENT",), - fr= u"source de type courant", - ang="current source type", - ), - ), - ),# FIN de FACT STRANDED_INDUCTOR - HPORT_properties = BLOC (condition="Type=='HPORT'", - HPORT = FACT(statut='o', - ang="Magnetic port source", - fr=u"source de type port magnétique", - TYPE = SIMP (statut="o", - typ="TXM", - into=("VOLTAGE","CURRENT"), - fr= u"source de type tension ou courant", - ang="voltage or current source type", - ), - ), - ),# FIN de FACT HPORT - EPORT_properties = BLOC (condition="Type=='EPORT'", - EPORT = FACT(statut='o', - ang="Electric port source", - fr=u"source de type port électrique", - TYPE = SIMP (statut="o", - typ="TXM", - into=("VOLTAGE","CURRENT"), - fr= u"source de type tension ou courant", - ang="voltage or current source type", - ), - ), - ),# FIN de FACT EPORT - - Signal=SIMP(statut='o', - typ='TXM', - into=("WAVEFORM_CONSTANT", "WAVEFORM_SINUS"), - ang = "Signal type, i.e., source evolution shape", - fr = u"Type de signal, i.e., forme de la source", - ), - WAVEFORM_CONSTANT_properties = BLOC (condition="Signal=='WAVEFORM_CONSTANT'", - WAVEFORM_CONSTANT = FACT(statut='o', - ang="constant source", - fr=u"source constante", - AMPLITUDE = SIMP (statut="o", - typ="R", - defaut=1, - ang = "enter the source magnitude value, in A or V units", - fr = u"saisir la valeur de l'amplitude de la source, en unités A ou V", - ), - ), - ),# FIN de FACT WAVEFORM_CONSTANT - - WAVEFORM_SINUS_properties = BLOC (condition="Signal=='WAVEFORM_SINUS'", - WAVEFORM_SINUS = FACT(statut='o', - ang="sinus variation source", - fr=u"source variant avec une forme sinusoïdale, définie par son amplitude, sa fréquence et sa phase", - AMPLITUDE = SIMP (statut="o", - typ="R", - defaut=1, - ang = "enter the source magnitude value, in A or V units", - fr = u"saisir la valeur de l'amplitude de la source, en unités A ou V", - ), - FREQUENCY = SIMP (statut="o", - typ="R", - defaut=0.0, - ang = "enter the source frequency value, in Hz units", - fr = u"saisir la valeur de la fréquence de la source, en Hz", - ), - PHASE = SIMP (statut="o", - typ="R", - defaut=0.0, - ang = "enter the source phase value, in degrees units", - fr = u"saisir la valeur de la phase de la source, en degrés", - ), - ), - ),# FIN de FACT WAVEFORM_SINUS - - -)# Fin OPER SOURCE - - -STRANDED_INDUCTOR_GEOMETRY=OPER(nom="STRANDED_INDUCTOR_GEOMETRY", - op=None, - repetable = 'n', - sd_prod=stranded_inductor_geometry, - UIinfo = { "groupes" : ( "2) Proprietes", ) }, - ang = "Geometry properties (shape, direction, etc.) for this stranded inductor", - fr = u"Propriétés géométriques de cet inducteur bobiné, e.g., forme, direction, sens", - - Forme=SIMP(statut='o', typ="TXM", into=("Droit", "Circulaire"), - ang = "Stranded inductor shape. Straight or circular.", - fr = u"Forme de l'inducteur bobiné (complet ou morceau) : droit ou circulaire.", - ), - Propriete= BLOC (condition="Forme=='Circulaire'", - Centre=SIMP(statut='o',typ='R',min=3,max=3, - ang = "Circular stranded inductor rotation center (cartesian coordinates).", - fr = u"Centre de rotation, en coordonnées cartésiennes, de l'inducteur bobiné (complet ou morceau) circulaire.", - ), - ), - Direction=SIMP(statut='o',typ='R',min=3,max=3, - ang = "Stranded inductor direction (or rotation) axis for the straight (circular) inductor (cartesian coordinates).", - fr = u"Axe indiquant la direction de l'inducteur bobiné droit, ou l'axe de rotation (support : Centre) de l'inducteur circulaire, en coordonnées cartésiennes.", - ), - Section=SIMP(statut='o', typ='R', - ang = "Stranded inductor section (m^2).", - fr = u"Section de l'inducteur bobiné, en m^2.", - ), -) - -#========================================================= -# création d'une macro pour traiter les INCLUDE -# -#---------------------------------------------------------- - -INCLUDE = MACRO ( nom = "INCLUDE", - op = None, - UIinfo = { "groupes" : ( "3) Bibliotheque", ) }, - sd_prod = opsCarmel.INCLUDE, - op_init = opsCarmel.INCLUDE_context, - fichier_ini = 1, - ang = "Used in order to add external material, source, etc. libraries to the study.", - fr = u"Permet d'utiliser des bibliothèques de matériaux, sources, etc., dans l'étude.", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'comm Files (*.comm);;All Files (*)',), - fr = u"Emplacement du fichier (chemin absolu ou relatif) contenant la bibliothèque des matériaux, etc.", - ang = "material library file (full or relative path)", - ), - - ) # Fin MACRO - -MESHGROUP = OPER (nom = "MESHGROUP", - op = None, - repetable = 'n', - UIinfo= {"groupes":("4) Maillage",)}, - fr= u"attribution d'un matériau ou d'une source à un groupe du maillage", - ang = "mesh group association to material or source", - sd_prod= grmaille, - regles =( - EXCLUS ('MATERIAL','SOURCE'), - ), - -# ---------------------------------------------------------- -# le mot cle SIMP doit etre facultatif sinon la recuperation -# des groupes de mailles sous SALOME ne fonctionne pas car -# le concept ne peut pas etre nomme car non valide -#----------------------------------------------------------- - Domaine = SIMP (statut="f", - typ=(grmaille, 'TXM'), - defaut="default", - ang="Domain used with stranded inductors or topological holes.", - fr =u"Domaine utilisé par les inducteurs bobinés ou les trous topologiques.", - ), - - MATERIAL = SIMP (statut="f", - typ=(material), - ang="name of the linked real or imaginary material", - fr =u"nom du matériau réel ou imaginaire associé", - ), - SOURCE = SIMP (statut="f", - typ=(source,), - ang="name of the linked source", - fr =u"nom de la source associée", - ), - STRANDED_INDUCTOR_GEOMETRY = SIMP ( statut="f", - typ=(stranded_inductor_geometry), - ang="name of the linked stranded inductor geometry", - fr =u"nom de la géométrie d'inducteur bobiné associée", - ) - ) - -# -------------------------------------------------- -# definition de macro-groupe de mailles -# il est associe a un materiau, source ou inducteur bobiné en morceaux -#--------------------------------------------------- - -MACRO_GROUPE = OPER (nom="MACRO_GROUPE", - op=None, - repetable='n', - sd_prod=macro_groupe, - UIinfo = { "groupes" : ( "4) Maillage", ) }, - fr=u"Macro-groupe = liste de groupes de maillage, e.g., inducteur bobiné en morceaux.", - ang=u"Macro-groupe = liste of mesh groups, e.g., stranded inductor defined as several parts.", - regles =( - EXCLUS ('MATERIAL','SOURCE'), - ), - Domaine = SIMP (statut='f', - typ=(grmaille, 'TXM'), - defaut="default", - ang="Domain used with stranded inductors or topological holes.", - fr =u"Domaine utilisé par les inducteurs bobinés ou les trous topologiques.", - ), - - MATERIAL = SIMP (statut="f", - typ=(material,), - ang="name of the linked real or imaginary material", - fr =u"nom du matériau réel ou imaginaire associé", - ), - SOURCE = SIMP (statut="f", - typ=(source,), - ang="name of the linked source", - fr =u"nom de la source associée", - ), - LISTE_MESHGROUP=SIMP(statut='f',# facultatif pour l'acquisition automatique des groupes du maillage - typ=(grmaille,), - min=1,max=100, - ang="Ordered list of associated mesh groups, e.g., stranded inductor parts or topological hole parts.", - fr =u"Liste ordonnée de groupes de maillage associés entre eux, e.g., morceaux d'un inducteur bobiné ou d'un trou topologique.", - ), -) # Fin OPER diff --git a/Carmel3D/E24 b/Carmel3D/E24 deleted file mode 100644 index bc906b35..00000000 --- a/Carmel3D/E24 +++ /dev/null @@ -1,13 +0,0 @@ - 0. 0. - 1000.000 1.200000 - 1200.000 1.270000 - 1600.000 1.350000 - 3000.000 1.520000 - 6000.000 1.660000 - 10000.00 1.750000 - 20000.00 1.900000 - 30000.00 2.000000 - 49944.66 2.101082 - 80000.00 2.200000 - 132000.0 2.300000 - 250000.0 2.400000 diff --git a/Carmel3D/FEV1000 b/Carmel3D/FEV1000 deleted file mode 100644 index 7324073a..00000000 --- a/Carmel3D/FEV1000 +++ /dev/null @@ -1,31 +0,0 @@ - 0.0000000 0.0000000 - 54.38605 0.5687161 - 125.0879 0.9107189 - 217.0004 1.133191 - 336.4865 1.285649 - 491.8185 1.394206 - 693.7501 1.474002 - 956.2611 1.534492 - 1297.525 1.581962 - 1741.169 1.620847 - 2317.906 1.654481 - 3067.663 1.685556 - 4042.348 1.716430 - 5309.438 1.749361 - 6956.655 1.786698 - 9098.037 1.831067 - 11881.83 1.882414 - 15500.77 1.931322 - 20205.39 1.976478 - 26321.39 2.017967 - 34272.19 2.056381 - 44608.23 2.092746 - 58045.08 2.128448 - 75512.98 2.165203 - 98221.27 2.205061 - 127742.0 2.250466 - 166119.0 2.304362 - 216009.1 2.370358 - 280866.3 2.452947 - 308952.9 2.488242 - diff --git a/Carmel3D/FEV470 b/Carmel3D/FEV470 deleted file mode 100644 index d3281a2f..00000000 --- a/Carmel3D/FEV470 +++ /dev/null @@ -1,31 +0,0 @@ - 0. 0. - 40.28202 0.3233068 - 80.56404 0.6466137 - 133.2969 0.8959763 - 196.5763 1.092960 - 272.5116 1.235844 - 363.6339 1.322937 - 472.9807 1.364753 - 604.1969 1.403417 - 761.6563 1.442002 - 950.6076 1.479882 - 1177.349 1.516478 - 1449.439 1.551293 - 1775.947 1.583937 - 2167.756 1.614135 - 2637.928 1.641730 - 3202.133 1.666674 - 3879.180 1.689014 - 4691.636 1.708866 - 5666.584 1.726406 - 6836.521 1.741841 - 8240.445 1.755403 - 9925.154 1.767332 - 11946.81 1.777868 - 14372.79 1.787249 - 17283.96 1.795704 - 20777.38 1.803454 - 24969.48 1.810715 - 30000.00 1.817699 - 33000.00 1.821469 - diff --git a/Carmel3D/FEV600 b/Carmel3D/FEV600 deleted file mode 100644 index 5281d05d..00000000 --- a/Carmel3D/FEV600 +++ /dev/null @@ -1,31 +0,0 @@ - 0. 0. - 40.28202 0.5217850 - 80.56404 1.043570 - 133.2969 1.219489 - 196.5763 1.330541 - 272.5116 1.406615 - 363.6339 1.461884 - 472.9807 1.503975 - 604.1969 1.537396 - 761.6563 1.565024 - 950.6076 1.588824 - 1177.349 1.610226 - 1449.439 1.630343 - 1775.947 1.650098 - 2167.756 1.670444 - 2637.928 1.693085 - 3202.133 1.718405 - 3879.180 1.746379 - 4691.636 1.776860 - 5666.584 1.809549 - 6836.521 1.843973 - 8240.445 1.879470 - 9925.154 1.915191 - 11946.81 1.950107 - 14372.79 1.983036 - 17283.96 2.012676 - 20777.38 2.037636 - 24969.48 2.056473 - 30000.00 2.067699 - 33000.00 2.071469 - diff --git a/Carmel3D/FEV800 b/Carmel3D/FEV800 deleted file mode 100644 index 810c3ab6..00000000 --- a/Carmel3D/FEV800 +++ /dev/null @@ -1,30 +0,0 @@ - 0. 0. - 40.28202 0.3324555 - 80.56404 0.6649110 - 133.2969 0.9138392 - 196.5763 1.111536 - 272.5116 1.260901 - 363.6339 1.364212 - 472.9807 1.422949 - 604.1969 1.451498 - 761.6563 1.480342 - 950.6076 1.510200 - 1177.349 1.540614 - 1449.439 1.571091 - 1775.947 1.601134 - 2167.756 1.630277 - 2637.928 1.658111 - 3202.133 1.684309 - 3879.180 1.708632 - 4691.636 1.730937 - 5666.584 1.751169 - 6836.521 1.769348 - 8240.445 1.785560 - 9925.154 1.799934 - 11946.81 1.812635 - 14372.79 1.823846 - 17283.96 1.833761 - 20777.38 1.842578 - 24969.48 1.850493 - 30000.00 1.857699 - 33000.00 1.861469 diff --git a/Carmel3D/HA600 b/Carmel3D/HA600 deleted file mode 100644 index 4c4a877c..00000000 --- a/Carmel3D/HA600 +++ /dev/null @@ -1,30 +0,0 @@ - 0. 0. - 40.28202 0.3951843 - 80.56404 0.7903686 - 133.2969 0.9716319 - 196.5763 1.095780 - 272.5116 1.185383 - 363.6339 1.252692 - 472.9807 1.304966 - 604.1969 1.346809 - 761.6563 1.381319 - 950.6076 1.410688 - 1177.349 1.436551 - 1449.439 1.460186 - 1775.947 1.483959 - 2167.756 1.510788 - 2637.928 1.540831 - 3202.133 1.574084 - 3879.180 1.610407 - 4691.636 1.649490 - 5666.584 1.690835 - 6836.521 1.733738 - 8240.445 1.777294 - 9925.154 1.820413 - 11946.81 1.861850 - 14372.79 1.900252 - 17283.96 1.934193 - 20777.38 1.962221 - 24969.48 1.982877 - 30000.00 1.994699 - 33000.00 1.998469 diff --git a/Carmel3D/M600_65 b/Carmel3D/M600_65 deleted file mode 100644 index cfc3f3ba..00000000 --- a/Carmel3D/M600_65 +++ /dev/null @@ -1,30 +0,0 @@ - 0. 0. - 0.1676396E-03 0.2082807E-05 - 0.3352792E-03 0.4165609E-05 - 0.7823178E-03 0.9719718E-05 - 0.1676395E-02 0.2082782E-04 - 0.3464548E-02 0.4304356E-04 - 0.7040854E-02 0.8747321E-04 - 0.1419346E-01 0.1763252E-03 - 0.2849867E-01 0.3540000E-03 - 0.5710909E-01 0.7092333E-03 - 0.1143299 0.1419235E-02 - 0.2287715 0.2837381E-02 - 0.4576545 0.5666269E-02 - 0.9154205 0.1129461E-01 - 1.830952 0.2243500E-01 - 3.662015 0.4426165E-01 - 7.324139 0.8618276E-01 - 14.64838 0.1637067 - 29.29687 0.2975280 - 58.59383 0.5032464 - 117.1877 0.7693985 - 234.3755 1.046909 - 468.7509 1.279960 - 937.5016 1.447085 - 1875.003 1.563602 - 3750.004 1.671697 - 7500.005 1.775926 - 15000.00 1.854134 - 30000.00 1.897699 - 33000.00 1.901469 diff --git a/Carmel3D/M6X2ISO1 b/Carmel3D/M6X2ISO1 deleted file mode 100644 index e6facc82..00000000 --- a/Carmel3D/M6X2ISO1 +++ /dev/null @@ -1,16 +0,0 @@ - 0. 0. - 477.0000 1.100000 - 922.9141 1.633186 - 1337.513 1.756419 - 4292.604 1.852735 - 6366.000 1.880000 - 7958.000 1.900000 - 15915.00 1.980000 - 23873.00 2.020000 - 31830.00 2.045000 - 47746.00 2.080000 - 64329.63 2.111715 - 86767.84 2.145308 - 148638.1 2.239294 - 238700.0 2.355000 - 318300.0 2.420000 diff --git a/Carmel3D/M6X_epsilon.mater b/Carmel3D/M6X_epsilon.mater deleted file mode 100644 index c1c50ef0..00000000 --- a/Carmel3D/M6X_epsilon.mater +++ /dev/null @@ -1 +0,0 @@ - 1.0 diff --git a/Carmel3D/M6X_homog_mu.mater b/Carmel3D/M6X_homog_mu.mater deleted file mode 100644 index 57d6c245..00000000 --- a/Carmel3D/M6X_homog_mu.mater +++ /dev/null @@ -1 +0,0 @@ - 1.5331206E4-j.1.6906576E4 1.9440262E3-j.2.6880635E1 1.6315E1 diff --git a/Carmel3D/M6X_homog_sigma.mater b/Carmel3D/M6X_homog_sigma.mater deleted file mode 100644 index 6597c154..00000000 --- a/Carmel3D/M6X_homog_sigma.mater +++ /dev/null @@ -1 +0,0 @@ - 0.0 diff --git a/Carmel3D/M6X_lineaire_mu.mater b/Carmel3D/M6X_lineaire_mu.mater deleted file mode 100644 index 8698c6b7..00000000 --- a/Carmel3D/M6X_lineaire_mu.mater +++ /dev/null @@ -1 +0,0 @@ - 1.60000E4 2.0000E3 3.0000E1 diff --git a/Carmel3D/M6X_lineaire_sigma.mater b/Carmel3D/M6X_lineaire_sigma.mater deleted file mode 100644 index a4cfcedc..00000000 --- a/Carmel3D/M6X_lineaire_sigma.mater +++ /dev/null @@ -1 +0,0 @@ - 1.492537313E6. diff --git a/Carmel3D/M6X_mu.mater b/Carmel3D/M6X_mu.mater deleted file mode 100644 index fa1141c2..00000000 --- a/Carmel3D/M6X_mu.mater +++ /dev/null @@ -1,22 +0,0 @@ - 0. 0. 0. 0. - 625.9739 1.572659 477.0000 0.7020000 - 796.0000 1.665000 796.0000 1.170000 - 1719.099 1.786521 1591.000 1.310000 - 3183.000 1.810000 3183.000 1.430000 - 3979.000 1.830000 3979.000 1.475000 - 4775.000 1.850000 4775.000 1.510000 - 5570.000 1.865000 5570.000 1.540000 - 6366.000 1.880000 6366.000 1.570000 - 7958.000 1.900000 7958.000 1.620000 - 11937.00 1.950000 11937.00 1.695000 - 15915.00 1.980000 15915.00 1.760000 - 19098.00 2.000000 19098.00 1.810000 - 31830.00 2.045000 31830.00 1.930000 - 47746.00 2.080000 47746.00 2.010000 - 63662.00 2.110000 63662.00 2.070000 - 79577.00 2.145000 79577.00 2.120000 - 111041.0 2.200000 111041.0 2.190000 - 143200.0 2.240000 143200.0 2.255000 - 198900.0 2.310000 198900.0 2.325000 - 238700.0 2.355000 238700.0 2.360000 - 318300.0 2.420000 318300.0 2.420000 diff --git a/Carmel3D/__init__.py b/Carmel3D/__init__.py deleted file mode 100644 index 40a96afc..00000000 --- a/Carmel3D/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/Carmel3D/ajoutGroupe.py b/Carmel3D/ajoutGroupe.py deleted file mode 100644 index 7179c9e3..00000000 --- a/Carmel3D/ajoutGroupe.py +++ /dev/null @@ -1,203 +0,0 @@ -# -*- coding: iso-8859-1 -*- - -import re # module interne utilisé pour vérifier la validité du nom du maillage - -concept_re=re.compile(r'[a-zA-Z_]\w*$') # nom de maillage valide s'il correspond à un identifiant (variable) Python possible. Basé sur Ihm/I_Etape.py:nomme_sd, qui fait foi - -def handleAjoutGroupSansFiltre(editor,listeGroup): - """code_Carmel temporel : obtention des groupes de maille du maillage selectionne dans Salome - Les groupes de mailles ne sont pas filtrés. - La creation du MESH_GROUPE n'est donc pas typé. - ATTENTION! Le nom devenant un concept, i.e. une variable Python, certains signes sont interdits dans le nom du groupe, - e.g. les signes moins (-), plus (+), etc. Une erreur est retournee en ce cas. - """ - # retourne le dernier element du JdC, ou None si le JdC est vide, afin de savoir a quelle place ajouter les MESH_GROUPE (en dernier) - debug = True - try: - dernier=editor.tree.racine.children[-1] - except: - dernier=None - for groupe in listeGroup: # parcours de la liste de tous les groupes de maille trouves (volumiques et les autres), puis ecriture du MESHGROUP systématique sans analyse de nom multiple - if debug: print 'groupe=', groupe - if not concept_re.match(groupe): # Le nom du groupe de maillage doit etre un identificateur Python - raise ValueError, "Ce nom de groupe ("+groupe+") ne peut pas etre utilise car il ne peut pas servir de concept a cause de caracteres interdits, e.g. signes moins (-), plus (+), etc." - try: # test de conformite du nom pour un concept, i.e. une variable Python - #exec(groupe+'=None') # le test consiste a tenter de creer une variable, initialisee a None, a partir du nom, e.g. toto=None est bon mais toto-foo=None ne fonctionne pas. - # creation du groupe MESH_GROUPE - if dernier != None: - new_node = dernier.append_brother("MESHGROUP",'after') - else: - new_node=editor.tree.racine.append_child("MESHGROUP",pos='first') - test,mess = new_node.item.nomme_sd(groupe) # precision du nom (de concept) du groupe - if debug: print u"ce nom de groupe ("+groupe+") est utilise..." - dernier=new_node # mise a jour du dernier noeud du JdC, afin de rajouter les autres MESH_GROUPE eventuels a sa suite - except: - raise ValueError, "Ce nom de groupe ("+groupe+") pose un probleme inconnu" - -def handleAjoutGroupAvecFiltre(editor,listeGroup): - """CARMEL3D : obtention des groupes de maille du maillage selectionne dans Salome - Les groupes de mailles sont filtres en utilisant une liste des prefixes autorises pour code Code_Carmel3D, - i.e. un nom de groupe de mailles est DIEL_toto_foo par exemple, qui deviendra toto_foo. - La creation du MESH_GROUPE est type (materiau ou source), d'après le prefixe. - ATTENTION! Le nom devenant un concept, i.e. une variable Python, certains signes sont interdits dans le nom du groupe, - e.g. les signes moins (-), plus (+), etc. Une erreur est retournee en ce cas. - """ - from string import join - debug = False #True - listePrefixesMateriaux = ('DIEL', 'NOCOND','COND', 'ZS', 'ZJ', 'NILMAT') # liste des prefixes pour les materiaux - listePrefixesSourcesHorsInducteur = ('EPORT', 'HPORT') # liste des prefixes pour les sources - listePrefixesInducteurBobine = ('CURRENT', ) # listes des prefixes autorises pour definir la geometrie d'un inducteur bobiné complet ou en morceaux - listePrefixesTrous = ('TOPO', ) # listes des prefixes autorises pour definir la geometrie d'un trou complet ou en morceaux - listePrefixesBBK = ('BBK', ) # listes des prefixes autorises pour definir le groupe d'éléments servant de boîte englobante dans laquelle est calculée K (inducteur bobiné ou topo). - listePrefixes = listePrefixesMateriaux + listePrefixesSourcesHorsInducteur +listePrefixesInducteurBobine + listePrefixesTrous + listePrefixesBBK # liste de tous les prefixes autorises - listePrefixesGroupesMultiples = ('CURRENT', 'TOPO' ) # listes des prefixes autorises pour groupes multiples, i.e. plusieurs groupes de mailles associes en une seule caracteistique materiau ou source - if debug: - print "listePrefixes=", listePrefixes - print "listePrefixesGroupesMultiples=", listePrefixesGroupesMultiples - sep = '_' # separateur entre le prefixe et le nom reel du groupe (qui peut lui aussi contenir ce separateur) - dictGroupesMultiples = {} # dictionnaire contenant les noms reels possibles de groupes multiples et leur occurence dans la liste, i.e. 1 par defaut et > 1 pour une groupe multiple, e.g. pour un inducteur bobine en plusieurs morceaux CURRENT_toto_1, CURRENT_toto_2, ce dictionnaire contiendra 'toto':2 - for groupe in listeGroup: - partiesGroupe = groupe.split(sep) # parties du nom, separees initialement par le separateur du prefixe, e.g. 'CURRENT_toto_foo' devient ['CURRENT','toto','foo'] et 'toto' devient ['toto'] - prefix = partiesGroupe[0] # prefixe possible de ce nom, ou nom lui-meme - if len(partiesGroupe) >= 3 and prefix in listePrefixesGroupesMultiples: # prefixe existant et autorise - nomGroupeMultiple = partiesGroupe[1] # nom possible d'un groupe multiple - if dictGroupesMultiples.has_key(nomGroupeMultiple): # comptage du nombre d'occurrences de ce nom de groupe multiple possible - dictGroupesMultiples[nomGroupeMultiple]['nombre'] += 1 - dictGroupesMultiples[nomGroupeMultiple]['membres'].append(join(partiesGroupe[1:], sep)) - else: - dictGroupesMultiples[nomGroupeMultiple] = {'type': prefix,'nombre':1, 'membres':[join(partiesGroupe[1:], sep)]} - for groupe in dictGroupesMultiples.keys(): # recherche de tous les groupes multiples. Boucle ignorée si aucun groupe multiple. - dictGroupesMultiples[groupe]['membres'].sort() # tri alphabétique des membres du groupe multiple, qui est l'ordre lu par gendof.exe/MED (ordre lexicographique). - dictGroupesMultiples[groupe]['membres'] = tuple(dictGroupesMultiples[groupe]['membres']) # transformation en tuple, qui est le format attendu par le catalogue (LISTE_MESHGROUP) - if debug: - print "dictGroupesMultiples=", dictGroupesMultiples - # retourne le dernier element du JdC, ou None si le JdC est vide, afin de savoir a quelle place ajouter les MESH_GROUPE (en dernier) - try: - dernier=editor.tree.racine.children[-1] - except: - dernier=None - for groupe in listeGroup: # parcours de la liste de tous les groupes de maille trouves (volumiques et les autres), puis ecriture du MESHGROUP systématique sans analyse de nom multiple - if debug: print 'groupe=', groupe - partiesGroupe = groupe.split(sep) # parties du nom, separees initialement par le separateur du prefixe, e.g. 'CURRENT_toto_foo' devient ['CURRENT','toto','foo'] et 'toto' devient ['toto'] - if len(partiesGroupe) == 1: # pas de prefixe - print u"ERREUR: ce nom de groupe ("+groupe+") ne peut pas etre utilise car il n'a pas de prefixe" - elif len(partiesGroupe) >= 2 and partiesGroupe[0] in listePrefixes: # prefixe existant et autorise - prefix = partiesGroupe[0] # prefixe possible de ce nom, ou nom lui-meme - nom = partiesGroupe[1] # nom du groupe ou du macro-groupe si défini. - nomReel = join(partiesGroupe[1:], sep) # reconstruction du nom reel, i.e. sans le prefixe, pour la plupart des groupes - if prefix in listePrefixesBBK: nomReel = groupe # pour la boite englobante, il faut le nom avec préfixe - if not concept_re.match(nomReel): # Le nom du groupe de maillage doit etre un identificateur Python - raise ValueError, "Ce nom de groupe ("+nomReel+") ne peut pas etre utilise car il ne peut pas servir de concept a cause de caracteres interdits, e.g. signes moins (-), plus (+), etc." - try: # test de conformite du nom pour un concept, i.e. une variable Python - #exec(nomReel+'=None') # le test consiste a tenter de creer une variable, initialisee a None, a partir du nom, e.g. toto=None est bon mais toto-foo=None ne fonctionne pas. - # creation du groupe MESH_GROUPE - if dernier != None: - new_node = dernier.append_brother("MESHGROUP",'after') - else: - new_node=editor.tree.racine.append_child("MESHGROUP",pos='first') - test,mess = new_node.item.nomme_sd(nomReel) # precision du nom (de concept) du groupe - if debug: print u"ce nom de groupe ("+nomReel+") est utilise..." - if prefix in listePrefixesMateriaux: # ce groupe est associe a un materiau - new_node.append_child('MATERIAL') # on rajoute la propriete de materiau, qu'il suffit d'associer ensuite a la liste des materiaux presents - if debug: print u" et c'est un materiau." - elif prefix in listePrefixesSourcesHorsInducteur: # ce groupe est associe a une source - new_node.append_child('SOURCE') # on rajoute la propriete de la source, qu'il suffit d'associer ensuite a la liste des sources presentes - if debug: print u" et c'est une source." - elif prefix in listePrefixesInducteurBobine: # ce groupe est associe a une source - new_node.append_child('STRANDED_INDUCTOR_GEOMETRY') # on rajoute la propriete de géométrie de l'inducteur bobiné - if debug: print u" et c'est un inducteur bobine dont on definit la geometrie." - if nom not in dictGroupesMultiples.keys(): # il ne fait pas partie d'un macro-groupe. La source est définie ici, ainsi que le domaine. - new_node.append_child('SOURCE') # on rajoute la propriete de la source, qu'il suffit d'associer ensuite a la liste des sources presentes - new_node.append_child('Domaine') # on rajoute la propriete du domaine (default automatique), qu'il suffit d'associer ensuite a la liste des domaines présents - if debug: print u" et c'est une source en un seul morceau." - else: # ce cas ne devrait pas se produire - pass - dernier=new_node # mise a jour du dernier noeud du JdC, afin de rajouter les autres MESH_GROUPE eventuels a sa suite - except: - raise ValueError, "Ce nom de groupe ("+nomReel+") pose un probleme inconnu" - #print u"ERREUR: ce nom de groupe ("+nomReel+") ne peut pas etre utilise car il ne peut pas servir de concept a cause de caractères interdits, e.g. signes moins (-), plus (+), etc." - else: # prefixe existant mais non autorise - print u"ERREUR: ce nom de groupe ("+groupe+") ne peut pas etre utilise car son prefixe ("+partiesGroupe[0]+") n'est pas dans la liste autorisee "+str(listePrefixes) - if len(dictGroupesMultiples) > 0: # on a des groupes à nom multiples, e.g., inducteur bobiné en morceaux. - for groupe, contenu in dictGroupesMultiples.iteritems(): # parcours de la liste de tous les groupes de maille trouves (volumiques et les autres), et sélection des groupes à nom multiple - if debug: print 'groupe, contenu=', groupe, contenu - nomReel = groupe - prefix = contenu['type'] - try: # test de conformite du nom pour un concept, i.e. une variable Python - exec(nomReel+'=None') # le test consiste a tenter de creer une variable, initialisee a None, a partir du nom, e.g. toto=None est bon mais toto-foo=None ne fonctionne pas. - # creation du groupe MACRO_GROUPE - if dernier != None: - new_node = dernier.append_brother("MACRO_GROUPE",'after') - else: - new_node=editor.tree.racine.append_child("MACRO_GROUPE",pos='first') - test,mess = new_node.item.nomme_sd(nomReel) # precision du nom (de concept) du groupe - if debug: print u"ce nom de groupe ("+nomReel+") est utilise..." - if debug: print u" et on ajoute la liste LISTE_MESHGROUP." - node_list=new_node.append_child('LISTE_MESHGROUP') # Ajout de la liste des membres du groupe multiple - if debug: - print 'Liste possible pour LISTE_MESHGROUP :' - print '_____________________' - print node_list.item.get_liste_possible(()) - print '_____________________' - print dir(node_list.item) - listeNom=node_list.item.get_sd_avant_du_bon_type() - listeObjet=[] - for nom in listeNom: - if nom in dictGroupesMultiples[groupe]['membres']: - #--> transformation du nom en objet - obj,valide=node_list.item.eval_valeur(nom) - listeObjet.append(obj) - node_list.item.set_valeur(listeObjet) - node_list.affichePanneau() - if prefix in listePrefixesMateriaux: # ce groupe est associe a un materiau - new_node.append_child('MATERIAL') # on rajoute la propriete de materiau, qu'il suffit d'associer ensuite a la liste des materiaux presents - if debug: print u" et c'est un materiau." - elif prefix in listePrefixesSourcesHorsInducteur: # ce groupe est associe a une source - new_node.append_child('SOURCE') # on rajoute la propriete de la source, qu'il suffit d'associer ensuite a la liste des sources presentes - if debug: print u" et c'est une source hors inducteur." - elif prefix in listePrefixesInducteurBobine: # ce groupe est associe a une source - new_node.append_child('SOURCE') # on rajoute la propriete de la source, qu'il suffit d'associer ensuite a la liste des sources presentes - new_node.append_child('Domaine') # on rajoute la propriete du domaine (default automatique), qu'il suffit d'associer ensuite a la liste des domaines présents - if debug: print u" et c'est une source inducteur." - elif prefix in listePrefixesTrous: # ce groupe est associe a un trou - new_node.append_child('Domaine') # on rajoute la propriete du domaine (default automatique), qu'il suffit d'associer ensuite a la liste des domaines présents - if debug: print u" et c'est un trou." - else: # ce cas ne devrait pas se produire - pass - dernier=new_node # mise a jour du dernier noeud du JdC, afin de rajouter les autres MESH_GROUPE eventuels a sa suite - except: - print u"ERREUR: ce nom de groupe ("+nomReel+") ne peut pas etre utilise car il ne peut pas servir de concept a cause de caractères interdits, e.g. signes moins (-), plus (+), etc." - -def handleAjoutGroupFiltre(editor,listeGroup): - """CARMEL3D : obtention des groupes de maille du maillage selectionne dans Salome - Les groupes de mailles sont filtres en utilisant une liste des prefixes autorises pour code Code_Carmel3D, - i.e. un nom de groupe de mailles est DIEL_toto_foo par exemple, qui deviendra toto_foo. - La creation du MESH_GROUPE est type (materiau ou source), d'après le prefixe. - ATTENTION! Le nom devenant un concept, i.e. une variable Python, certains signes sont interdits dans le nom du groupe, - e.g. les signes moins (-), plus (+), etc. Une erreur est retournee en ce cas. - """ - from string import join - debug = True - #print 'DEBUG listeGroup manuel' # Il faut aussi commenter la ligne Msg,listeGroup=self.ChercheGrpMailleInSalome() dans la routine ChercheGrpMaille de qtEficas.py - #listeGroup = ['DIEL_air', 'COND_plaque', 'CURRENT_bobine' ] # cas-test plaque Rodger avec DIEL_ - #listeGroup = ['NOCOND_air', 'COND_plaque', 'CURRENT_bobine' ] # cas-test plaque Rodger - #listeGroup = ['DIEL_air', 'COND_plaque', 'NOCOND_noyau', 'CURRENT_bobine_1', 'CURRENT_bobine_2', 'CURRENT_bobine_3' ] - #listeGroup = ['DIEL_air', 'COND_plaque', 'NOCOND_noyau', 'CURRENT_bobine' ] - #listeGroup = ['BBK_bobine', 'DIEL_air', 'COND_plaque', 'NOCOND_noyau', 'CURRENT_bobine' ] # avec BBK - #listeGroup = ['EPORT+_dom', 'EPORT-_dom', 'H', 'COND_cyl', 'EPORT_dom'] # cas-test CSS_Tempimpo - #listeGroup= ['BBK_spire', 'CURRENT_spire_4', 'NOCOND_air', 'CURRENT_spire_3', 'CURRENT_spire_1', 'CURRENT_spire_2'] # cas-test spire_dans l'air en 4 morceaux - #listeGroup= ['BBK_bobine', 'CURRENT_ind_2', 'DIEL_air', 'CURRENT_ind_8', 'CURRENT_ind_6', 'CURRENT_ind_1', 'CURRENT_ind_3', 'CURRENT_ind_7', 'CURRENT_ind_5', 'CURRENT_ind_4', 'BBK_topo', 'COND_plaque', 'TOPO_trou_1', 'TOPO_trou_3', 'TOPO_trou_2', 'TOPO_trou_8', 'TOPO_trou_4', 'TOPO_trou_7', 'TOPO_trou_5', 'TOPO_trou_6'] # cas-test T.E.A.M. Workshop 7 - if debug: - print "listeGroup=", listeGroup - version_catalogue = editor.CONFIGURATION.appli.readercata.version_code # détermination si le catalogue est fréquentiel ou temporel, d'après la deuxième entrée de la liste catalogues dans prefs_CARMEL3D.py - if debug: - print "Version catalogue=", version_catalogue - type_code = version_catalogue.split(' ')[0] # on garde le premier mot de la version du catalogue : 'frequentiel' ou 'temporel' - if debug: - print "Type de code=", type_code - if type_code not in ('frequentiel', 'temporel'): # test de cohérence du type de code - raise ValueError("Ce catalogue n'est ni frequentiel ni temporel") - if type_code == 'frequentiel': - handleAjoutGroupAvecFiltre(editor, listeGroup) - if type_code == 'temporel': - handleAjoutGroupSansFiltre(editor, listeGroup) diff --git a/Carmel3D/configuration_CARMEL3D.py b/Carmel3D/configuration_CARMEL3D.py deleted file mode 100644 index e5597115..00000000 --- a/Carmel3D/configuration_CARMEL3D.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -""" - Ce module sert pour charger les paramètres de configuration d'EFICAS -""" -# Modules Python -import configuration -import os - - -class CONFIG(configuration.CONFIG_BASE): - - #----------------------------------- - def __init__(self,appli,repIni): - #----------------------------------- - - self.labels_user=['exec_acrobat', 'catalogues','savedir'] - self.labels_eficas=['path_doc','exec_acrobat','lang','rep_cata','catalogues'] - - self.INSTALLDIR =os.path.dirname(__file__) - configuration.CONFIG_BASE.__init__(self,appli,repIni) - - -def make_config(appli,rep): - return CONFIG(appli,rep) - diff --git a/Carmel3D/materiaux/ACIER_TEAM13 b/Carmel3D/materiaux/ACIER_TEAM13 deleted file mode 100644 index 27b9f3b3..00000000 --- a/Carmel3D/materiaux/ACIER_TEAM13 +++ /dev/null @@ -1,28 +0,0 @@ -# B(H) curve from T.E.A.M. Workshop 13 -# New measures, last table from the notice (COMPEL 1995) -# Measures from B=0 to 1.8 T, saturation J_s=2.16T -# Hmod Bmod -0.0 0.0 -45.0 0.0250 -75.0 0.0500 -120.0 0.1000 -173.0 0.2000 -201.0 0.3000 -222.0 0.4000 -240.0 0.5000 -250.0 0.6000 -265.0 0.7000 -280.0 0.8000 -300.0 0.9000 -330.0 1.0000 -365.0 1.1000 -415.0 1.2000 -500.0 1.3000 -640.0 1.4000 -890.0 1.5000 -1150.0 1.5500 -1940.0 1.6000 -3100.0 1.6500 -4370.0 1.7000 -6347.0 1.7500 -8655.0 1.8000 diff --git a/Carmel3D/materiaux/CMakeLists.txt b/Carmel3D/materiaux/CMakeLists.txt deleted file mode 100644 index f6163590..00000000 --- a/Carmel3D/materiaux/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- -# CONFIGURATION MANAGEMENT OF EDF VERSION -# ====================================================================== -# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# -# -# ====================================================================== - - -install ( FILES - ACIER_TEAM13 E24 FEV470 FEV600 FEV800 FEV1000 HA600 M600_65 M6X2ISO1 - M6X_epsilon.mater M6X_mu.mater M6X_sigma.mater - M6X_homogene_mu.mater M6X_homogene_sigma.mater - M6X_lineaire_mu.mater M6X_lineaire_sigma.mater - materiaux.comm - DESTINATION ${CMAKE_INSTALL_PREFIX}/Carmel3D/materiaux - ) - - -### Local Variables: -### mode: cmake -### End: diff --git a/Carmel3D/materiaux/E24 b/Carmel3D/materiaux/E24 deleted file mode 100644 index bc906b35..00000000 --- a/Carmel3D/materiaux/E24 +++ /dev/null @@ -1,13 +0,0 @@ - 0. 0. - 1000.000 1.200000 - 1200.000 1.270000 - 1600.000 1.350000 - 3000.000 1.520000 - 6000.000 1.660000 - 10000.00 1.750000 - 20000.00 1.900000 - 30000.00 2.000000 - 49944.66 2.101082 - 80000.00 2.200000 - 132000.0 2.300000 - 250000.0 2.400000 diff --git a/Carmel3D/materiaux/FEV1000 b/Carmel3D/materiaux/FEV1000 deleted file mode 100644 index 7324073a..00000000 --- a/Carmel3D/materiaux/FEV1000 +++ /dev/null @@ -1,31 +0,0 @@ - 0.0000000 0.0000000 - 54.38605 0.5687161 - 125.0879 0.9107189 - 217.0004 1.133191 - 336.4865 1.285649 - 491.8185 1.394206 - 693.7501 1.474002 - 956.2611 1.534492 - 1297.525 1.581962 - 1741.169 1.620847 - 2317.906 1.654481 - 3067.663 1.685556 - 4042.348 1.716430 - 5309.438 1.749361 - 6956.655 1.786698 - 9098.037 1.831067 - 11881.83 1.882414 - 15500.77 1.931322 - 20205.39 1.976478 - 26321.39 2.017967 - 34272.19 2.056381 - 44608.23 2.092746 - 58045.08 2.128448 - 75512.98 2.165203 - 98221.27 2.205061 - 127742.0 2.250466 - 166119.0 2.304362 - 216009.1 2.370358 - 280866.3 2.452947 - 308952.9 2.488242 - diff --git a/Carmel3D/materiaux/FEV470 b/Carmel3D/materiaux/FEV470 deleted file mode 100644 index d3281a2f..00000000 --- a/Carmel3D/materiaux/FEV470 +++ /dev/null @@ -1,31 +0,0 @@ - 0. 0. - 40.28202 0.3233068 - 80.56404 0.6466137 - 133.2969 0.8959763 - 196.5763 1.092960 - 272.5116 1.235844 - 363.6339 1.322937 - 472.9807 1.364753 - 604.1969 1.403417 - 761.6563 1.442002 - 950.6076 1.479882 - 1177.349 1.516478 - 1449.439 1.551293 - 1775.947 1.583937 - 2167.756 1.614135 - 2637.928 1.641730 - 3202.133 1.666674 - 3879.180 1.689014 - 4691.636 1.708866 - 5666.584 1.726406 - 6836.521 1.741841 - 8240.445 1.755403 - 9925.154 1.767332 - 11946.81 1.777868 - 14372.79 1.787249 - 17283.96 1.795704 - 20777.38 1.803454 - 24969.48 1.810715 - 30000.00 1.817699 - 33000.00 1.821469 - diff --git a/Carmel3D/materiaux/FEV600 b/Carmel3D/materiaux/FEV600 deleted file mode 100644 index 5281d05d..00000000 --- a/Carmel3D/materiaux/FEV600 +++ /dev/null @@ -1,31 +0,0 @@ - 0. 0. - 40.28202 0.5217850 - 80.56404 1.043570 - 133.2969 1.219489 - 196.5763 1.330541 - 272.5116 1.406615 - 363.6339 1.461884 - 472.9807 1.503975 - 604.1969 1.537396 - 761.6563 1.565024 - 950.6076 1.588824 - 1177.349 1.610226 - 1449.439 1.630343 - 1775.947 1.650098 - 2167.756 1.670444 - 2637.928 1.693085 - 3202.133 1.718405 - 3879.180 1.746379 - 4691.636 1.776860 - 5666.584 1.809549 - 6836.521 1.843973 - 8240.445 1.879470 - 9925.154 1.915191 - 11946.81 1.950107 - 14372.79 1.983036 - 17283.96 2.012676 - 20777.38 2.037636 - 24969.48 2.056473 - 30000.00 2.067699 - 33000.00 2.071469 - diff --git a/Carmel3D/materiaux/FEV800 b/Carmel3D/materiaux/FEV800 deleted file mode 100644 index 810c3ab6..00000000 --- a/Carmel3D/materiaux/FEV800 +++ /dev/null @@ -1,30 +0,0 @@ - 0. 0. - 40.28202 0.3324555 - 80.56404 0.6649110 - 133.2969 0.9138392 - 196.5763 1.111536 - 272.5116 1.260901 - 363.6339 1.364212 - 472.9807 1.422949 - 604.1969 1.451498 - 761.6563 1.480342 - 950.6076 1.510200 - 1177.349 1.540614 - 1449.439 1.571091 - 1775.947 1.601134 - 2167.756 1.630277 - 2637.928 1.658111 - 3202.133 1.684309 - 3879.180 1.708632 - 4691.636 1.730937 - 5666.584 1.751169 - 6836.521 1.769348 - 8240.445 1.785560 - 9925.154 1.799934 - 11946.81 1.812635 - 14372.79 1.823846 - 17283.96 1.833761 - 20777.38 1.842578 - 24969.48 1.850493 - 30000.00 1.857699 - 33000.00 1.861469 diff --git a/Carmel3D/materiaux/HA600 b/Carmel3D/materiaux/HA600 deleted file mode 100644 index 4c4a877c..00000000 --- a/Carmel3D/materiaux/HA600 +++ /dev/null @@ -1,30 +0,0 @@ - 0. 0. - 40.28202 0.3951843 - 80.56404 0.7903686 - 133.2969 0.9716319 - 196.5763 1.095780 - 272.5116 1.185383 - 363.6339 1.252692 - 472.9807 1.304966 - 604.1969 1.346809 - 761.6563 1.381319 - 950.6076 1.410688 - 1177.349 1.436551 - 1449.439 1.460186 - 1775.947 1.483959 - 2167.756 1.510788 - 2637.928 1.540831 - 3202.133 1.574084 - 3879.180 1.610407 - 4691.636 1.649490 - 5666.584 1.690835 - 6836.521 1.733738 - 8240.445 1.777294 - 9925.154 1.820413 - 11946.81 1.861850 - 14372.79 1.900252 - 17283.96 1.934193 - 20777.38 1.962221 - 24969.48 1.982877 - 30000.00 1.994699 - 33000.00 1.998469 diff --git a/Carmel3D/materiaux/M600_65 b/Carmel3D/materiaux/M600_65 deleted file mode 100644 index cfc3f3ba..00000000 --- a/Carmel3D/materiaux/M600_65 +++ /dev/null @@ -1,30 +0,0 @@ - 0. 0. - 0.1676396E-03 0.2082807E-05 - 0.3352792E-03 0.4165609E-05 - 0.7823178E-03 0.9719718E-05 - 0.1676395E-02 0.2082782E-04 - 0.3464548E-02 0.4304356E-04 - 0.7040854E-02 0.8747321E-04 - 0.1419346E-01 0.1763252E-03 - 0.2849867E-01 0.3540000E-03 - 0.5710909E-01 0.7092333E-03 - 0.1143299 0.1419235E-02 - 0.2287715 0.2837381E-02 - 0.4576545 0.5666269E-02 - 0.9154205 0.1129461E-01 - 1.830952 0.2243500E-01 - 3.662015 0.4426165E-01 - 7.324139 0.8618276E-01 - 14.64838 0.1637067 - 29.29687 0.2975280 - 58.59383 0.5032464 - 117.1877 0.7693985 - 234.3755 1.046909 - 468.7509 1.279960 - 937.5016 1.447085 - 1875.003 1.563602 - 3750.004 1.671697 - 7500.005 1.775926 - 15000.00 1.854134 - 30000.00 1.897699 - 33000.00 1.901469 diff --git a/Carmel3D/materiaux/M6X2ISO1 b/Carmel3D/materiaux/M6X2ISO1 deleted file mode 100644 index e6facc82..00000000 --- a/Carmel3D/materiaux/M6X2ISO1 +++ /dev/null @@ -1,16 +0,0 @@ - 0. 0. - 477.0000 1.100000 - 922.9141 1.633186 - 1337.513 1.756419 - 4292.604 1.852735 - 6366.000 1.880000 - 7958.000 1.900000 - 15915.00 1.980000 - 23873.00 2.020000 - 31830.00 2.045000 - 47746.00 2.080000 - 64329.63 2.111715 - 86767.84 2.145308 - 148638.1 2.239294 - 238700.0 2.355000 - 318300.0 2.420000 diff --git a/Carmel3D/materiaux/M6X_epsilon.mater b/Carmel3D/materiaux/M6X_epsilon.mater deleted file mode 100644 index c1c50ef0..00000000 --- a/Carmel3D/materiaux/M6X_epsilon.mater +++ /dev/null @@ -1 +0,0 @@ - 1.0 diff --git a/Carmel3D/materiaux/M6X_homogene_mu.mater b/Carmel3D/materiaux/M6X_homogene_mu.mater deleted file mode 100644 index 57d6c245..00000000 --- a/Carmel3D/materiaux/M6X_homogene_mu.mater +++ /dev/null @@ -1 +0,0 @@ - 1.5331206E4-j.1.6906576E4 1.9440262E3-j.2.6880635E1 1.6315E1 diff --git a/Carmel3D/materiaux/M6X_homogene_sigma.mater b/Carmel3D/materiaux/M6X_homogene_sigma.mater deleted file mode 100644 index 6597c154..00000000 --- a/Carmel3D/materiaux/M6X_homogene_sigma.mater +++ /dev/null @@ -1 +0,0 @@ - 0.0 diff --git a/Carmel3D/materiaux/M6X_lineaire_mu.mater b/Carmel3D/materiaux/M6X_lineaire_mu.mater deleted file mode 100644 index 8698c6b7..00000000 --- a/Carmel3D/materiaux/M6X_lineaire_mu.mater +++ /dev/null @@ -1 +0,0 @@ - 1.60000E4 2.0000E3 3.0000E1 diff --git a/Carmel3D/materiaux/M6X_lineaire_sigma.mater b/Carmel3D/materiaux/M6X_lineaire_sigma.mater deleted file mode 100644 index a4cfcedc..00000000 --- a/Carmel3D/materiaux/M6X_lineaire_sigma.mater +++ /dev/null @@ -1 +0,0 @@ - 1.492537313E6. diff --git a/Carmel3D/materiaux/M6X_mu.mater b/Carmel3D/materiaux/M6X_mu.mater deleted file mode 100644 index fa1141c2..00000000 --- a/Carmel3D/materiaux/M6X_mu.mater +++ /dev/null @@ -1,22 +0,0 @@ - 0. 0. 0. 0. - 625.9739 1.572659 477.0000 0.7020000 - 796.0000 1.665000 796.0000 1.170000 - 1719.099 1.786521 1591.000 1.310000 - 3183.000 1.810000 3183.000 1.430000 - 3979.000 1.830000 3979.000 1.475000 - 4775.000 1.850000 4775.000 1.510000 - 5570.000 1.865000 5570.000 1.540000 - 6366.000 1.880000 6366.000 1.570000 - 7958.000 1.900000 7958.000 1.620000 - 11937.00 1.950000 11937.00 1.695000 - 15915.00 1.980000 15915.00 1.760000 - 19098.00 2.000000 19098.00 1.810000 - 31830.00 2.045000 31830.00 1.930000 - 47746.00 2.080000 47746.00 2.010000 - 63662.00 2.110000 63662.00 2.070000 - 79577.00 2.145000 79577.00 2.120000 - 111041.0 2.200000 111041.0 2.190000 - 143200.0 2.240000 143200.0 2.255000 - 198900.0 2.310000 198900.0 2.325000 - 238700.0 2.355000 238700.0 2.360000 - 318300.0 2.420000 318300.0 2.420000 diff --git a/Carmel3D/materiaux/M6X_sigma.mater b/Carmel3D/materiaux/M6X_sigma.mater deleted file mode 100644 index e69de29b..00000000 diff --git a/Carmel3D/materiaux/materiaux.comm b/Carmel3D/materiaux/materiaux.comm deleted file mode 100644 index 3a5f08f8..00000000 --- a/Carmel3D/materiaux/materiaux.comm +++ /dev/null @@ -1,270 +0,0 @@ - -AIR=MATERIAL(TYPE='DIELECTRIC', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=1,), - PERMITTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=1,),); - -ALU=MATERIAL(TYPE='CONDUCTOR', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=1,), - CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('3.448E+7'),),); - -ACIER_NOIR=MATERIAL(TYPE='CONDUCTOR', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.0E+2'),), - CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('6.00000E+6'),),); - -ACIER_CIMBLOT=MATERIAL(TYPE='CONDUCTOR', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('50.0000'),), - CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('3.00000E+6'),),); - -ACIER_PE=MATERIAL(TYPE='CONDUCTOR', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('70'),), - CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.75000E+6'),),); - -ACIER_TEAM13_mesures=MATERIAL(TYPE='DIELECTRIC', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='NONLINEAR', - VALUE=2376, - NATURE='SPLINE', - FILENAME='ACIER_TEAM13', - APPLIEDTO='B(H)&H(B)',), - PERMITTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=('RI',1,0,),),); - -ACIER_TEAM13_Marrocco=MATERIAL(TYPE='DIELECTRIC', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='NONLINEAR', - VALUE=2376, - NATURE='MARROCCO+SATURATION', - ALPHA=9.98, - TAU=106000.0, - C=0.0119, - EPSILON=0.000467, - BMAX=1.85, - HSAT=47732.7, - BSAT=2.22, - JOIN='PARABOLIC', - APPLIEDTO='B(H)&H(B)',), - PERMITTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=('RI',1,0,),),); - -BRONZE=MATERIAL(TYPE='CONDUCTOR', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=3.0,), - CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.00000E+6'),),); - -CUIVRE=MATERIAL(TYPE='CONDUCTOR', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=1.0,), - CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('5.85E+7'),),); - -E24=MATERIAL(TYPE='DIELECTRIC', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='NONLINEAR', - VALUE=Decimal('1.0'), - NATURE='SPLINE', - FILENAME='E24', - APPLIEDTO='B(H)&H(B)',), - PERMITTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.0'),),); - -HA600=MATERIAL(TYPE='DIELECTRIC', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='NONLINEAR', - VALUE=Decimal('1.0'), - NATURE='SPLINE', - FILENAME='HA600', - APPLIEDTO='B(H)&H(B)',), - PERMITTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.0'),),); - -INCONEL600=MATERIAL(TYPE='CONDUCTOR', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=1.01,), - CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('9.7000E+5'),),); - -FERRITEB30=MATERIAL(TYPE='DIELECTRIC', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.10E+3'),), - PERMITTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=1.0,),); - -FERRITE_Ni_Zn=MATERIAL(TYPE='CONDUCTOR', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('15.0000'),), - CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('0.0000010000'),),); - -FERRITE_Mn_Zn=MATERIAL(TYPE='CONDUCTOR', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.25E+3'),), - CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('10'),),); - -FEV470=MATERIAL(TYPE='DIELECTRIC', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='NONLINEAR', - VALUE=Decimal('1.0'), - NATURE='SPLINE', - FILENAME='FEV470', - APPLIEDTO='B(H)&H(B)',), - PERMITTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.0'),),); - -FEV600=MATERIAL(TYPE='DIELECTRIC', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='NONLINEAR', - VALUE=Decimal('1.0'), - NATURE='SPLINE', - FILENAME='FEV600', - APPLIEDTO='B(H)&H(B)',), - PERMITTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.0'),),); - -FEV800=MATERIAL(TYPE='DIELECTRIC', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='NONLINEAR', - VALUE=Decimal('1.0'), - NATURE='SPLINE', - FILENAME='FEV800', - APPLIEDTO='B(H)&H(B)',), - PERMITTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.0'),),); - -FEV1000=MATERIAL(TYPE='DIELECTRIC', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='NONLINEAR', - VALUE=Decimal('1.0'), - NATURE='SPLINE', - FILENAME='FEV1000', - APPLIEDTO='B(H)&H(B)',), - PERMITTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.0'),),); - -M600_65=MATERIAL(TYPE='DIELECTRIC', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='NONLINEAR', - VALUE=Decimal('1.0'), - NATURE='SPLINE', - FILENAME='M600_65', - APPLIEDTO='B(H)&H(B)',), - PERMITTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.0'),),); - -#M6X=MATERIAL(TYPE='EM_ANISOTROPIC', -# PERMEABILITY_File='M6X_mu.mater', -# CONDUCTIVITY_File='M6X_sigma.mater',); - -M6X2ISO1=MATERIAL(TYPE='CONDUCTOR', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='NONLINEAR', - VALUE=Decimal('1.0'), - NATURE='SPLINE', - FILENAME='M6X2ISO1', - APPLIEDTO='B(H)&H(B)',), - CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.724E+6'),),); - -#M6X_LINEAIRE=MATERIAL(TYPE='EM_ANISOTROPIC', -# PERMEABILITY_File='M6X_lineaire_mu.mater', -# CONDUCTIVITY_File='M6X_lineaire_sigma.mater',); - -#M6X_HOMOGENE=MATERIAL(TYPE='EM_ANISOTROPIC', -# PERMEABILITY_File='M6X_homogene_mu.mater', -# CONDUCTIVITY_File='M6X_homogene_sigma.mater',); - -POTASSE=MATERIAL(TYPE='CONDUCTOR', - PERMEABILITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('1.0'),), - CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', - ISOTROPIC='TRUE', - LAW='LINEAR', - VALUE=Decimal('71.43'),),); -#CHECKSUM:614994a51cd56f24959331e5ef1c7a98 -:FIN CHECKSUM diff --git a/Carmel3D/opsCarmel.py b/Carmel3D/opsCarmel.py deleted file mode 100644 index 8270d474..00000000 --- a/Carmel3D/opsCarmel.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -def INCLUDE(self,FileName,**args): - """ - Fonction sd_prod pour la macro INCLUDE - """ - if hasattr(self,'change_fichier'): - delattr(self,'change_fichier') - delattr(self,'fichier_ini') - - self.make_includeCarmel(fichier=FileName) - -def INCLUDE_context(self,d): - """ - Fonction op_init pour macro INCLUDE - """ - for k,v in self.g_context.items(): - d[k]=v - - diff --git a/Carmel3D/prefs.py b/Carmel3D/prefs.py deleted file mode 100644 index a69b761b..00000000 --- a/Carmel3D/prefs.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -code="CARMEL3D" -import sys, os -if os.path.dirname(os.path.abspath(__file__)) not in sys.path : - sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/Carmel3D/prefs_CARMEL3D.py b/Carmel3D/prefs_CARMEL3D.py deleted file mode 100644 index 41e26ee1..00000000 --- a/Carmel3D/prefs_CARMEL3D.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -import os - -# repIni sert a localiser le fichier editeur.ini -repIni=os.path.dirname(os.path.abspath(__file__)) - -# lang indique la langue utilisee pour les chaines d'aide : fr ou ang -lang='fr' - -# Codage des strings qui accepte les accents (en remplacement de 'ascii') -encoding='utf-8' - -# Choix des catalogues -# format du Tuple (code,version,catalogue,formatOut, finit par defaut Ăventuellement) -catalogues = ( - -# catalogue avec generation Phys et materiaux reels - ('CARMEL3D','temporel (dev)',os.path.join(repIni,'Carmel3D_Cata_temporel_V0.py'),'CARMEL3DTV0','defaut'), - ('CARMEL3D','frequentiel',os.path.join(repIni,'Carmel3D_Cata_frequentiel_V1.py'),'CARMEL3DFV0','defaut') -) diff --git a/Carmel3D/properties.py b/Carmel3D/properties.py deleted file mode 100644 index 3db8254b..00000000 --- a/Carmel3D/properties.py +++ /dev/null @@ -1,25 +0,0 @@ -#@ MODIF properties Accas DATE 02/06/2010 AUTEUR aster M.ADMINISTRATEUR -# CONFIGURATION MANAGEMENT OF EDF VERSION -# RESPONSABLE D6BHHHH J-P.LEFEBVRE -# ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# ====================================================================== -# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR -# DE LA VERSION DU CODE_ASTER ASSOCIE -#---------------------------------------------------------------------- -version = "10.1.27" -date = "02/06/2010" -exploit = False diff --git a/Carmel3D/qtEficas_Carmel3D.py b/Carmel3D/qtEficas_Carmel3D.py deleted file mode 100755 index d38a9984..00000000 --- a/Carmel3D/qtEficas_Carmel3D.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -""" - Ce module sert à lancer EFICAS configuré pour Carmel -""" -# Modules Python -# Modules Eficas - -import sys,os -sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) - -import prefs -from InterfaceQT4 import eficas_go -eficas_go.lance_eficas(code=prefs.code) diff --git a/Carmel3D/style.py b/Carmel3D/style.py deleted file mode 100644 index d4855725..00000000 --- a/Carmel3D/style.py +++ /dev/null @@ -1,66 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Pour modifier le style d'EFICAS il faut ajouter un fichier style.py qui contiendra les -informations sur le style voulu dans son repertoire Eficas_install. - -La methode la plus simple consiste à modifier directement les attributs de l'objet style dans le -fichier style.py d'Eficas_install. Exemple:: - - style.background='yellow' - -pour modifier la couleur du background. - -Il existe une autre méthode qui peut être utilisée quand on veut modifier plusieurs propriétés à la fois. - -Le fichier style.py doit définir une nouvelle classe qui dérive de la classe de base STYLE avec des attributs -de classe qui définiront le nouveau style (par exemple, si on veut modifier le background):: - - class STYLE(STYLE): - background='yellow' - -Il faut ensuite instancier cette classe, dans ce meme fichier, en donnant le nom style à l'objet cree:: - - style=STYLE() - -Tous les attributs de classe possibles sont visibles dans le module Editeur/basestyle.py:: - - background='gray90' - foreground='black' - entry_background='white' - list_background='white' - list_select_background='#00008b' - list_select_foreground='grey' - tooltip_background="yellow" - - standard = ("Helvetica",12) - standard_italique = ("Helvetica",12,'italic') - standard_gras = ("Helvetica",12,'bold') - standard_gras_souligne = ("Helvetica",12,'bold','underline') - - canvas = ('Helvetica',10) - canvas_italique = ('Helvetica',10,'italic') - canvas_gras = ("Helvetica",10,'bold') - canvas_gras_italique = ("Helvetica",12,'bold','italic') - - standard12 = ("Helvetica",14) - standard12_gras = ("Helvetica",14,'bold') - standard12_gras_italique = ( "Helvetica",14,'bold','italic') - - -Le fichier style.py contenu dans le répertoire Aster permet de spécifier des propriétés globales pour une installation. -Les modifications de style contenues dans ce fichier et dans le fichier style.py d'Eficas_install -sont prises en compte dans cet ordre. -""" - -p1=10 -p2=14 -f1="Helvetica" - -style.background='gray90' -style.foreground='black' -style.standard = (f1,p1) -style.standard_italique = (f1,p1,'italic') -style.standard_gras = (f1,p1,'bold') -style.canvas_italique = (f1,p1,'italic') -style.canvas_gras = (f1,p1,'bold') -style.statusfont = (f1,p2) diff --git a/CatasDeTests/.b.py.swp b/CatasDeTests/.b.py.swp new file mode 100644 index 00000000..4f943291 Binary files /dev/null and b/CatasDeTests/.b.py.swp differ diff --git a/CatasDeTests/.cataMemesNoms.py.swp b/CatasDeTests/.cataMemesNoms.py.swp new file mode 100644 index 00000000..6c632e98 Binary files /dev/null and b/CatasDeTests/.cataMemesNoms.py.swp differ diff --git a/CatasDeTests/.cataSimple_driver.xsd.swp b/CatasDeTests/.cataSimple_driver.xsd.swp new file mode 100644 index 00000000..d766936d Binary files /dev/null and b/CatasDeTests/.cataSimple_driver.xsd.swp differ diff --git a/CatasDeTests/.cataTesteDelete.py.swp b/CatasDeTests/.cataTesteDelete.py.swp new file mode 100644 index 00000000..aee2e78d Binary files /dev/null and b/CatasDeTests/.cataTesteDelete.py.swp differ diff --git a/CatasDeTests/ReadMe.txt b/CatasDeTests/ReadMe.txt new file mode 100644 index 00000000..fd828658 --- /dev/null +++ b/CatasDeTests/ReadMe.txt @@ -0,0 +1 @@ +xmllint --schema XMLSchema11.xsd cata_genere.xsd diff --git a/CatasDeTests/cataListes.py b/CatasDeTests/cataListes.py new file mode 100644 index 00000000..e16fe0d9 --- /dev/null +++ b/CatasDeTests/cataListes.py @@ -0,0 +1,37 @@ +# Copyright (C) 2008-2018 EDF R&D +# +# This file is part of SALOME ADAO module +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +import os, re +import Accas +from Accas import * +monFichier=os.path.abspath(__file__) + +JdC = JDC_CATA ( + code='Essai' + ) +VERSION_CATALOGUE='V_0' + +# tout est Facultatif car sinon, on ne peut pas supprimer et c 'est ce qu on veut tester + + +DefinitionListe = PROC( nom='DefinitionListe', + listeTexte = SIMP( statut='f', typ = 'TXM',max='**'), + listeIntInto = SIMP( statut='f', typ = 'I',homo="SansOrdreNiDoublon",max='**', into=(1,2,3,4)), + listeIntIntoOrdre = SIMP( statut='f', typ = 'I',max='**', into=(1,2,3,4)), +) diff --git a/CatasDeTests/cata_1.py b/CatasDeTests/cata_1.py new file mode 100644 index 00000000..2a78327e --- /dev/null +++ b/CatasDeTests/cata_1.py @@ -0,0 +1,53 @@ +# coding: utf-8 -*- +# + +#import os +#import types +#monFile=os.path.abspath(__file__) + +from Accas import * +import types + +#type UserASSD +class User_Data(UserASSD): pass +#type ASSD +class Mesh(ASSD): pass +class MeshU(UserASSD): pass + +#Be careful when modidying the order/names od the test_simp since they are used bye the documentation xsd_mapping.rst +#beginJdC +JdC = JDC_CATA(code='Test1',) + +#Usecase 1abis : Le contenu de l'objet est completement déterminé par les paramètres suivants +#CreateMesh = OPER(nom = 'CreateMesh', sd_prod=Mesh, +# meshname = SIMP(typ='TXM'), +# dimension = SIMP(typ='I', into=[1,2,3]), +# listOfEntities = SIMP(typ='I', max='**'),) +##Usecase 1ater : Il est possible de créer plusieurs +#CreateBoth = OPER(nom = 'CreateBoth', sd_prod=Mesh, +# meshname = SIMP(typ=(MeshU,'createObject')), +# dimension = SIMP(typ='I', into=[1,2,3]), +# listOfEntities = SIMP(typ='I', max='**'),) +# +##Usecase 1b : Chaque champ (crée à la racine) utilise l'objet maillage précedement construit (à la racine) +## statut='o', ?? +MyField = PROC(nom='MyField', + onMesh = SIMP(statut='o',typ=Mesh),) + +# +############################# +##Usecase 2a : Il est possible de créer plusieurs maillages dans une structure nommée meshes +## La définition du nom du maillage dans le JDD sert de référence à un notre mesh (un objet python du type UserASSD Mesh +## est également crée pour l'occasion (sans paramètre au constructeur) ). +## le typ du SIMP est en fait une chaîne pour laquelle il est possible d'ajouter un validateur. +#Meshes = PROC(nom = 'Meshes', +# mesh = FACT(max='**', +# name = SIMP(typ=(MeshU,'createObject')), +# dimension = SIMP(typ='I', into=[1,2,3]), +# listOfEntities = SIMP(typ='I', max='**'), +# ), +# )#Meshes + +#MyFieldBis = PROC(nom='MyFieldBis', +# onMesh = SIMP(statut='o',typ=MeshU),) +# diff --git a/CatasDeTests/cata_1.xsd b/CatasDeTests/cata_1.xsd new file mode 100644 index 00000000..aa2dca62 --- /dev/null +++ b/CatasDeTests/cata_1.xsd @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CatasDeTests/cata_FactFreresMemesNoms.py b/CatasDeTests/cata_FactFreresMemesNoms.py new file mode 100644 index 00000000..9ed00041 --- /dev/null +++ b/CatasDeTests/cata_FactFreresMemesNoms.py @@ -0,0 +1,62 @@ +# Copyright (C) 2008-2018 EDF R&D +# +# This file is part of SALOME ADAO module +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +import os, re +import Accas +from Accas import * +monFichier=os.path.abspath(__file__) + +JdC = JDC_CATA ( + code='Essai' + ) +VERSION_CATALOGUE='V_0' + +#leProc = PROC(nom = 'leProc', +# unSimp = SIMP(statut='o', typ ='I'), +# bloc1 = BLOC(condition = "UnSimp == 1", +# leFact1 = FACT(statut = 'o', +# Name = SIMP(typ='TXM', statut='o',), +# ScalarFluxModel = SIMP(typ='TXM', statut='o'), +# ), +# ), # fin bloc1 +# bloc2 = BLOC(condition = "UnSimp == 2", +# leFact1 = FACT(statut = 'o', +# Name = SIMP(typ='TXM', statut='o',), +# ), +# ) +#) +leProcV2 = PROC(nom = 'leProcV2', + unSimpV2 = SIMP(statut='o', typ ='I'), + blocV21 = BLOC(condition = "UnSimpV2 == 1", + leFactV21 = FACT(statut = 'o', + ScalarV2 = FACT(statut = 'f', max ='**', + NameV2 = SIMP(typ='TXM', statut='o',), + ScalarFluxModelV2 = SIMP(typ='TXM', statut='o'), + ),# Scalar + ), + ), # fin bloc1 + blocV22 = BLOC(condition = "UnSimp == 2", + leFactV21 = FACT(statut = 'o', + ScalarV2 = FACT ( statut = 'f', max ='**', + NameV2 = SIMP(typ='TXM', statut='o',), + ),# ScalarV2 + ), + ), # fin bloc2 +) + diff --git a/CatasDeTests/cata_FactFreresMemesNomsV1_ref.xsd b/CatasDeTests/cata_FactFreresMemesNomsV1_ref.xsd new file mode 100644 index 00000000..6a7ea537 --- /dev/null +++ b/CatasDeTests/cata_FactFreresMemesNomsV1_ref.xsd @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CatasDeTests/cata_FactFreresMemesNoms_driver.py b/CatasDeTests/cata_FactFreresMemesNoms_driver.py new file mode 100644 index 00000000..67aa30a3 --- /dev/null +++ b/CatasDeTests/cata_FactFreresMemesNoms_driver.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from raw.cata_FactFreresMemesNoms_driver import * diff --git a/CatasDeTests/cata_FactFreresMemesNoms_ref.xsd b/CatasDeTests/cata_FactFreresMemesNoms_ref.xsd new file mode 100644 index 00000000..d917bbce --- /dev/null +++ b/CatasDeTests/cata_FactFreresMemesNoms_ref.xsd @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CatasDeTests/cata_UserAssd.py b/CatasDeTests/cata_UserAssd.py new file mode 100644 index 00000000..5ff16c03 --- /dev/null +++ b/CatasDeTests/cata_UserAssd.py @@ -0,0 +1,69 @@ +# Copyright (C) 2008-2018 EDF R&D +# +# This file is part of SALOME ADAO module +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +import os, re +import Accas +from Accas import * +monFichier=os.path.abspath(__file__) + +JdC = JDC_CATA ( + code='Essai' + ) +VERSION_CATALOGUE='V_0' + +# tout est Facultatif car sinon, on ne peut pas supprimer et c 'est ce qu on veut tester + +class laClasseUser(UserASSD): pass +class laClasseUserDerive(laClasseUser): pass +class lASSD(ASSD): pass + +# En fait, cela n pas vraiment de sens que cela soit dans le fact +# ou si ? pour l instant on laisse de cote + +DefinitionDsFactDsOper = OPER( nom='DefinitionDsFactDsOper', sd_prod=lASSD, + unFact1 = FACT(statut='f', max="**", + creeUserAssd = SIMP( statut='f', typ = (laClasseUser,'createObject'),), + ), +) + +DefinitionDsSimpDsOper = OPER( nom='DefinitionDsSimpDsOper', sd_prod=lASSD, + creeUserAssd = SIMP( statut='f', typ = (laClasseUserDerive,'createObject'),), +) + +DefinitionDsFactDsProc = PROC( nom='DefinitionDsFactDsProc', + unFact = FACT(statut='f', + creeUserAssd = SIMP( statut='f', typ = (laClasseUser,'createObject'),), + ), +) +DefinitionDsSimpDsProc = PROC( nom='DefinitionDsSimpDsProc', + creeUserAssd = SIMP( statut='f', typ = (laClasseUser,'createObject'),), +) + +DefinitionDsSimpListe = PROC( nom='DefinitionDsSimpListe', + creeUserAssd = SIMP( statut='f', typ = (laClasseUser,'createObject'),max='**'), +) + +UtiliseUnUserAssD = PROC( nom = 'UtiliseUnUserAssD', + utiliseUnUserAssd = SIMP(statut= 'o',typ =laClasseUser), +) +UtiliseEtDefinitDsLeMemeProc = PROC( nom = 'UtiliseEtDefinitDsLeMemeProc', + utiliseUserAssd = SIMP(statut= 'o',typ= laClasseUser,max='**'), + creeUserAssd = SIMP( statut='f', typ = (laClasseUser,'createObject'),), +) + diff --git a/CatasDeTests/cata_UserAssd.xsd b/CatasDeTests/cata_UserAssd.xsd new file mode 100644 index 00000000..083ea0ce --- /dev/null +++ b/CatasDeTests/cata_UserAssd.xsd @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {'T_creeUserAssd': {'_creeUserAssd_DefinitionDsSimpDsOper': 'T_creeUserAssd_2', '_creeUserAssd_DefinitionDsSimpListe': 'T_creeUserAssd_4'}} + + + + + \ No newline at end of file diff --git a/CatasDeTests/cata_UserAssd.xsd_ref b/CatasDeTests/cata_UserAssd.xsd_ref new file mode 100644 index 00000000..0650a123 --- /dev/null +++ b/CatasDeTests/cata_UserAssd.xsd_ref @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CatasDeTests/cata_UserAssd2.xsd b/CatasDeTests/cata_UserAssd2.xsd new file mode 100644 index 00000000..74724aa1 --- /dev/null +++ b/CatasDeTests/cata_UserAssd2.xsd @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {'T_creeUserAssd': {'_creeUserAssd_DefinitionDsSimpListe': 'T_creeUserAssd_4'}} + + + + + diff --git a/CatasDeTests/cata_UserAssd2_driver.py b/CatasDeTests/cata_UserAssd2_driver.py new file mode 100644 index 00000000..16add34c --- /dev/null +++ b/CatasDeTests/cata_UserAssd2_driver.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from raw.cata_UserAssd2_driver import * diff --git a/CatasDeTests/cata_UserAssd_driver.py b/CatasDeTests/cata_UserAssd_driver.py new file mode 100644 index 00000000..52b09173 --- /dev/null +++ b/CatasDeTests/cata_UserAssd_driver.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from raw.cata_UserAssd_driver import * diff --git a/CatasDeTests/decorateur/metier.py b/CatasDeTests/decorateur/metier.py new file mode 100644 index 00000000..7ccc9aa9 --- /dev/null +++ b/CatasDeTests/decorateur/metier.py @@ -0,0 +1,21 @@ +def MaFonction (monArgument1, monArgument2 = 3): + print ('********************************************') + print ('je passe dans MaFonction du catalogue metier') + print ('monArgument1 = ', monArgument1) + print ('monArgument2 = ', monArgument2) + print ('********************************************') + +# ---------------------------------------- + +import os, sys +if os.path.join(os.path.abspath(os.path.dirname(__file__)),'..') not in sys.path : + sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) +from InterfaceQT4.eficas_go import validateFonction + +#MaFonction('1er appel sans Validation') +#MaFonction(1) +MaFonction=validateFonction(MaFonction) +#MaFonction('1er appel texte avec validation') +MaFonction('1er appel texte avec validation', monArgument2= 33) +MaFonction(1) + diff --git a/CatasDeTests/exemple.xml b/CatasDeTests/exemple.xml new file mode 100644 index 00000000..e5a99c50 --- /dev/null +++ b/CatasDeTests/exemple.xml @@ -0,0 +1,10 @@ + + + + aa + + + aa + + + diff --git a/CatasDeTests/generateXML.py b/CatasDeTests/generateXML.py new file mode 100755 index 00000000..b84bb643 --- /dev/null +++ b/CatasDeTests/generateXML.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour Meteo +""" +# Modules Python +# Modules Eficas +import prefs +name='prefs_'+prefs.code +__import__(name) + +import sys +import os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'../..')) + +import prefs +from InterfaceQT4 import eficas_go +eficas_go.genereXML(code=prefs.code) diff --git a/CatasDeTests/generateXSD.py b/CatasDeTests/generateXSD.py new file mode 100755 index 00000000..de32610b --- /dev/null +++ b/CatasDeTests/generateXSD.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour Meteo +""" +# Modules Python +# Modules Eficas +import prefs +name='prefs_'+prefs.code +__import__(name) + +import sys +import os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'../..')) + +import prefs +from InterfaceQT4 import eficas_go +eficas_go.genereXSD(code=prefs.code) diff --git a/CatasDeTests/log b/CatasDeTests/log new file mode 100644 index 00000000..e63be550 --- /dev/null +++ b/CatasDeTests/log @@ -0,0 +1,32 @@ +avecEltAbstrait ------------------- False +self.importedBy ------------------- [] +self.code ------------------- Essai +self.implement ------------------- Essai +self.nomDuCodeDumpe ------------------- Essai +self.nomDuXsdPere ------------------- Essai +_________ dumpXsd___________ leProcV2 False True +_________ dumpXsd___________ leFactV21 True 1 +________________________ leFactV21 +_________ dumpXsd___________ ScalarV2 False True + + + + + + + + +fin ________________________ leFactV21 + + + + + + +_________ dumpXsd___________ leFactV21 True False +________________________ leFactV21 +_________ dumpXsd___________ ScalarV2 False True + + +fin ________________________ leFactV21 +__________________________ decommenter pour le texteXSD________________________ diff --git a/CatasDeTests/prefs.py b/CatasDeTests/prefs.py new file mode 100644 index 00000000..8eb6e5ee --- /dev/null +++ b/CatasDeTests/prefs.py @@ -0,0 +1,22 @@ +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +code="Essai" +import sys, os +if os.path.dirname(os.path.abspath(__file__)) not in sys.path : + sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/CatasDeTests/prefs_Essai.py b/CatasDeTests/prefs_Essai.py new file mode 100644 index 00000000..694afe00 --- /dev/null +++ b/CatasDeTests/prefs_Essai.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# maConfiguration MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +import os,sys +# repIni sert a localiser le fichier editeur.ini +# Obligatoire +repIni=os.path.dirname(os.path.abspath(__file__)) +INSTALLDIR=os.path.join(repIni,'..') +sys.path[:0]=[INSTALLDIR] + + +# lang indique la langue utilisee pour les chaines d'aide : fr ou ang +lang='fr' + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +encoding='iso-8859-1' + +# +#typeDeCata='XML' +catalogues=( + ('Essai','UserASSD',os.path.join(repIni,'cataListes.py'),'python','python'), +) +#nombreDeBoutonParLigne=4 +simpleClic=True +#closeFrameRechercheCommande=True +boutonDsMenuBar=False +#closeArbre=True +afficheListesPliees=False +#withXSD=True +afficheCommandesPliees = False +#dumpXSD=True +#afficheIhm=False diff --git a/CatasDeTests/qtEficasEssai.py b/CatasDeTests/qtEficasEssai.py new file mode 100755 index 00000000..4fcb6536 --- /dev/null +++ b/CatasDeTests/qtEficasEssai.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour MAP +""" +# Modules Python +# Modules Eficas +import prefs +name='prefs_'+prefs.code +__import__(name) + +import os, sys +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +import prefs +from InterfaceQT4 import eficas_go +print (prefs.code) +eficas_go.lanceEficas(code=prefs.code) diff --git a/CatasDeTests/raw/__init__.py b/CatasDeTests/raw/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/CatasDeTests/raw/cata_FactFreresMemesNoms_driver.py b/CatasDeTests/raw/cata_FactFreresMemesNoms_driver.py new file mode 100644 index 00000000..70befdf2 --- /dev/null +++ b/CatasDeTests/raw/cata_FactFreresMemesNoms_driver.py @@ -0,0 +1,359 @@ +# ./raw/cata_FactFreresMemesNoms_driver.py +# -*- coding: utf-8 -*- +# PyXB bindings for NM:9c3bd166183fcfc95687f415bcc4a066eb33ac79 +# Generated 2020-10-22 12:32:22.612163 by PyXB version 1.2.5 using Python 3.4.2.final.0 +# Namespace http://chercheurs.edf.com/logiciels/Essai + +from __future__ import unicode_literals +import pyxb +import pyxb.binding +import pyxb.binding.saxer +import io +import pyxb.utils.utility +import pyxb.utils.domutils +import sys +import pyxb.utils.six as _six +# Unique identifier for bindings created at the same time +_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:deafbfb4-1451-11eb-b347-cc3d82d871d8') + +# Version of PyXB used to generate the bindings +_PyXBVersion = '1.2.5' +# Generated bindings are not compatible across PyXB versions +if pyxb.__version__ != _PyXBVersion: + raise pyxb.PyXBVersionError(_PyXBVersion) + +# A holder for module-level binding classes so we can access them from +# inside class definitions where property names may conflict. +_module_typeBindings = pyxb.utils.utility.Object() + +# Import bindings for namespaces imported into schema +import pyxb.binding.datatypes + +# NOTE: All namespace declarations are reserved within the binding +Namespace = pyxb.namespace.NamespaceForURI('http://chercheurs.edf.com/logiciels/Essai', create_if_missing=True) +Namespace.configureCategories(['typeBinding', 'elementBinding']) + +def CreateFromDocument (xml_text, default_namespace=None, location_base=None): + """Parse the given XML and use the document element to create a + Python instance. + + @param xml_text An XML document. This should be data (Python 2 + str or Python 3 bytes), or a text (Python 2 unicode or Python 3 + str) in the L{pyxb._InputEncoding} encoding. + + @keyword default_namespace The L{pyxb.Namespace} instance to use as the + default namespace where there is no default namespace in scope. + If unspecified or C{None}, the namespace of the module containing + this function will be used. + + @keyword location_base: An object to be recorded as the base of all + L{pyxb.utils.utility.Location} instances associated with events and + objects handled by the parser. You might pass the URI from which + the document was obtained. + """ + + if pyxb.XMLStyle_saxer != pyxb._XMLStyle: + dom = pyxb.utils.domutils.StringToDOM(xml_text) + return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) + if default_namespace is None: + default_namespace = Namespace.fallbackNamespace() + saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) + handler = saxer.getContentHandler() + xmld = xml_text + if isinstance(xmld, _six.text_type): + xmld = xmld.encode(pyxb._InputEncoding) + saxer.parse(io.BytesIO(xmld)) + instance = handler.rootObject() + return instance + +def CreateFromDOM (node, default_namespace=None): + """Create a Python instance from the given DOM node. + The node tag must correspond to an element declaration in this module. + + @deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" + if default_namespace is None: + default_namespace = Namespace.fallbackNamespace() + return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) + + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_unSimp +class T_unSimp (pyxb.binding.datatypes.int): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_unSimp') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 7, 1) + _Documentation = None +T_unSimp._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_unSimp', T_unSimp) +_module_typeBindings.T_unSimp = T_unSimp + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_Name +class T_Name (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_Name') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 11, 1) + _Documentation = None +T_Name._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_Name', T_Name) +_module_typeBindings.T_Name = T_Name + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_ScalarFluxModel +class T_ScalarFluxModel (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_ScalarFluxModel') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 15, 1) + _Documentation = None +T_ScalarFluxModel._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_ScalarFluxModel', T_ScalarFluxModel) +_module_typeBindings.T_ScalarFluxModel = T_ScalarFluxModel + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_leFact1 with content type ELEMENT_ONLY +class T_leFact1 (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_leFact1 with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_leFact1') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 24, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/Essai}Name uses Python identifier Name + __Name = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'Name'), 'Name', '__httpchercheurs_edf_comlogicielsEssai_T_leFact1_httpchercheurs_edf_comlogicielsEssaiName', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 27, 3), ) + + + Name = property(__Name.value, __Name.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/Essai}ScalarFluxModel uses Python identifier ScalarFluxModel + __ScalarFluxModel = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'ScalarFluxModel'), 'ScalarFluxModel', '__httpchercheurs_edf_comlogicielsEssai_T_leFact1_httpchercheurs_edf_comlogicielsEssaiScalarFluxModel', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 28, 3), ) + + + ScalarFluxModel = property(__ScalarFluxModel.value, __ScalarFluxModel.set, None, None) + + _ElementMap.update({ + __Name.name() : __Name, + __ScalarFluxModel.name() : __ScalarFluxModel + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_leFact1 = T_leFact1 +Namespace.addCategoryObject('typeBinding', 'T_leFact1', T_leFact1) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_step_Essai with content type EMPTY +class T_step_Essai (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_step_Essai with content type EMPTY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY + _Abstract = True + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_step_Essai') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 46, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + _ElementMap.update({ + + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_step_Essai = T_step_Essai +Namespace.addCategoryObject('typeBinding', 'T_step_Essai', T_step_Essai) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_Essai with content type ELEMENT_ONLY +class T_Essai (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_Essai with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_Essai') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 49, 2) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/Essai}step_Essai uses Python identifier step_Essai + __step_Essai = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'step_Essai'), 'step_Essai', '__httpchercheurs_edf_comlogicielsEssai_T_Essai_httpchercheurs_edf_comlogicielsEssaistep_Essai', True, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 47, 1), ) + + + step_Essai = property(__step_Essai.value, __step_Essai.set, None, None) + + _ElementMap.update({ + __step_Essai.name() : __step_Essai + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_Essai = T_Essai +Namespace.addCategoryObject('typeBinding', 'T_Essai', T_Essai) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_leProc with content type ELEMENT_ONLY +class T_leProc (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_leProc with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_leProc') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 35, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}leFact1 uses Python identifier leFact1 + __leFact1 = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'leFact1'), 'leFact1', '__httpchercheurs_edf_comlogicielsEssai_T_leProc_httpchercheurs_edf_comlogicielsEssaileFact1', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 21, 3), ) + + + leFact1 = property(__leFact1.value, __leFact1.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/Essai}unSimp uses Python identifier unSimp + __unSimp = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'unSimp'), 'unSimp', '__httpchercheurs_edf_comlogicielsEssai_T_leProc_httpchercheurs_edf_comlogicielsEssaiunSimp', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 39, 3), ) + + + unSimp = property(__unSimp.value, __unSimp.set, None, None) + + _ElementMap.update({ + __leFact1.name() : __leFact1, + __unSimp.name() : __unSimp + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_leProc = T_leProc +Namespace.addCategoryObject('typeBinding', 'T_leProc', T_leProc) + + +step_Essai = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'step_Essai'), T_step_Essai, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 47, 1)) +Namespace.addCategoryObject('elementBinding', step_Essai.name().localName(), step_Essai) + +Essai = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Essai'), T_Essai, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 48, 1)) +Namespace.addCategoryObject('elementBinding', Essai.name().localName(), Essai) + +leProc = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'leProc'), T_leProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 45, 1)) +Namespace.addCategoryObject('elementBinding', leProc.name().localName(), leProc) + + + +T_leFact1._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Name'), T_Name, scope=T_leFact1, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 27, 3))) + +T_leFact1._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'ScalarFluxModel'), T_ScalarFluxModel, scope=T_leFact1, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 28, 3))) + +def _BuildAutomaton (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton + del _BuildAutomaton + import pyxb.utils.fac as fac + + counters = set() + states = [] + final_update = None + symbol = pyxb.binding.content.ElementUse(T_leFact1._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'Name')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 27, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_leFact1._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'ScalarFluxModel')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 28, 3)) + st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_leFact1._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'Name')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 31, 3)) + st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_2) + transitions = [] + transitions.append(fac.Transition(st_1, [ + ])) + st_0._set_transitionSet(transitions) + transitions = [] + st_1._set_transitionSet(transitions) + transitions = [] + st_2._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_leFact1._Automaton = _BuildAutomaton() + + + + +T_Essai._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'step_Essai'), T_step_Essai, scope=T_Essai, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 47, 1))) + +def _BuildAutomaton_ (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_ + del _BuildAutomaton_ + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 50, 4)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 51, 3)) + counters.add(cc_1) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + final_update.add(fac.UpdateInstruction(cc_1, False)) + symbol = pyxb.binding.content.ElementUse(T_Essai._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'step_Essai')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 51, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True), + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_1, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_Essai._Automaton = _BuildAutomaton_() + + + + +T_leProc._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'leFact1'), T_leFact1, scope=T_leProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 21, 3))) + +T_leProc._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'unSimp'), T_unSimp, scope=T_leProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 39, 3))) + +def _BuildAutomaton_2 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_2 + del _BuildAutomaton_2 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 40, 3)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 21, 3)) + counters.add(cc_1) + states = [] + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_leProc._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'unSimp')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 39, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + final_update.add(fac.UpdateInstruction(cc_1, False)) + symbol = pyxb.binding.content.ElementUse(T_leProc._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'leFact1')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_FactFreresMemesNoms.xsd', 21, 3)) + st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + transitions = [] + transitions.append(fac.Transition(st_1, [ + ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, True), + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_1, True) ])) + st_1._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_leProc._Automaton = _BuildAutomaton_2() + + +leProc._setSubstitutionGroup(step_Essai) diff --git a/CatasDeTests/raw/cata_UserAssd2_driver.py b/CatasDeTests/raw/cata_UserAssd2_driver.py new file mode 100644 index 00000000..5927f1f2 --- /dev/null +++ b/CatasDeTests/raw/cata_UserAssd2_driver.py @@ -0,0 +1,917 @@ +# ./raw/cata_UserAssd2_driver.py +# -*- coding: utf-8 -*- +# PyXB bindings for NM:9c3bd166183fcfc95687f415bcc4a066eb33ac79 +# Generated 2020-10-14 16:20:43.053836 by PyXB version 1.2.5 using Python 3.4.2.final.0 +# Namespace http://chercheurs.edf.com/logiciels/Essai + +from __future__ import unicode_literals +import pyxb +import pyxb.binding +import pyxb.binding.saxer +import io +import pyxb.utils.utility +import pyxb.utils.domutils +import sys +import pyxb.utils.six as _six +# Unique identifier for bindings created at the same time +_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:71791ae6-0e28-11eb-9ba5-cc3d82d871d8') + +# Version of PyXB used to generate the bindings +_PyXBVersion = '1.2.5' +# Generated bindings are not compatible across PyXB versions +if pyxb.__version__ != _PyXBVersion: + raise pyxb.PyXBVersionError(_PyXBVersion) + +# A holder for module-level binding classes so we can access them from +# inside class definitions where property names may conflict. +_module_typeBindings = pyxb.utils.utility.Object() + +# Import bindings for namespaces imported into schema +import pyxb.binding.datatypes + +# NOTE: All namespace declarations are reserved within the binding +Namespace = pyxb.namespace.NamespaceForURI('http://chercheurs.edf.com/logiciels/Essai', create_if_missing=True) +Namespace.configureCategories(['typeBinding', 'elementBinding']) + +def CreateFromDocument (xml_text, default_namespace=None, location_base=None): + """Parse the given XML and use the document element to create a + Python instance. + + @param xml_text An XML document. This should be data (Python 2 + str or Python 3 bytes), or a text (Python 2 unicode or Python 3 + str) in the L{pyxb._InputEncoding} encoding. + + @keyword default_namespace The L{pyxb.Namespace} instance to use as the + default namespace where there is no default namespace in scope. + If unspecified or C{None}, the namespace of the module containing + this function will be used. + + @keyword location_base: An object to be recorded as the base of all + L{pyxb.utils.utility.Location} instances associated with events and + objects handled by the parser. You might pass the URI from which + the document was obtained. + """ + + if pyxb.XMLStyle_saxer != pyxb._XMLStyle: + dom = pyxb.utils.domutils.StringToDOM(xml_text) + return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) + if default_namespace is None: + default_namespace = Namespace.fallbackNamespace() + saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) + handler = saxer.getContentHandler() + xmld = xml_text + if isinstance(xmld, _six.text_type): + xmld = xmld.encode(pyxb._InputEncoding) + saxer.parse(io.BytesIO(xmld)) + instance = handler.rootObject() + return instance + +def CreateFromDOM (node, default_namespace=None): + """Create a Python instance from the given DOM node. + The node tag must correspond to an element declaration in this module. + + @deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" + if default_namespace is None: + default_namespace = Namespace.fallbackNamespace() + return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) + + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_creeUserAssd +class T_creeUserAssd (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_creeUserAssd') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 7, 1) + _Documentation = None +T_creeUserAssd._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_creeUserAssd', T_creeUserAssd) +_module_typeBindings.T_creeUserAssd = T_creeUserAssd + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_creeUserAssd2 +class T_creeUserAssd2 (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_creeUserAssd2') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 11, 1) + _Documentation = None +T_creeUserAssd2._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_creeUserAssd2', T_creeUserAssd2) +_module_typeBindings.T_creeUserAssd2 = T_creeUserAssd2 + +# Atomic simple type: [anonymous] +class STD_ANON (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 22, 5) + _Documentation = None +STD_ANON._InitializeFacetMap() +_module_typeBindings.STD_ANON = STD_ANON + +# Atomic simple type: [anonymous] +class STD_ANON_ (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 34, 5) + _Documentation = None +STD_ANON_._InitializeFacetMap() +_module_typeBindings.STD_ANON_ = STD_ANON_ + +# Atomic simple type: [anonymous] +class STD_ANON_2 (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 46, 5) + _Documentation = None +STD_ANON_2._InitializeFacetMap() +_module_typeBindings.STD_ANON_2 = STD_ANON_2 + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}PNEFdico_Essai +class PNEFdico_Essai (pyxb.binding.datatypes.string): + + """{'T_creeUserAssd': {'_creeUserAssd_DefinitionDsSimpListe': 'T_creeUserAssd_4'}} + """ + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'PNEFdico_Essai') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 177, 1) + _Documentation = "{'T_creeUserAssd': {'_creeUserAssd_DefinitionDsSimpListe': 'T_creeUserAssd_4'}}\n\t\t" +PNEFdico_Essai._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'PNEFdico_Essai', PNEFdico_Essai) +_module_typeBindings.PNEFdico_Essai = PNEFdico_Essai + +# List simple type: [anonymous] +# superclasses pyxb.binding.datatypes.anySimpleType +class STD_ANON_3 (pyxb.binding.basis.STD_list): + + """Simple type that is a list of STD_ANON.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 20, 3) + _Documentation = None + + _ItemType = STD_ANON +STD_ANON_3._InitializeFacetMap() +_module_typeBindings.STD_ANON_3 = STD_ANON_3 + +# List simple type: [anonymous] +# superclasses pyxb.binding.datatypes.anySimpleType +class STD_ANON_4 (pyxb.binding.basis.STD_list): + + """Simple type that is a list of STD_ANON_.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 32, 3) + _Documentation = None + + _ItemType = STD_ANON_ +STD_ANON_4._InitializeFacetMap() +_module_typeBindings.STD_ANON_4 = STD_ANON_4 + +# List simple type: [anonymous] +# superclasses pyxb.binding.datatypes.anySimpleType +class STD_ANON_5 (pyxb.binding.basis.STD_list): + + """Simple type that is a list of STD_ANON_2.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 44, 3) + _Documentation = None + + _ItemType = STD_ANON_2 +STD_ANON_5._InitializeFacetMap() +_module_typeBindings.STD_ANON_5 = STD_ANON_5 + +# List simple type: {http://chercheurs.edf.com/logiciels/Essai}T_creeUserAssd_4 +# superclasses STD_ANON_3 +class T_creeUserAssd_4 (pyxb.binding.basis.STD_list): + + """Simple type that is a list of STD_ANON.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_creeUserAssd_4') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 18, 1) + _Documentation = None + + _ItemType = STD_ANON +T_creeUserAssd_4._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_creeUserAssd_4', T_creeUserAssd_4) +_module_typeBindings.T_creeUserAssd_4 = T_creeUserAssd_4 + +# List simple type: {http://chercheurs.edf.com/logiciels/Essai}T_utiliseUserAssd +# superclasses STD_ANON_4 +class T_utiliseUserAssd (pyxb.binding.basis.STD_list): + + """Simple type that is a list of STD_ANON_.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_utiliseUserAssd') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 30, 1) + _Documentation = None + + _ItemType = STD_ANON_ +T_utiliseUserAssd._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_utiliseUserAssd', T_utiliseUserAssd) +_module_typeBindings.T_utiliseUserAssd = T_utiliseUserAssd + +# List simple type: {http://chercheurs.edf.com/logiciels/Essai}T_utiliseListeUneListeUserAssd +# superclasses STD_ANON_5 +class T_utiliseListeUneListeUserAssd (pyxb.binding.basis.STD_list): + + """Simple type that is a list of STD_ANON_2.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_utiliseListeUneListeUserAssd') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 42, 1) + _Documentation = None + + _ItemType = STD_ANON_2 +T_utiliseListeUneListeUserAssd._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_utiliseListeUneListeUserAssd', T_utiliseListeUneListeUserAssd) +_module_typeBindings.T_utiliseListeUneListeUserAssd = T_utiliseListeUneListeUserAssd + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_unFact1 with content type ELEMENT_ONLY +class T_unFact1 (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_unFact1 with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_unFact1') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 54, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/Essai}creeUserAssd uses Python identifier creeUserAssd + __creeUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), 'creeUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_unFact1_httpchercheurs_edf_comlogicielsEssaicreeUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 56, 3), ) + + + creeUserAssd = property(__creeUserAssd.value, __creeUserAssd.set, None, None) + + _ElementMap.update({ + __creeUserAssd.name() : __creeUserAssd + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_unFact1 = T_unFact1 +Namespace.addCategoryObject('typeBinding', 'T_unFact1', T_unFact1) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_unFact with content type ELEMENT_ONLY +class T_unFact (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_unFact with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_unFact') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 75, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/Essai}creeUserAssd uses Python identifier creeUserAssd + __creeUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), 'creeUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_unFact_httpchercheurs_edf_comlogicielsEssaicreeUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 77, 3), ) + + + creeUserAssd = property(__creeUserAssd.value, __creeUserAssd.set, None, None) + + _ElementMap.update({ + __creeUserAssd.name() : __creeUserAssd + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_unFact = T_unFact +Namespace.addCategoryObject('typeBinding', 'T_unFact', T_unFact) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_step_Essai with content type EMPTY +class T_step_Essai (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_step_Essai with content type EMPTY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY + _Abstract = True + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_step_Essai') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 169, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + _ElementMap.update({ + + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_step_Essai = T_step_Essai +Namespace.addCategoryObject('typeBinding', 'T_step_Essai', T_step_Essai) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_Essai with content type ELEMENT_ONLY +class T_Essai (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_Essai with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_Essai') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 172, 2) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/Essai}step_Essai uses Python identifier step_Essai + __step_Essai = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'step_Essai'), 'step_Essai', '__httpchercheurs_edf_comlogicielsEssai_T_Essai_httpchercheurs_edf_comlogicielsEssaistep_Essai', True, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 170, 1), ) + + + step_Essai = property(__step_Essai.value, __step_Essai.set, None, None) + + _ElementMap.update({ + __step_Essai.name() : __step_Essai + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_Essai = T_Essai +Namespace.addCategoryObject('typeBinding', 'T_Essai', T_Essai) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsFactDsOper with content type ELEMENT_ONLY +class T_DefinitionDsFactDsOper (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsFactDsOper with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_DefinitionDsFactDsOper') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 63, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}unFact1 uses Python identifier unFact1 + __unFact1 = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'unFact1'), 'unFact1', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsFactDsOper_httpchercheurs_edf_comlogicielsEssaiunFact1', True, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 67, 3), ) + + + unFact1 = property(__unFact1.value, __unFact1.set, None, None) + + + # Attribute name uses Python identifier name + __name = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'name'), 'name', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsFactDsOper_name', pyxb.binding.datatypes.string) + __name._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 69, 2) + __name._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 69, 2) + + name = property(__name.value, __name.set, None, None) + + + # Attribute accasType uses Python identifier accasType + __accasType = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'accasType'), 'accasType', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsFactDsOper_accasType', pyxb.binding.datatypes.string, fixed=True, unicode_default='ASSD') + __accasType._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 70, 2) + __accasType._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 70, 2) + + accasType = property(__accasType.value, __accasType.set, None, None) + + + # Attribute typeUtilisateur uses Python identifier typeUtilisateur + __typeUtilisateur = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'typeUtilisateur'), 'typeUtilisateur', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsFactDsOper_typeUtilisateur', pyxb.binding.datatypes.string, fixed=True, unicode_default='lASSD') + __typeUtilisateur._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 71, 2) + __typeUtilisateur._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 71, 2) + + typeUtilisateur = property(__typeUtilisateur.value, __typeUtilisateur.set, None, None) + + _ElementMap.update({ + __unFact1.name() : __unFact1 + }) + _AttributeMap.update({ + __name.name() : __name, + __accasType.name() : __accasType, + __typeUtilisateur.name() : __typeUtilisateur + }) +_module_typeBindings.T_DefinitionDsFactDsOper = T_DefinitionDsFactDsOper +Namespace.addCategoryObject('typeBinding', 'T_DefinitionDsFactDsOper', T_DefinitionDsFactDsOper) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsFactDsProc with content type ELEMENT_ONLY +class T_DefinitionDsFactDsProc (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsFactDsProc with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_DefinitionDsFactDsProc') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 84, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}unFact uses Python identifier unFact + __unFact = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'unFact'), 'unFact', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsFactDsProc_httpchercheurs_edf_comlogicielsEssaiunFact', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 88, 3), ) + + + unFact = property(__unFact.value, __unFact.set, None, None) + + _ElementMap.update({ + __unFact.name() : __unFact + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_DefinitionDsFactDsProc = T_DefinitionDsFactDsProc +Namespace.addCategoryObject('typeBinding', 'T_DefinitionDsFactDsProc', T_DefinitionDsFactDsProc) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsSimpDsOper with content type ELEMENT_ONLY +class T_DefinitionDsSimpDsOper (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsSimpDsOper with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_DefinitionDsSimpDsOper') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 93, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}creeUserAssd uses Python identifier creeUserAssd + __creeUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), 'creeUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsSimpDsOper_httpchercheurs_edf_comlogicielsEssaicreeUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 97, 3), ) + + + creeUserAssd = property(__creeUserAssd.value, __creeUserAssd.set, None, None) + + + # Attribute name uses Python identifier name + __name = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'name'), 'name', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsSimpDsOper_name', pyxb.binding.datatypes.string) + __name._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 103, 2) + __name._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 103, 2) + + name = property(__name.value, __name.set, None, None) + + + # Attribute accasType uses Python identifier accasType + __accasType = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'accasType'), 'accasType', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsSimpDsOper_accasType', pyxb.binding.datatypes.string, fixed=True, unicode_default='ASSD') + __accasType._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 104, 2) + __accasType._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 104, 2) + + accasType = property(__accasType.value, __accasType.set, None, None) + + + # Attribute typeUtilisateur uses Python identifier typeUtilisateur + __typeUtilisateur = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'typeUtilisateur'), 'typeUtilisateur', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsSimpDsOper_typeUtilisateur', pyxb.binding.datatypes.string, fixed=True, unicode_default='lASSD') + __typeUtilisateur._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 105, 2) + __typeUtilisateur._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 105, 2) + + typeUtilisateur = property(__typeUtilisateur.value, __typeUtilisateur.set, None, None) + + _ElementMap.update({ + __creeUserAssd.name() : __creeUserAssd + }) + _AttributeMap.update({ + __name.name() : __name, + __accasType.name() : __accasType, + __typeUtilisateur.name() : __typeUtilisateur + }) +_module_typeBindings.T_DefinitionDsSimpDsOper = T_DefinitionDsSimpDsOper +Namespace.addCategoryObject('typeBinding', 'T_DefinitionDsSimpDsOper', T_DefinitionDsSimpDsOper) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsSimpDsProc with content type ELEMENT_ONLY +class T_DefinitionDsSimpDsProc (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsSimpDsProc with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_DefinitionDsSimpDsProc') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 109, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}creeUserAssd uses Python identifier creeUserAssd + __creeUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), 'creeUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsSimpDsProc_httpchercheurs_edf_comlogicielsEssaicreeUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 113, 3), ) + + + creeUserAssd = property(__creeUserAssd.value, __creeUserAssd.set, None, None) + + _ElementMap.update({ + __creeUserAssd.name() : __creeUserAssd + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_DefinitionDsSimpDsProc = T_DefinitionDsSimpDsProc +Namespace.addCategoryObject('typeBinding', 'T_DefinitionDsSimpDsProc', T_DefinitionDsSimpDsProc) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsSimpListe with content type ELEMENT_ONLY +class T_DefinitionDsSimpListe (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsSimpListe with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_DefinitionDsSimpListe') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 118, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}creeUserAssd uses Python identifier creeUserAssd + __creeUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), 'creeUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsSimpListe_httpchercheurs_edf_comlogicielsEssaicreeUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 122, 3), ) + + + creeUserAssd = property(__creeUserAssd.value, __creeUserAssd.set, None, None) + + _ElementMap.update({ + __creeUserAssd.name() : __creeUserAssd + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_DefinitionDsSimpListe = T_DefinitionDsSimpListe +Namespace.addCategoryObject('typeBinding', 'T_DefinitionDsSimpListe', T_DefinitionDsSimpListe) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_UtiliseEtDefinitDsLeMemeProc with content type ELEMENT_ONLY +class T_UtiliseEtDefinitDsLeMemeProc (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_UtiliseEtDefinitDsLeMemeProc with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_UtiliseEtDefinitDsLeMemeProc') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 131, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}utiliseUserAssd uses Python identifier utiliseUserAssd + __utiliseUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'utiliseUserAssd'), 'utiliseUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_UtiliseEtDefinitDsLeMemeProc_httpchercheurs_edf_comlogicielsEssaiutiliseUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 135, 3), ) + + + utiliseUserAssd = property(__utiliseUserAssd.value, __utiliseUserAssd.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/Essai}creeUserAssd uses Python identifier creeUserAssd + __creeUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), 'creeUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_UtiliseEtDefinitDsLeMemeProc_httpchercheurs_edf_comlogicielsEssaicreeUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 140, 3), ) + + + creeUserAssd = property(__creeUserAssd.value, __creeUserAssd.set, None, None) + + _ElementMap.update({ + __utiliseUserAssd.name() : __utiliseUserAssd, + __creeUserAssd.name() : __creeUserAssd + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_UtiliseEtDefinitDsLeMemeProc = T_UtiliseEtDefinitDsLeMemeProc +Namespace.addCategoryObject('typeBinding', 'T_UtiliseEtDefinitDsLeMemeProc', T_UtiliseEtDefinitDsLeMemeProc) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_UtiliseUserAssD with content type ELEMENT_ONLY +class T_UtiliseUserAssD (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_UtiliseUserAssD with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_UtiliseUserAssD') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 149, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}utiliseListeUneListeUserAssd uses Python identifier utiliseListeUneListeUserAssd + __utiliseListeUneListeUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'utiliseListeUneListeUserAssd'), 'utiliseListeUneListeUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_UtiliseUserAssD_httpchercheurs_edf_comlogicielsEssaiutiliseListeUneListeUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 153, 3), ) + + + utiliseListeUneListeUserAssd = property(__utiliseListeUneListeUserAssd.value, __utiliseListeUneListeUserAssd.set, None, None) + + _ElementMap.update({ + __utiliseListeUneListeUserAssd.name() : __utiliseListeUneListeUserAssd + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_UtiliseUserAssD = T_UtiliseUserAssD +Namespace.addCategoryObject('typeBinding', 'T_UtiliseUserAssD', T_UtiliseUserAssD) + + +step_Essai = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'step_Essai'), T_step_Essai, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 170, 1)) +Namespace.addCategoryObject('elementBinding', step_Essai.name().localName(), step_Essai) + +Essai = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Essai'), T_Essai, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 171, 1)) +Namespace.addCategoryObject('elementBinding', Essai.name().localName(), Essai) + +DefinitionDsFactDsOper = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'DefinitionDsFactDsOper'), T_DefinitionDsFactDsOper, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 162, 1)) +Namespace.addCategoryObject('elementBinding', DefinitionDsFactDsOper.name().localName(), DefinitionDsFactDsOper) + +DefinitionDsFactDsProc = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'DefinitionDsFactDsProc'), T_DefinitionDsFactDsProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 163, 1)) +Namespace.addCategoryObject('elementBinding', DefinitionDsFactDsProc.name().localName(), DefinitionDsFactDsProc) + +DefinitionDsSimpDsOper = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'DefinitionDsSimpDsOper'), T_DefinitionDsSimpDsOper, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 164, 1)) +Namespace.addCategoryObject('elementBinding', DefinitionDsSimpDsOper.name().localName(), DefinitionDsSimpDsOper) + +DefinitionDsSimpDsProc = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'DefinitionDsSimpDsProc'), T_DefinitionDsSimpDsProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 165, 1)) +Namespace.addCategoryObject('elementBinding', DefinitionDsSimpDsProc.name().localName(), DefinitionDsSimpDsProc) + +DefinitionDsSimpListe = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'DefinitionDsSimpListe'), T_DefinitionDsSimpListe, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 166, 1)) +Namespace.addCategoryObject('elementBinding', DefinitionDsSimpListe.name().localName(), DefinitionDsSimpListe) + +UtiliseEtDefinitDsLeMemeProc = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'UtiliseEtDefinitDsLeMemeProc'), T_UtiliseEtDefinitDsLeMemeProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 167, 1)) +Namespace.addCategoryObject('elementBinding', UtiliseEtDefinitDsLeMemeProc.name().localName(), UtiliseEtDefinitDsLeMemeProc) + +UtiliseUserAssD = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'UtiliseUserAssD'), T_UtiliseUserAssD, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 168, 1)) +Namespace.addCategoryObject('elementBinding', UtiliseUserAssD.name().localName(), UtiliseUserAssD) + + + +T_unFact1._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), T_creeUserAssd, scope=T_unFact1, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 56, 3))) + +def _BuildAutomaton (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton + del _BuildAutomaton + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 56, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_unFact1._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 56, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_unFact1._Automaton = _BuildAutomaton() + + + + +T_unFact._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), T_creeUserAssd, scope=T_unFact, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 77, 3))) + +def _BuildAutomaton_ (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_ + del _BuildAutomaton_ + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 77, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_unFact._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 77, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_unFact._Automaton = _BuildAutomaton_() + + + + +T_Essai._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'step_Essai'), T_step_Essai, scope=T_Essai, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 170, 1))) + +def _BuildAutomaton_2 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_2 + del _BuildAutomaton_2 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 173, 4)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 174, 3)) + counters.add(cc_1) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + final_update.add(fac.UpdateInstruction(cc_1, False)) + symbol = pyxb.binding.content.ElementUse(T_Essai._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'step_Essai')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 174, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True), + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_1, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_Essai._Automaton = _BuildAutomaton_2() + + + + +T_DefinitionDsFactDsOper._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'unFact1'), T_unFact1, scope=T_DefinitionDsFactDsOper, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 67, 3))) + +def _BuildAutomaton_3 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_3 + del _BuildAutomaton_3 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 67, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_DefinitionDsFactDsOper._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'unFact1')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 67, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_DefinitionDsFactDsOper._Automaton = _BuildAutomaton_3() + + + + +T_DefinitionDsFactDsProc._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'unFact'), T_unFact, scope=T_DefinitionDsFactDsProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 88, 3))) + +def _BuildAutomaton_4 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_4 + del _BuildAutomaton_4 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 88, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_DefinitionDsFactDsProc._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'unFact')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 88, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_DefinitionDsFactDsProc._Automaton = _BuildAutomaton_4() + + + + +T_DefinitionDsSimpDsOper._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), T_creeUserAssd, scope=T_DefinitionDsSimpDsOper, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 97, 3))) + +def _BuildAutomaton_5 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_5 + del _BuildAutomaton_5 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 97, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_DefinitionDsSimpDsOper._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 97, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_DefinitionDsSimpDsOper._Automaton = _BuildAutomaton_5() + + + + +T_DefinitionDsSimpDsProc._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), T_creeUserAssd, scope=T_DefinitionDsSimpDsProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 113, 3))) + +def _BuildAutomaton_6 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_6 + del _BuildAutomaton_6 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 113, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_DefinitionDsSimpDsProc._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 113, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_DefinitionDsSimpDsProc._Automaton = _BuildAutomaton_6() + + + + +T_DefinitionDsSimpListe._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), T_creeUserAssd_4, scope=T_DefinitionDsSimpListe, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 122, 3))) + +def _BuildAutomaton_7 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_7 + del _BuildAutomaton_7 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 122, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_DefinitionDsSimpListe._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 122, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_DefinitionDsSimpListe._Automaton = _BuildAutomaton_7() + + + + +T_UtiliseEtDefinitDsLeMemeProc._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'utiliseUserAssd'), T_utiliseUserAssd, scope=T_UtiliseEtDefinitDsLeMemeProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 135, 3))) + +T_UtiliseEtDefinitDsLeMemeProc._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), T_creeUserAssd, scope=T_UtiliseEtDefinitDsLeMemeProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 140, 3))) + +def _BuildAutomaton_8 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_8 + del _BuildAutomaton_8 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 140, 3)) + counters.add(cc_0) + states = [] + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_UtiliseEtDefinitDsLeMemeProc._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'utiliseUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 135, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_UtiliseEtDefinitDsLeMemeProc._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 140, 3)) + st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + transitions = [] + transitions.append(fac.Transition(st_1, [ + ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, True) ])) + st_1._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_UtiliseEtDefinitDsLeMemeProc._Automaton = _BuildAutomaton_8() + + + + +T_UtiliseUserAssD._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'utiliseListeUneListeUserAssd'), T_utiliseListeUneListeUserAssd, scope=T_UtiliseUserAssD, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 153, 3))) + +def _BuildAutomaton_9 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_9 + del _BuildAutomaton_9 + import pyxb.utils.fac as fac + + counters = set() + states = [] + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_UtiliseUserAssD._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'utiliseListeUneListeUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd2.xsd', 153, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_UtiliseUserAssD._Automaton = _BuildAutomaton_9() + + +DefinitionDsFactDsOper._setSubstitutionGroup(step_Essai) + +DefinitionDsFactDsProc._setSubstitutionGroup(step_Essai) + +DefinitionDsSimpDsOper._setSubstitutionGroup(step_Essai) + +DefinitionDsSimpDsProc._setSubstitutionGroup(step_Essai) + +DefinitionDsSimpListe._setSubstitutionGroup(step_Essai) + +UtiliseEtDefinitDsLeMemeProc._setSubstitutionGroup(step_Essai) + +UtiliseUserAssD._setSubstitutionGroup(step_Essai) diff --git a/CatasDeTests/raw/cata_UserAssd_driver.py b/CatasDeTests/raw/cata_UserAssd_driver.py new file mode 100644 index 00000000..f9a8fbbf --- /dev/null +++ b/CatasDeTests/raw/cata_UserAssd_driver.py @@ -0,0 +1,937 @@ +# ./raw/cata_UserAssd_driver.py +# -*- coding: utf-8 -*- +# PyXB bindings for NM:9c3bd166183fcfc95687f415bcc4a066eb33ac79 +# Generated 2020-10-19 16:07:37.824784 by PyXB version 1.2.5 using Python 3.4.2.final.0 +# Namespace http://chercheurs.edf.com/logiciels/Essai + +from __future__ import unicode_literals +import pyxb +import pyxb.binding +import pyxb.binding.saxer +import io +import pyxb.utils.utility +import pyxb.utils.domutils +import sys +import pyxb.utils.six as _six +# Unique identifier for bindings created at the same time +_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:7181a702-1214-11eb-a804-cc3d82d871d8') + +# Version of PyXB used to generate the bindings +_PyXBVersion = '1.2.5' +# Generated bindings are not compatible across PyXB versions +if pyxb.__version__ != _PyXBVersion: + raise pyxb.PyXBVersionError(_PyXBVersion) + +# A holder for module-level binding classes so we can access them from +# inside class definitions where property names may conflict. +_module_typeBindings = pyxb.utils.utility.Object() + +# Import bindings for namespaces imported into schema +import pyxb.binding.datatypes + +# NOTE: All namespace declarations are reserved within the binding +Namespace = pyxb.namespace.NamespaceForURI('http://chercheurs.edf.com/logiciels/Essai', create_if_missing=True) +Namespace.configureCategories(['typeBinding', 'elementBinding']) + +def CreateFromDocument (xml_text, default_namespace=None, location_base=None): + """Parse the given XML and use the document element to create a + Python instance. + + @param xml_text An XML document. This should be data (Python 2 + str or Python 3 bytes), or a text (Python 2 unicode or Python 3 + str) in the L{pyxb._InputEncoding} encoding. + + @keyword default_namespace The L{pyxb.Namespace} instance to use as the + default namespace where there is no default namespace in scope. + If unspecified or C{None}, the namespace of the module containing + this function will be used. + + @keyword location_base: An object to be recorded as the base of all + L{pyxb.utils.utility.Location} instances associated with events and + objects handled by the parser. You might pass the URI from which + the document was obtained. + """ + + if pyxb.XMLStyle_saxer != pyxb._XMLStyle: + dom = pyxb.utils.domutils.StringToDOM(xml_text) + return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) + if default_namespace is None: + default_namespace = Namespace.fallbackNamespace() + saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) + handler = saxer.getContentHandler() + xmld = xml_text + if isinstance(xmld, _six.text_type): + xmld = xmld.encode(pyxb._InputEncoding) + saxer.parse(io.BytesIO(xmld)) + instance = handler.rootObject() + return instance + +def CreateFromDOM (node, default_namespace=None): + """Create a Python instance from the given DOM node. + The node tag must correspond to an element declaration in this module. + + @deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" + if default_namespace is None: + default_namespace = Namespace.fallbackNamespace() + return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) + + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}AccasUserAssd +class AccasUserAssd (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'AccasUserAssd') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 7, 1) + _Documentation = None +AccasUserAssd._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'AccasUserAssd', AccasUserAssd) +_module_typeBindings.AccasUserAssd = AccasUserAssd + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}PNEFdico_Essai +class PNEFdico_Essai (pyxb.binding.datatypes.string): + + """{'T_creeUserAssd': {'_creeUserAssd_DefinitionDsSimpDsOper': 'T_creeUserAssd_2', '_creeUserAssd_DefinitionDsSimpListe': 'T_creeUserAssd_4'}} + """ + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'PNEFdico_Essai') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 154, 1) + _Documentation = "{'T_creeUserAssd': {'_creeUserAssd_DefinitionDsSimpDsOper': 'T_creeUserAssd_2', '_creeUserAssd_DefinitionDsSimpListe': 'T_creeUserAssd_4'}}\n\t\t" +PNEFdico_Essai._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'PNEFdico_Essai', PNEFdico_Essai) +_module_typeBindings.PNEFdico_Essai = PNEFdico_Essai + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}laClasseUser_C +class laClasseUser_C (AccasUserAssd): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'laClasseUser_C') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 11, 1) + _Documentation = None +laClasseUser_C._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'laClasseUser_C', laClasseUser_C) +_module_typeBindings.laClasseUser_C = laClasseUser_C + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}laClasseUserDerive_C +class laClasseUserDerive_C (AccasUserAssd): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'laClasseUserDerive_C') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 19, 1) + _Documentation = None +laClasseUserDerive_C._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'laClasseUserDerive_C', laClasseUserDerive_C) +_module_typeBindings.laClasseUserDerive_C = laClasseUserDerive_C + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}laClasseUser_U +class laClasseUser_U (AccasUserAssd): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'laClasseUser_U') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 39, 1) + _Documentation = None +laClasseUser_U._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'laClasseUser_U', laClasseUser_U) +_module_typeBindings.laClasseUser_U = laClasseUser_U + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_creeUserAssd +class T_creeUserAssd (laClasseUser_C): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_creeUserAssd') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 15, 1) + _Documentation = None +T_creeUserAssd._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_creeUserAssd', T_creeUserAssd) +_module_typeBindings.T_creeUserAssd = T_creeUserAssd + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_creeUserAssd_2 +class T_creeUserAssd_2 (laClasseUserDerive_C): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_creeUserAssd_2') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 23, 1) + _Documentation = None +T_creeUserAssd_2._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_creeUserAssd_2', T_creeUserAssd_2) +_module_typeBindings.T_creeUserAssd_2 = T_creeUserAssd_2 + +# Atomic simple type: [anonymous] +class STD_ANON (laClasseUser_C): + + """An atomic simple type.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 31, 5) + _Documentation = None +STD_ANON._InitializeFacetMap() +_module_typeBindings.STD_ANON = STD_ANON + +# Atomic simple type: [anonymous] +class STD_ANON_ (laClasseUser_U): + + """An atomic simple type.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 47, 5) + _Documentation = None +STD_ANON_._InitializeFacetMap() +_module_typeBindings.STD_ANON_ = STD_ANON_ + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_utiliseUnUserAssd +class T_utiliseUnUserAssd (laClasseUser_U): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_utiliseUnUserAssd') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 55, 1) + _Documentation = None +T_utiliseUnUserAssd._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_utiliseUnUserAssd', T_utiliseUnUserAssd) +_module_typeBindings.T_utiliseUnUserAssd = T_utiliseUnUserAssd + +# List simple type: [anonymous] +# superclasses pyxb.binding.datatypes.anySimpleType +class STD_ANON_2 (pyxb.binding.basis.STD_list): + + """Simple type that is a list of STD_ANON.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 29, 3) + _Documentation = None + + _ItemType = STD_ANON +STD_ANON_2._InitializeFacetMap() +_module_typeBindings.STD_ANON_2 = STD_ANON_2 + +# List simple type: [anonymous] +# superclasses pyxb.binding.datatypes.anySimpleType +class STD_ANON_3 (pyxb.binding.basis.STD_list): + + """Simple type that is a list of STD_ANON_.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 45, 3) + _Documentation = None + + _ItemType = STD_ANON_ +STD_ANON_3._InitializeFacetMap() +_module_typeBindings.STD_ANON_3 = STD_ANON_3 + +# List simple type: {http://chercheurs.edf.com/logiciels/Essai}T_creeUserAssd_4 +# superclasses STD_ANON_2 +class T_creeUserAssd_4 (pyxb.binding.basis.STD_list): + + """Simple type that is a list of STD_ANON.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_creeUserAssd_4') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 27, 1) + _Documentation = None + + _ItemType = STD_ANON +T_creeUserAssd_4._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_creeUserAssd_4', T_creeUserAssd_4) +_module_typeBindings.T_creeUserAssd_4 = T_creeUserAssd_4 + +# List simple type: {http://chercheurs.edf.com/logiciels/Essai}T_utiliseUserAssd +# superclasses STD_ANON_3 +class T_utiliseUserAssd (pyxb.binding.basis.STD_list): + + """Simple type that is a list of STD_ANON_.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_utiliseUserAssd') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 43, 1) + _Documentation = None + + _ItemType = STD_ANON_ +T_utiliseUserAssd._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_utiliseUserAssd', T_utiliseUserAssd) +_module_typeBindings.T_utiliseUserAssd = T_utiliseUserAssd + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_unFact1 with content type ELEMENT_ONLY +class T_unFact1 (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_unFact1 with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_unFact1') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 59, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/Essai}creeUserAssd uses Python identifier creeUserAssd + __creeUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), 'creeUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_unFact1_httpchercheurs_edf_comlogicielsEssaicreeUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 61, 3), ) + + + creeUserAssd = property(__creeUserAssd.value, __creeUserAssd.set, None, None) + + _ElementMap.update({ + __creeUserAssd.name() : __creeUserAssd + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_unFact1 = T_unFact1 +Namespace.addCategoryObject('typeBinding', 'T_unFact1', T_unFact1) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_unFact with content type ELEMENT_ONLY +class T_unFact (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_unFact with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_unFact') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 76, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/Essai}creeUserAssd uses Python identifier creeUserAssd + __creeUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), 'creeUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_unFact_httpchercheurs_edf_comlogicielsEssaicreeUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 78, 3), ) + + + creeUserAssd = property(__creeUserAssd.value, __creeUserAssd.set, None, None) + + _ElementMap.update({ + __creeUserAssd.name() : __creeUserAssd + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_unFact = T_unFact +Namespace.addCategoryObject('typeBinding', 'T_unFact', T_unFact) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_step_Essai with content type EMPTY +class T_step_Essai (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_step_Essai with content type EMPTY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY + _Abstract = True + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_step_Essai') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 146, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + _ElementMap.update({ + + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_step_Essai = T_step_Essai +Namespace.addCategoryObject('typeBinding', 'T_step_Essai', T_step_Essai) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_Essai with content type ELEMENT_ONLY +class T_Essai (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_Essai with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_Essai') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 149, 2) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/Essai}step_Essai uses Python identifier step_Essai + __step_Essai = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'step_Essai'), 'step_Essai', '__httpchercheurs_edf_comlogicielsEssai_T_Essai_httpchercheurs_edf_comlogicielsEssaistep_Essai', True, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 147, 1), ) + + + step_Essai = property(__step_Essai.value, __step_Essai.set, None, None) + + _ElementMap.update({ + __step_Essai.name() : __step_Essai + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_Essai = T_Essai +Namespace.addCategoryObject('typeBinding', 'T_Essai', T_Essai) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsFactDsOper with content type ELEMENT_ONLY +class T_DefinitionDsFactDsOper (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsFactDsOper with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_DefinitionDsFactDsOper') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 64, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}unFact1 uses Python identifier unFact1 + __unFact1 = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'unFact1'), 'unFact1', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsFactDsOper_httpchercheurs_edf_comlogicielsEssaiunFact1', True, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 68, 3), ) + + + unFact1 = property(__unFact1.value, __unFact1.set, None, None) + + + # Attribute accasName uses Python identifier accasName + __accasName = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'accasName'), 'accasName', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsFactDsOper_accasName', pyxb.binding.datatypes.string) + __accasName._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 70, 2) + __accasName._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 70, 2) + + accasName = property(__accasName.value, __accasName.set, None, None) + + + # Attribute accasType uses Python identifier accasType + __accasType = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'accasType'), 'accasType', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsFactDsOper_accasType', pyxb.binding.datatypes.string, fixed=True, unicode_default='ASSD') + __accasType._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 71, 2) + __accasType._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 71, 2) + + accasType = property(__accasType.value, __accasType.set, None, None) + + + # Attribute typeUtilisateur uses Python identifier typeUtilisateur + __typeUtilisateur = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'typeUtilisateur'), 'typeUtilisateur', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsFactDsOper_typeUtilisateur', pyxb.binding.datatypes.string, fixed=True, unicode_default='lASSD') + __typeUtilisateur._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 72, 2) + __typeUtilisateur._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 72, 2) + + typeUtilisateur = property(__typeUtilisateur.value, __typeUtilisateur.set, None, None) + + _ElementMap.update({ + __unFact1.name() : __unFact1 + }) + _AttributeMap.update({ + __accasName.name() : __accasName, + __accasType.name() : __accasType, + __typeUtilisateur.name() : __typeUtilisateur + }) +_module_typeBindings.T_DefinitionDsFactDsOper = T_DefinitionDsFactDsOper +Namespace.addCategoryObject('typeBinding', 'T_DefinitionDsFactDsOper', T_DefinitionDsFactDsOper) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsFactDsProc with content type ELEMENT_ONLY +class T_DefinitionDsFactDsProc (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsFactDsProc with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_DefinitionDsFactDsProc') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 81, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}unFact uses Python identifier unFact + __unFact = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'unFact'), 'unFact', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsFactDsProc_httpchercheurs_edf_comlogicielsEssaiunFact', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 85, 3), ) + + + unFact = property(__unFact.value, __unFact.set, None, None) + + _ElementMap.update({ + __unFact.name() : __unFact + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_DefinitionDsFactDsProc = T_DefinitionDsFactDsProc +Namespace.addCategoryObject('typeBinding', 'T_DefinitionDsFactDsProc', T_DefinitionDsFactDsProc) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsSimpDsOper with content type ELEMENT_ONLY +class T_DefinitionDsSimpDsOper (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsSimpDsOper with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_DefinitionDsSimpDsOper') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 90, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}creeUserAssd uses Python identifier creeUserAssd + __creeUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), 'creeUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsSimpDsOper_httpchercheurs_edf_comlogicielsEssaicreeUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 94, 3), ) + + + creeUserAssd = property(__creeUserAssd.value, __creeUserAssd.set, None, None) + + + # Attribute accasName uses Python identifier accasName + __accasName = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'accasName'), 'accasName', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsSimpDsOper_accasName', pyxb.binding.datatypes.string) + __accasName._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 96, 2) + __accasName._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 96, 2) + + accasName = property(__accasName.value, __accasName.set, None, None) + + + # Attribute accasType uses Python identifier accasType + __accasType = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'accasType'), 'accasType', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsSimpDsOper_accasType', pyxb.binding.datatypes.string, fixed=True, unicode_default='ASSD') + __accasType._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 97, 2) + __accasType._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 97, 2) + + accasType = property(__accasType.value, __accasType.set, None, None) + + + # Attribute typeUtilisateur uses Python identifier typeUtilisateur + __typeUtilisateur = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'typeUtilisateur'), 'typeUtilisateur', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsSimpDsOper_typeUtilisateur', pyxb.binding.datatypes.string, fixed=True, unicode_default='lASSD') + __typeUtilisateur._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 98, 2) + __typeUtilisateur._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 98, 2) + + typeUtilisateur = property(__typeUtilisateur.value, __typeUtilisateur.set, None, None) + + _ElementMap.update({ + __creeUserAssd.name() : __creeUserAssd + }) + _AttributeMap.update({ + __accasName.name() : __accasName, + __accasType.name() : __accasType, + __typeUtilisateur.name() : __typeUtilisateur + }) +_module_typeBindings.T_DefinitionDsSimpDsOper = T_DefinitionDsSimpDsOper +Namespace.addCategoryObject('typeBinding', 'T_DefinitionDsSimpDsOper', T_DefinitionDsSimpDsOper) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsSimpDsProc with content type ELEMENT_ONLY +class T_DefinitionDsSimpDsProc (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsSimpDsProc with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_DefinitionDsSimpDsProc') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 102, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}creeUserAssd uses Python identifier creeUserAssd + __creeUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), 'creeUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsSimpDsProc_httpchercheurs_edf_comlogicielsEssaicreeUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 106, 3), ) + + + creeUserAssd = property(__creeUserAssd.value, __creeUserAssd.set, None, None) + + _ElementMap.update({ + __creeUserAssd.name() : __creeUserAssd + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_DefinitionDsSimpDsProc = T_DefinitionDsSimpDsProc +Namespace.addCategoryObject('typeBinding', 'T_DefinitionDsSimpDsProc', T_DefinitionDsSimpDsProc) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsSimpListe with content type ELEMENT_ONLY +class T_DefinitionDsSimpListe (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_DefinitionDsSimpListe with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_DefinitionDsSimpListe') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 111, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}creeUserAssd uses Python identifier creeUserAssd + __creeUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), 'creeUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_DefinitionDsSimpListe_httpchercheurs_edf_comlogicielsEssaicreeUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 115, 3), ) + + + creeUserAssd = property(__creeUserAssd.value, __creeUserAssd.set, None, None) + + _ElementMap.update({ + __creeUserAssd.name() : __creeUserAssd + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_DefinitionDsSimpListe = T_DefinitionDsSimpListe +Namespace.addCategoryObject('typeBinding', 'T_DefinitionDsSimpListe', T_DefinitionDsSimpListe) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_UtiliseEtDefinitDsLeMemeProc with content type ELEMENT_ONLY +class T_UtiliseEtDefinitDsLeMemeProc (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_UtiliseEtDefinitDsLeMemeProc with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_UtiliseEtDefinitDsLeMemeProc') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 120, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}utiliseUserAssd uses Python identifier utiliseUserAssd + __utiliseUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'utiliseUserAssd'), 'utiliseUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_UtiliseEtDefinitDsLeMemeProc_httpchercheurs_edf_comlogicielsEssaiutiliseUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 124, 3), ) + + + utiliseUserAssd = property(__utiliseUserAssd.value, __utiliseUserAssd.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/Essai}creeUserAssd uses Python identifier creeUserAssd + __creeUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), 'creeUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_UtiliseEtDefinitDsLeMemeProc_httpchercheurs_edf_comlogicielsEssaicreeUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 125, 3), ) + + + creeUserAssd = property(__creeUserAssd.value, __creeUserAssd.set, None, None) + + _ElementMap.update({ + __utiliseUserAssd.name() : __utiliseUserAssd, + __creeUserAssd.name() : __creeUserAssd + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_UtiliseEtDefinitDsLeMemeProc = T_UtiliseEtDefinitDsLeMemeProc +Namespace.addCategoryObject('typeBinding', 'T_UtiliseEtDefinitDsLeMemeProc', T_UtiliseEtDefinitDsLeMemeProc) + + +# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_UtiliseUnUserAssD with content type ELEMENT_ONLY +class T_UtiliseUnUserAssD (T_step_Essai): + """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_UtiliseUnUserAssD with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_UtiliseUnUserAssD') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 130, 1) + _ElementMap = T_step_Essai._ElementMap.copy() + _AttributeMap = T_step_Essai._AttributeMap.copy() + # Base type is T_step_Essai + + # Element {http://chercheurs.edf.com/logiciels/Essai}utiliseUnUserAssd uses Python identifier utiliseUnUserAssd + __utiliseUnUserAssd = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'utiliseUnUserAssd'), 'utiliseUnUserAssd', '__httpchercheurs_edf_comlogicielsEssai_T_UtiliseUnUserAssD_httpchercheurs_edf_comlogicielsEssaiutiliseUnUserAssd', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 134, 3), ) + + + utiliseUnUserAssd = property(__utiliseUnUserAssd.value, __utiliseUnUserAssd.set, None, None) + + _ElementMap.update({ + __utiliseUnUserAssd.name() : __utiliseUnUserAssd + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_UtiliseUnUserAssD = T_UtiliseUnUserAssD +Namespace.addCategoryObject('typeBinding', 'T_UtiliseUnUserAssD', T_UtiliseUnUserAssD) + + +step_Essai = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'step_Essai'), T_step_Essai, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 147, 1)) +Namespace.addCategoryObject('elementBinding', step_Essai.name().localName(), step_Essai) + +Essai = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Essai'), T_Essai, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 148, 1)) +Namespace.addCategoryObject('elementBinding', Essai.name().localName(), Essai) + +DefinitionDsFactDsOper = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'DefinitionDsFactDsOper'), T_DefinitionDsFactDsOper, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 139, 1)) +Namespace.addCategoryObject('elementBinding', DefinitionDsFactDsOper.name().localName(), DefinitionDsFactDsOper) + +DefinitionDsFactDsProc = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'DefinitionDsFactDsProc'), T_DefinitionDsFactDsProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 140, 1)) +Namespace.addCategoryObject('elementBinding', DefinitionDsFactDsProc.name().localName(), DefinitionDsFactDsProc) + +DefinitionDsSimpDsOper = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'DefinitionDsSimpDsOper'), T_DefinitionDsSimpDsOper, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 141, 1)) +Namespace.addCategoryObject('elementBinding', DefinitionDsSimpDsOper.name().localName(), DefinitionDsSimpDsOper) + +DefinitionDsSimpDsProc = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'DefinitionDsSimpDsProc'), T_DefinitionDsSimpDsProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 142, 1)) +Namespace.addCategoryObject('elementBinding', DefinitionDsSimpDsProc.name().localName(), DefinitionDsSimpDsProc) + +DefinitionDsSimpListe = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'DefinitionDsSimpListe'), T_DefinitionDsSimpListe, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 143, 1)) +Namespace.addCategoryObject('elementBinding', DefinitionDsSimpListe.name().localName(), DefinitionDsSimpListe) + +UtiliseEtDefinitDsLeMemeProc = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'UtiliseEtDefinitDsLeMemeProc'), T_UtiliseEtDefinitDsLeMemeProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 144, 1)) +Namespace.addCategoryObject('elementBinding', UtiliseEtDefinitDsLeMemeProc.name().localName(), UtiliseEtDefinitDsLeMemeProc) + +UtiliseUnUserAssD = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'UtiliseUnUserAssD'), T_UtiliseUnUserAssD, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 145, 1)) +Namespace.addCategoryObject('elementBinding', UtiliseUnUserAssD.name().localName(), UtiliseUnUserAssD) + + + +T_unFact1._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), T_creeUserAssd, scope=T_unFact1, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 61, 3))) + +def _BuildAutomaton (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton + del _BuildAutomaton + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 61, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_unFact1._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 61, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_unFact1._Automaton = _BuildAutomaton() + + + + +T_unFact._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), T_creeUserAssd, scope=T_unFact, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 78, 3))) + +def _BuildAutomaton_ (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_ + del _BuildAutomaton_ + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 78, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_unFact._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 78, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_unFact._Automaton = _BuildAutomaton_() + + + + +T_Essai._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'step_Essai'), T_step_Essai, scope=T_Essai, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 147, 1))) + +def _BuildAutomaton_2 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_2 + del _BuildAutomaton_2 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 150, 4)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 151, 3)) + counters.add(cc_1) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + final_update.add(fac.UpdateInstruction(cc_1, False)) + symbol = pyxb.binding.content.ElementUse(T_Essai._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'step_Essai')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 151, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True), + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_1, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_Essai._Automaton = _BuildAutomaton_2() + + + + +T_DefinitionDsFactDsOper._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'unFact1'), T_unFact1, scope=T_DefinitionDsFactDsOper, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 68, 3))) + +def _BuildAutomaton_3 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_3 + del _BuildAutomaton_3 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 68, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_DefinitionDsFactDsOper._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'unFact1')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 68, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_DefinitionDsFactDsOper._Automaton = _BuildAutomaton_3() + + + + +T_DefinitionDsFactDsProc._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'unFact'), T_unFact, scope=T_DefinitionDsFactDsProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 85, 3))) + +def _BuildAutomaton_4 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_4 + del _BuildAutomaton_4 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 85, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_DefinitionDsFactDsProc._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'unFact')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 85, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_DefinitionDsFactDsProc._Automaton = _BuildAutomaton_4() + + + + +T_DefinitionDsSimpDsOper._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), T_creeUserAssd_2, scope=T_DefinitionDsSimpDsOper, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 94, 3))) + +def _BuildAutomaton_5 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_5 + del _BuildAutomaton_5 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 94, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_DefinitionDsSimpDsOper._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 94, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_DefinitionDsSimpDsOper._Automaton = _BuildAutomaton_5() + + + + +T_DefinitionDsSimpDsProc._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), T_creeUserAssd, scope=T_DefinitionDsSimpDsProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 106, 3))) + +def _BuildAutomaton_6 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_6 + del _BuildAutomaton_6 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 106, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_DefinitionDsSimpDsProc._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 106, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_DefinitionDsSimpDsProc._Automaton = _BuildAutomaton_6() + + + + +T_DefinitionDsSimpListe._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), T_creeUserAssd_4, scope=T_DefinitionDsSimpListe, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 115, 3))) + +def _BuildAutomaton_7 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_7 + del _BuildAutomaton_7 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 115, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_DefinitionDsSimpListe._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 115, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_DefinitionDsSimpListe._Automaton = _BuildAutomaton_7() + + + + +T_UtiliseEtDefinitDsLeMemeProc._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'utiliseUserAssd'), T_utiliseUserAssd, scope=T_UtiliseEtDefinitDsLeMemeProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 124, 3))) + +T_UtiliseEtDefinitDsLeMemeProc._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd'), T_creeUserAssd, scope=T_UtiliseEtDefinitDsLeMemeProc, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 125, 3))) + +def _BuildAutomaton_8 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_8 + del _BuildAutomaton_8 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 125, 3)) + counters.add(cc_0) + states = [] + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_UtiliseEtDefinitDsLeMemeProc._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'utiliseUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 124, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_UtiliseEtDefinitDsLeMemeProc._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'creeUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 125, 3)) + st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + transitions = [] + transitions.append(fac.Transition(st_1, [ + ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, True) ])) + st_1._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_UtiliseEtDefinitDsLeMemeProc._Automaton = _BuildAutomaton_8() + + + + +T_UtiliseUnUserAssD._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'utiliseUnUserAssd'), T_utiliseUnUserAssd, scope=T_UtiliseUnUserAssD, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 134, 3))) + +def _BuildAutomaton_9 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_9 + del _BuildAutomaton_9 + import pyxb.utils.fac as fac + + counters = set() + states = [] + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_UtiliseUnUserAssD._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'utiliseUnUserAssd')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_UserAssd.xsd', 134, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_UtiliseUnUserAssD._Automaton = _BuildAutomaton_9() + + +DefinitionDsFactDsOper._setSubstitutionGroup(step_Essai) + +DefinitionDsFactDsProc._setSubstitutionGroup(step_Essai) + +DefinitionDsSimpDsOper._setSubstitutionGroup(step_Essai) + +DefinitionDsSimpDsProc._setSubstitutionGroup(step_Essai) + +DefinitionDsSimpListe._setSubstitutionGroup(step_Essai) + +UtiliseEtDefinitDsLeMemeProc._setSubstitutionGroup(step_Essai) + +UtiliseUnUserAssD._setSubstitutionGroup(step_Essai) diff --git a/CatasDeTests/raw/toto.py b/CatasDeTests/raw/toto.py new file mode 100644 index 00000000..24048f47 --- /dev/null +++ b/CatasDeTests/raw/toto.py @@ -0,0 +1,550 @@ +# ./raw/toto.py +# -*- coding: utf-8 -*- +# PyXB bindings for NM:6edffaeea9d56b1698d1f555fb81b70e6e147421 +# Generated 2020-10-19 15:46:37.580374 by PyXB version 1.2.5 using Python 3.4.2.final.0 +# Namespace http://chercheurs.edf.com/logiciels/Test1 + +from __future__ import unicode_literals +import pyxb +import pyxb.binding +import pyxb.binding.saxer +import io +import pyxb.utils.utility +import pyxb.utils.domutils +import sys +import pyxb.utils.six as _six +# Unique identifier for bindings created at the same time +_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:8258bf5a-1211-11eb-875b-cc3d82d871d8') + +# Version of PyXB used to generate the bindings +_PyXBVersion = '1.2.5' +# Generated bindings are not compatible across PyXB versions +if pyxb.__version__ != _PyXBVersion: + raise pyxb.PyXBVersionError(_PyXBVersion) + +# A holder for module-level binding classes so we can access them from +# inside class definitions where property names may conflict. +_module_typeBindings = pyxb.utils.utility.Object() + +# Import bindings for namespaces imported into schema +import pyxb.binding.datatypes + +# NOTE: All namespace declarations are reserved within the binding +Namespace = pyxb.namespace.NamespaceForURI('http://chercheurs.edf.com/logiciels/Test1', create_if_missing=True) +Namespace.configureCategories(['typeBinding', 'elementBinding']) + +def CreateFromDocument (xml_text, default_namespace=None, location_base=None): + """Parse the given XML and use the document element to create a + Python instance. + + @param xml_text An XML document. This should be data (Python 2 + str or Python 3 bytes), or a text (Python 2 unicode or Python 3 + str) in the L{pyxb._InputEncoding} encoding. + + @keyword default_namespace The L{pyxb.Namespace} instance to use as the + default namespace where there is no default namespace in scope. + If unspecified or C{None}, the namespace of the module containing + this function will be used. + + @keyword location_base: An object to be recorded as the base of all + L{pyxb.utils.utility.Location} instances associated with events and + objects handled by the parser. You might pass the URI from which + the document was obtained. + """ + + if pyxb.XMLStyle_saxer != pyxb._XMLStyle: + dom = pyxb.utils.domutils.StringToDOM(xml_text) + return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) + if default_namespace is None: + default_namespace = Namespace.fallbackNamespace() + saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) + handler = saxer.getContentHandler() + xmld = xml_text + if isinstance(xmld, _six.text_type): + xmld = xmld.encode(pyxb._InputEncoding) + saxer.parse(io.BytesIO(xmld)) + instance = handler.rootObject() + return instance + +def CreateFromDOM (node, default_namespace=None): + """Create a Python instance from the given DOM node. + The node tag must correspond to an element declaration in this module. + + @deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" + if default_namespace is None: + default_namespace = Namespace.fallbackNamespace() + return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) + + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Test1}AccasUserAssd +class AccasUserAssd (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'AccasUserAssd') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 7, 1) + _Documentation = None +AccasUserAssd._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'AccasUserAssd', AccasUserAssd) +_module_typeBindings.AccasUserAssd = AccasUserAssd + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Test1}T_dimension +class T_dimension (pyxb.binding.datatypes.int, pyxb.binding.basis.enumeration_mixin): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_dimension') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 19, 1) + _Documentation = None +T_dimension._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_dimension, enum_prefix=None) +T_dimension._CF_enumeration.addEnumeration(unicode_value='1', tag=None) +T_dimension._CF_enumeration.addEnumeration(unicode_value='2', tag=None) +T_dimension._CF_enumeration.addEnumeration(unicode_value='3', tag=None) +T_dimension._InitializeFacetMap(T_dimension._CF_enumeration) +Namespace.addCategoryObject('typeBinding', 'T_dimension', T_dimension) +_module_typeBindings.T_dimension = T_dimension + +# Atomic simple type: [anonymous] +class STD_ANON (pyxb.binding.datatypes.int): + + """An atomic simple type.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 30, 5) + _Documentation = None +STD_ANON._InitializeFacetMap() +_module_typeBindings.STD_ANON = STD_ANON + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Test1}T_meshname_1 +class T_meshname_1 (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_meshname_1') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 38, 1) + _Documentation = None +T_meshname_1._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_meshname_1', T_meshname_1) +_module_typeBindings.T_meshname_1 = T_meshname_1 + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Test1}PNEFdico_Test1 +class PNEFdico_Test1 (pyxb.binding.datatypes.string): + + """{'T_meshname': {'_meshname_CreateMesh': 'T_meshname_1'}} + """ + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'PNEFdico_Test1') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 80, 1) + _Documentation = "{'T_meshname': {'_meshname_CreateMesh': 'T_meshname_1'}}\n\t\t" +PNEFdico_Test1._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'PNEFdico_Test1', PNEFdico_Test1) +_module_typeBindings.PNEFdico_Test1 = PNEFdico_Test1 + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Test1}MeshU_C +class MeshU_C (AccasUserAssd): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'MeshU_C') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 11, 1) + _Documentation = None +MeshU_C._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'MeshU_C', MeshU_C) +_module_typeBindings.MeshU_C = MeshU_C + +# List simple type: [anonymous] +# superclasses pyxb.binding.datatypes.anySimpleType +class STD_ANON_ (pyxb.binding.basis.STD_list): + + """Simple type that is a list of STD_ANON.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 28, 3) + _Documentation = None + + _ItemType = STD_ANON +STD_ANON_._InitializeFacetMap() +_module_typeBindings.STD_ANON_ = STD_ANON_ + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/Test1}T_meshname +class T_meshname (MeshU_C): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_meshname') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 15, 1) + _Documentation = None +T_meshname._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_meshname', T_meshname) +_module_typeBindings.T_meshname = T_meshname + +# List simple type: {http://chercheurs.edf.com/logiciels/Test1}T_listOfEntities +# superclasses STD_ANON_ +class T_listOfEntities (pyxb.binding.basis.STD_list): + + """Simple type that is a list of STD_ANON.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_listOfEntities') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 26, 1) + _Documentation = None + + _ItemType = STD_ANON +T_listOfEntities._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', 'T_listOfEntities', T_listOfEntities) +_module_typeBindings.T_listOfEntities = T_listOfEntities + +# Complex type {http://chercheurs.edf.com/logiciels/Test1}T_step_Test1 with content type EMPTY +class T_step_Test1 (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/Test1}T_step_Test1 with content type EMPTY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY + _Abstract = True + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_step_Test1') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 72, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + _ElementMap.update({ + + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_step_Test1 = T_step_Test1 +Namespace.addCategoryObject('typeBinding', 'T_step_Test1', T_step_Test1) + + +# Complex type {http://chercheurs.edf.com/logiciels/Test1}T_Test1 with content type ELEMENT_ONLY +class T_Test1 (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/Test1}T_Test1 with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_Test1') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 75, 2) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/Test1}step_Test1 uses Python identifier step_Test1 + __step_Test1 = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'step_Test1'), 'step_Test1', '__httpchercheurs_edf_comlogicielsTest1_T_Test1_httpchercheurs_edf_comlogicielsTest1step_Test1', True, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 73, 1), ) + + + step_Test1 = property(__step_Test1.value, __step_Test1.set, None, None) + + _ElementMap.update({ + __step_Test1.name() : __step_Test1 + }) + _AttributeMap.update({ + + }) +_module_typeBindings.T_Test1 = T_Test1 +Namespace.addCategoryObject('typeBinding', 'T_Test1', T_Test1) + + +# Complex type {http://chercheurs.edf.com/logiciels/Test1}T_CreateBoth with content type ELEMENT_ONLY +class T_CreateBoth (T_step_Test1): + """Complex type {http://chercheurs.edf.com/logiciels/Test1}T_CreateBoth with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_CreateBoth') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 42, 1) + _ElementMap = T_step_Test1._ElementMap.copy() + _AttributeMap = T_step_Test1._AttributeMap.copy() + # Base type is T_step_Test1 + + # Element {http://chercheurs.edf.com/logiciels/Test1}meshname uses Python identifier meshname + __meshname = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'meshname'), 'meshname', '__httpchercheurs_edf_comlogicielsTest1_T_CreateBoth_httpchercheurs_edf_comlogicielsTest1meshname', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 46, 3), ) + + + meshname = property(__meshname.value, __meshname.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/Test1}dimension uses Python identifier dimension + __dimension = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'dimension'), 'dimension', '__httpchercheurs_edf_comlogicielsTest1_T_CreateBoth_httpchercheurs_edf_comlogicielsTest1dimension', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 47, 3), ) + + + dimension = property(__dimension.value, __dimension.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/Test1}listOfEntities uses Python identifier listOfEntities + __listOfEntities = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'listOfEntities'), 'listOfEntities', '__httpchercheurs_edf_comlogicielsTest1_T_CreateBoth_httpchercheurs_edf_comlogicielsTest1listOfEntities', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 48, 3), ) + + + listOfEntities = property(__listOfEntities.value, __listOfEntities.set, None, None) + + + # Attribute accasName uses Python identifier accasName + __accasName = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'accasName'), 'accasName', '__httpchercheurs_edf_comlogicielsTest1_T_CreateBoth_accasName', pyxb.binding.datatypes.string) + __accasName._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 50, 2) + __accasName._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 50, 2) + + accasName = property(__accasName.value, __accasName.set, None, None) + + + # Attribute accasType uses Python identifier accasType + __accasType = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'accasType'), 'accasType', '__httpchercheurs_edf_comlogicielsTest1_T_CreateBoth_accasType', pyxb.binding.datatypes.string, fixed=True, unicode_default='ASSD') + __accasType._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 51, 2) + __accasType._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 51, 2) + + accasType = property(__accasType.value, __accasType.set, None, None) + + + # Attribute typeUtilisateur uses Python identifier typeUtilisateur + __typeUtilisateur = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'typeUtilisateur'), 'typeUtilisateur', '__httpchercheurs_edf_comlogicielsTest1_T_CreateBoth_typeUtilisateur', pyxb.binding.datatypes.string, fixed=True, unicode_default='Mesh') + __typeUtilisateur._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 52, 2) + __typeUtilisateur._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 52, 2) + + typeUtilisateur = property(__typeUtilisateur.value, __typeUtilisateur.set, None, None) + + _ElementMap.update({ + __meshname.name() : __meshname, + __dimension.name() : __dimension, + __listOfEntities.name() : __listOfEntities + }) + _AttributeMap.update({ + __accasName.name() : __accasName, + __accasType.name() : __accasType, + __typeUtilisateur.name() : __typeUtilisateur + }) +_module_typeBindings.T_CreateBoth = T_CreateBoth +Namespace.addCategoryObject('typeBinding', 'T_CreateBoth', T_CreateBoth) + + +# Complex type {http://chercheurs.edf.com/logiciels/Test1}T_CreateMesh with content type ELEMENT_ONLY +class T_CreateMesh (T_step_Test1): + """Complex type {http://chercheurs.edf.com/logiciels/Test1}T_CreateMesh with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_CreateMesh') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 56, 1) + _ElementMap = T_step_Test1._ElementMap.copy() + _AttributeMap = T_step_Test1._AttributeMap.copy() + # Base type is T_step_Test1 + + # Element {http://chercheurs.edf.com/logiciels/Test1}meshname uses Python identifier meshname + __meshname = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'meshname'), 'meshname', '__httpchercheurs_edf_comlogicielsTest1_T_CreateMesh_httpchercheurs_edf_comlogicielsTest1meshname', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 60, 3), ) + + + meshname = property(__meshname.value, __meshname.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/Test1}dimension uses Python identifier dimension + __dimension = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'dimension'), 'dimension', '__httpchercheurs_edf_comlogicielsTest1_T_CreateMesh_httpchercheurs_edf_comlogicielsTest1dimension', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 61, 3), ) + + + dimension = property(__dimension.value, __dimension.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/Test1}listOfEntities uses Python identifier listOfEntities + __listOfEntities = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'listOfEntities'), 'listOfEntities', '__httpchercheurs_edf_comlogicielsTest1_T_CreateMesh_httpchercheurs_edf_comlogicielsTest1listOfEntities', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 62, 3), ) + + + listOfEntities = property(__listOfEntities.value, __listOfEntities.set, None, None) + + + # Attribute accasName uses Python identifier accasName + __accasName = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'accasName'), 'accasName', '__httpchercheurs_edf_comlogicielsTest1_T_CreateMesh_accasName', pyxb.binding.datatypes.string) + __accasName._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 64, 2) + __accasName._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 64, 2) + + accasName = property(__accasName.value, __accasName.set, None, None) + + + # Attribute accasType uses Python identifier accasType + __accasType = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'accasType'), 'accasType', '__httpchercheurs_edf_comlogicielsTest1_T_CreateMesh_accasType', pyxb.binding.datatypes.string, fixed=True, unicode_default='ASSD') + __accasType._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 65, 2) + __accasType._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 65, 2) + + accasType = property(__accasType.value, __accasType.set, None, None) + + + # Attribute typeUtilisateur uses Python identifier typeUtilisateur + __typeUtilisateur = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, 'typeUtilisateur'), 'typeUtilisateur', '__httpchercheurs_edf_comlogicielsTest1_T_CreateMesh_typeUtilisateur', pyxb.binding.datatypes.string, fixed=True, unicode_default='Mesh') + __typeUtilisateur._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 66, 2) + __typeUtilisateur._UseLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 66, 2) + + typeUtilisateur = property(__typeUtilisateur.value, __typeUtilisateur.set, None, None) + + _ElementMap.update({ + __meshname.name() : __meshname, + __dimension.name() : __dimension, + __listOfEntities.name() : __listOfEntities + }) + _AttributeMap.update({ + __accasName.name() : __accasName, + __accasType.name() : __accasType, + __typeUtilisateur.name() : __typeUtilisateur + }) +_module_typeBindings.T_CreateMesh = T_CreateMesh +Namespace.addCategoryObject('typeBinding', 'T_CreateMesh', T_CreateMesh) + + +step_Test1 = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'step_Test1'), T_step_Test1, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 73, 1)) +Namespace.addCategoryObject('elementBinding', step_Test1.name().localName(), step_Test1) + +Test1 = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Test1'), T_Test1, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 74, 1)) +Namespace.addCategoryObject('elementBinding', Test1.name().localName(), Test1) + +CreateBoth = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'CreateBoth'), T_CreateBoth, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 70, 1)) +Namespace.addCategoryObject('elementBinding', CreateBoth.name().localName(), CreateBoth) + +CreateMesh = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'CreateMesh'), T_CreateMesh, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 71, 1)) +Namespace.addCategoryObject('elementBinding', CreateMesh.name().localName(), CreateMesh) + + + +T_Test1._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'step_Test1'), T_step_Test1, scope=T_Test1, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 73, 1))) + +def _BuildAutomaton (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton + del _BuildAutomaton + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 76, 4)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 77, 3)) + counters.add(cc_1) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + final_update.add(fac.UpdateInstruction(cc_1, False)) + symbol = pyxb.binding.content.ElementUse(T_Test1._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'step_Test1')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 77, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True), + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_1, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_Test1._Automaton = _BuildAutomaton() + + + + +T_CreateBoth._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'meshname'), T_meshname, scope=T_CreateBoth, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 46, 3))) + +T_CreateBoth._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'dimension'), T_dimension, scope=T_CreateBoth, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 47, 3))) + +T_CreateBoth._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'listOfEntities'), T_listOfEntities, scope=T_CreateBoth, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 48, 3))) + +def _BuildAutomaton_ (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_ + del _BuildAutomaton_ + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 46, 3)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 47, 3)) + counters.add(cc_1) + cc_2 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 48, 3)) + counters.add(cc_2) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_CreateBoth._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'meshname')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 46, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_1, False)) + symbol = pyxb.binding.content.ElementUse(T_CreateBoth._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'dimension')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 47, 3)) + st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_2, False)) + symbol = pyxb.binding.content.ElementUse(T_CreateBoth._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'listOfEntities')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 48, 3)) + st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_2) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_0, False) ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_1, True) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_1, False) ])) + st_1._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_2, True) ])) + st_2._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_CreateBoth._Automaton = _BuildAutomaton_() + + + + +T_CreateMesh._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'meshname'), T_meshname_1, scope=T_CreateMesh, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 60, 3))) + +T_CreateMesh._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'dimension'), T_dimension, scope=T_CreateMesh, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 61, 3))) + +T_CreateMesh._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'listOfEntities'), T_listOfEntities, scope=T_CreateMesh, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 62, 3))) + +def _BuildAutomaton_2 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_2 + del _BuildAutomaton_2 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 60, 3)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 61, 3)) + counters.add(cc_1) + cc_2 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 62, 3)) + counters.add(cc_2) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_CreateMesh._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'meshname')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 60, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_1, False)) + symbol = pyxb.binding.content.ElementUse(T_CreateMesh._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'dimension')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 61, 3)) + st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_2, False)) + symbol = pyxb.binding.content.ElementUse(T_CreateMesh._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'listOfEntities')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/CatasDeTests/cata_1.xsd', 62, 3)) + st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_2) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_0, False) ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_1, True) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_1, False) ])) + st_1._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_2, True) ])) + st_2._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_CreateMesh._Automaton = _BuildAutomaton_2() + + +CreateBoth._setSubstitutionGroup(step_Test1) + +CreateMesh._setSubstitutionGroup(step_Test1) diff --git a/CatasDeTests/ref/cata_Vimmp_genere.xsd b/CatasDeTests/ref/cata_Vimmp_genere.xsd new file mode 100644 index 00000000..9db1d5ab --- /dev/null +++ b/CatasDeTests/ref/cata_Vimmp_genere.xsd @@ -0,0 +1,1104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CatasDeTests/ref/cata_gromacs_genere.xsd b/CatasDeTests/ref/cata_gromacs_genere.xsd new file mode 100644 index 00000000..052a3498 --- /dev/null +++ b/CatasDeTests/ref/cata_gromacs_genere.xsd @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Editeur/Eficas_utils.py b/Editeur/Eficas_utils.py index 80951e03..4ed93f31 100644 --- a/Editeur/Eficas_utils.py +++ b/Editeur/Eficas_utils.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/Objecttreeitem.py b/Editeur/Objecttreeitem.py index b0b6641a..243315ce 100644 --- a/Editeur/Objecttreeitem.py +++ b/Editeur/Objecttreeitem.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/TroisDPal.py b/Editeur/TroisDPal.py index 5fc0d085..325e83e9 100644 --- a/Editeur/TroisDPal.py +++ b/Editeur/TroisDPal.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/__init__.py b/Editeur/__init__.py index 266bf453..58d19a98 100644 --- a/Editeur/__init__.py +++ b/Editeur/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/analyse_catalogue.py b/Editeur/analyse_catalogue.py index 51f1cf84..60d114b2 100644 --- a/Editeur/analyse_catalogue.py +++ b/Editeur/analyse_catalogue.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/analyse_catalogue_initial.py b/Editeur/analyse_catalogue_initial.py index 95c8b43f..90e73d6b 100644 --- a/Editeur/analyse_catalogue_initial.py +++ b/Editeur/analyse_catalogue_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/autre_analyse_cata.py b/Editeur/autre_analyse_cata.py index 0848eb14..9699bcf2 100644 --- a/Editeur/autre_analyse_cata.py +++ b/Editeur/autre_analyse_cata.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/basestyle.py b/Editeur/basestyle.py index ca7943ad..3cc104a3 100644 --- a/Editeur/basestyle.py +++ b/Editeur/basestyle.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/cata2Xml.py b/Editeur/cata2Xml.py index e5d3dcac..4bf5bb1f 100755 --- a/Editeur/cata2Xml.py +++ b/Editeur/cata2Xml.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/catadesc.py b/Editeur/catadesc.py index 7f3ffeae..78d112d1 100644 --- a/Editeur/catadesc.py +++ b/Editeur/catadesc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/chercheBlocInto.py b/Editeur/chercheBlocInto.py index 40287971..8aaa24ba 100755 --- a/Editeur/chercheBlocInto.py +++ b/Editeur/chercheBlocInto.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/chercheNbElem.py b/Editeur/chercheNbElem.py index a00f3e14..3dcec604 100755 --- a/Editeur/chercheNbElem.py +++ b/Editeur/chercheNbElem.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/comploader.py b/Editeur/comploader.py index 5f240ae0..a9470638 100644 --- a/Editeur/comploader.py +++ b/Editeur/comploader.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/fontes.py b/Editeur/fontes.py index d3f6e8a9..1c2b2439 100644 --- a/Editeur/fontes.py +++ b/Editeur/fontes.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/import_code.py b/Editeur/import_code.py index 690e02bf..35df462f 100644 --- a/Editeur/import_code.py +++ b/Editeur/import_code.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/listePatrons.py b/Editeur/listePatrons.py index 2a305736..3caea635 100644 --- a/Editeur/listePatrons.py +++ b/Editeur/listePatrons.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/session.py b/Editeur/session.py index 0fcad780..bd96e83b 100644 --- a/Editeur/session.py +++ b/Editeur/session.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/styles.py b/Editeur/styles.py index 53f7bafc..3795f534 100644 --- a/Editeur/styles.py +++ b/Editeur/styles.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Editeur/uiinfo.py b/Editeur/uiinfo.py index 4e30351f..789fed33 100644 --- a/Editeur/uiinfo.py +++ b/Editeur/uiinfo.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Efi2Xsd/MCAccasXML.py b/Efi2Xsd/MCAccasXML.py index 9921c1d0..97f4407b 100755 --- a/Efi2Xsd/MCAccasXML.py +++ b/Efi2Xsd/MCAccasXML.py @@ -23,7 +23,7 @@ from Accas import A_ASSD class X_OBJECT: # ------------- - def delObjPyxb(self, debug=True): + def delObjPyxb(self, debug=False): if not self.cata or not self.cata.modeleMetier : return if self.nom == 'Consigne' : return None trouve = False @@ -151,7 +151,7 @@ class X_MCSIMP(X_OBJECT): if debug : print ('fin X_MCSIMP', self.objPyxb, self.nom, self, self.maClasseModeleMetier,self.valeur) - def setValeurObjPyxb(self,newVal, debug=True): + def setValeurObjPyxb(self,newVal, debug=False): if not self.cata or not self.cata.modeleMetier : return if debug : print (' ___________________________ dans setValeurObjPyxb MCSIMP ', self.nom, newVal) if debug : print (' self.perePyxb = ', self.perePyxb.nom) @@ -188,7 +188,7 @@ class X_MCSIMP(X_OBJECT): class X_MCCOMPO(X_OBJECT) : # ------------------------- # - def buildObjPyxb(self,mc_list, debug=True) : + def buildObjPyxb(self,mc_list, debug=False) : if not self.cata or not self.cata.modeleMetier : return print ('X_MCCOMPO', self.nom) self.listArg=[] diff --git a/Efi2Xsd/__init__.py b/Efi2Xsd/__init__.py index df53d551..5b4f0e3b 100644 --- a/Efi2Xsd/__init__.py +++ b/Efi2Xsd/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/EssaiInit/Cata_MED_FAM.xml b/EssaiInit/Cata_MED_FAM.xml deleted file mode 100755 index 75acb49a..00000000 --- a/EssaiInit/Cata_MED_FAM.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - TXM - - - TXM - TXM - - I - TXM - I - I - - - I - TXM - - - - - - diff --git a/EssaiInit/Cata_MED_FAM.xml.mini b/EssaiInit/Cata_MED_FAM.xml.mini deleted file mode 100755 index 75acb49a..00000000 --- a/EssaiInit/Cata_MED_FAM.xml.mini +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - TXM - - - TXM - TXM - - I - TXM - I - I - - - I - TXM - - - - - - diff --git a/EssaiInit/Cata_MED_FAM.xml.origin b/EssaiInit/Cata_MED_FAM.xml.origin deleted file mode 100755 index 75acb49a..00000000 --- a/EssaiInit/Cata_MED_FAM.xml.origin +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - TXM - - - TXM - TXM - - I - TXM - I - I - - - I - TXM - - - - - - diff --git a/EssaiInit/README.txt b/EssaiInit/README.txt deleted file mode 100644 index a167a899..00000000 --- a/EssaiInit/README.txt +++ /dev/null @@ -1 +0,0 @@ -pyxbgen -u model.xsd -m efficas --write-for-customization diff --git a/EssaiInit/aide1 b/EssaiInit/aide1 deleted file mode 100644 index 96187efc..00000000 --- a/EssaiInit/aide1 +++ /dev/null @@ -1,256 +0,0 @@ -Factory - -OPER - -PROC - -_Abstract - -_AddElement - -_AlternativeConstructor - -_AttributeMap - -_AttributeWildcard - -_Automaton - -_CT_ELEMENT_ONLY - -_CT_EMPTY - -_CT_MIXED - -_CT_SIMPLE - -_CompatibleValue - -_ContentTypeTag - -_DynamicCreate - -_DynamicCreate_mixin__AlternativeConstructorAttribute - -_DynamicCreate_mixin__SupersedingClassAttribute - -_ElementBindingDeclForName - -_ElementMap - -_ExpandedName - -_GetValidationConfig - -_HasWildcardElement - -_IsMixed - -_IsSimpleTypeContent - -_IsUrType - -_Locatable_mixin__location - -_Name - -_PerformValidation - -_PreFactory_vx - -_PyXBFactoryKeywords - -_RequireXSIType - -_ReservedSymbols - -_SetAlternativeConstructor - -_SetSupersedingClass - -_SetValidationConfig - -_SupersedingClass - -_T_commandes__OPER - -_T_commandes__PROC - -_TypeBinding_mixin__AttributesFromDOM - -_TypeBinding_mixin__WarnedUnassociatedElement - -_TypeBinding_mixin__checkNilCtor - -_TypeBinding_mixin__constructedWithValue - -_TypeBinding_mixin__element - -_TypeBinding_mixin__getValidationConfig - -_TypeBinding_mixin__namespaceContext - -_TypeBinding_mixin__xsiNil - -_TypeDefinition - -_UseForTag - -_XSDLocation - -__class__ - -__delattr__ - -__dict__ - -__doc__ - -__format__ - -__getattribute__ - -__hash__ - -__httpchercheurs_edf_comlogicielsefficas_T_commandes_httpchercheurs_edf_comlogicielsefficasOPER - -__httpchercheurs_edf_comlogicielsefficas_T_commandes_httpchercheurs_edf_comlogicielsefficasPROC - -__init__ - -__module__ - -__new__ - -__reduce__ - -__reduce_ex__ - -__repr__ - -__setattr__ - -__sizeof__ - -__str__ - -__subclasshook__ - -__weakref__ - -_addContent - -_appendWildcardElement - -_automatonConfiguration - -_complexTypeDefinition__NeedWarnOnContent - -_complexTypeDefinition__WarnOnContent - -_complexTypeDefinition__automatonConfiguration - -_complexTypeDefinition__childrenForDOM - -_complexTypeDefinition__content - -_complexTypeDefinition__setContent - -_complexTypeDefinition__wildcardAttributeMap - -_complexTypeDefinition__wildcardElements - -_constructedWithValue - -_description - -_diagnosticName - -_element - -_finalizeContentModel - -_isNil - -_location - -_namespaceContext - -_performValidation - -_postDOMValidate - -_postFactory_vx - -_resetAutomaton - -_resetContent - -_setAttribute - -_setAttributesFromKeywordsAndDOM - -_setDOMFromAttributes - -_setElement - -_setIsNil - -_setLocation - -_setNamespaceContext - -_setValidationConfig - -_substitutesFor - -_symbolSet - -_toDOM_csc - -_validateAttributes - -_validateBinding_vx - -_validatedChildren - -_validationConfig - -_validationConfig_ - -append - -content - -extend - -orderedContent - -reset - -toDOM - -toxml - -validateBinding - -value - -wildcardAttributeMap - -wildcardElements - -xsdConstraintsOK - -_______________________ -je passe ds CreerAccas -PlageValeur -ValeurDef -doc -portee -statut -o -typeAttendu -TXM -validators -_______________________ diff --git a/EssaiInit/efficas.py b/EssaiInit/efficas.py deleted file mode 100644 index 3304e8af..00000000 --- a/EssaiInit/efficas.py +++ /dev/null @@ -1,2 +0,0 @@ -# -*- coding: utf-8 -*- -from raw.efficas import * diff --git a/EssaiInit/model.xsd b/EssaiInit/model.xsd deleted file mode 100755 index 53fe25af..00000000 --- a/EssaiInit/model.xsd +++ /dev/null @@ -1,595 +0,0 @@ - - - - - - - - - - - - - - - - - - SIMP devrait être selectionné que si .//SIMP[portee='Global'] - - - - - - - - - - - SIMP devrait être selectionné que si .//SIMP[portee='Global'] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - La valuer -1 equivaut à oo - - - - - - - - - - - - - - - - - - - - - - - - - - La portée pouurait devenir un attribut de SIMP. Une autre solution consisterait a créer un SIMPG pour distinguer les @nom uniques des SIMP a portée globale des autres. - - - - - - - - - - - - - - La valuer -1 equivaut à oo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Référence une position dans un fichier maître contenant une liste de références à des pages de documentations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/EssaiInit/raw/__init__.py b/EssaiInit/raw/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/EssaiInit/raw/efficas.py b/EssaiInit/raw/efficas.py deleted file mode 100644 index de150a9a..00000000 --- a/EssaiInit/raw/efficas.py +++ /dev/null @@ -1,2685 +0,0 @@ -# ./raw/efficas.py -# -*- coding: utf-8 -*- -# PyXB bindings for NM:759f40938b7670cd6d5941e706557eb2115fb17f -# Generated 2016-11-23 16:51:37.568270 by PyXB version 1.2.3 -# Namespace http://chercheurs.edf.com/logiciels/efficas - -import pyxb -import pyxb.binding -import pyxb.binding.saxer -import io -import pyxb.utils.utility -import pyxb.utils.domutils -import sys - -# Unique identifier for bindings created at the same time -_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:b79c3f70-b194-11e6-bb0f-b05adafd94d6') - -# Version of PyXB used to generate the bindings -_PyXBVersion = '1.2.3' -# Generated bindings are not compatible across PyXB versions -if pyxb.__version__ != _PyXBVersion: - raise pyxb.PyXBVersionError(_PyXBVersion) - -# Import bindings for namespaces imported into schema -import pyxb.binding.datatypes - -# NOTE: All namespace declarations are reserved within the binding -Namespace = pyxb.namespace.NamespaceForURI(u'http://chercheurs.edf.com/logiciels/efficas', create_if_missing=True) -Namespace.configureCategories(['typeBinding', 'elementBinding']) - -def CreateFromDocument (xml_text, default_namespace=None, location_base=None): - """Parse the given XML and use the document element to create a - Python instance. - - @param xml_text An XML document. This should be data (Python 2 - str or Python 3 bytes), or a text (Python 2 unicode or Python 3 - str) in the L{pyxb._InputEncoding} encoding. - - @keyword default_namespace The L{pyxb.Namespace} instance to use as the - default namespace where there is no default namespace in scope. - If unspecified or C{None}, the namespace of the module containing - this function will be used. - - @keyword location_base: An object to be recorded as the base of all - L{pyxb.utils.utility.Location} instances associated with events and - objects handled by the parser. You might pass the URI from which - the document was obtained. - """ - - if pyxb.XMLStyle_saxer != pyxb._XMLStyle: - dom = pyxb.utils.domutils.StringToDOM(xml_text) - return CreateFromDOM(dom.documentElement) - if default_namespace is None: - default_namespace = Namespace.fallbackNamespace() - saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) - handler = saxer.getContentHandler() - xmld = xml_text - if isinstance(xmld, unicode): - xmld = xmld.encode(pyxb._InputEncoding) - saxer.parse(io.BytesIO(xmld)) - instance = handler.rootObject() - return instance - -def CreateFromDOM (node, default_namespace=None): - """Create a Python instance from the given DOM node. - The node tag must correspond to an element declaration in this module. - - @deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" - if default_namespace is None: - default_namespace = Namespace.fallbackNamespace() - return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) - - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_fonction_python -class T_fonction_python (pyxb.binding.datatypes.string): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_fonction_python') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 154, 1) - _Documentation = None -T_fonction_python._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_fonction_python', T_fonction_python) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_statut -class AT_statut (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_statut') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 190, 1) - _Documentation = None -AT_statut._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=AT_statut, enum_prefix=None) -AT_statut.f = AT_statut._CF_enumeration.addEnumeration(unicode_value=u'f', tag=u'f') -AT_statut.o = AT_statut._CF_enumeration.addEnumeration(unicode_value=u'o', tag=u'o') -AT_statut._InitializeFacetMap(AT_statut._CF_enumeration) -Namespace.addCategoryObject('typeBinding', u'AT_statut', AT_statut) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_portee -class T_portee (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_portee') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 202, 1) - _Documentation = None -T_portee._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_portee, enum_prefix=None) -T_portee.None_ = T_portee._CF_enumeration.addEnumeration(unicode_value=u'None', tag=u'None_') -T_portee.Global = T_portee._CF_enumeration.addEnumeration(unicode_value=u'Global', tag=u'Global') -T_portee._InitializeFacetMap(T_portee._CF_enumeration) -Namespace.addCategoryObject('typeBinding', u'T_portee', T_portee) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_max_occurs -class AT_max_occurs (pyxb.binding.datatypes.long): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_max_occurs') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 208, 1) - _Documentation = None -AT_max_occurs._CF_minInclusive = pyxb.binding.facets.CF_minInclusive(value_datatype=AT_max_occurs, value=pyxb.binding.datatypes.long(-1L)) -AT_max_occurs._InitializeFacetMap(AT_max_occurs._CF_minInclusive) -Namespace.addCategoryObject('typeBinding', u'AT_max_occurs', AT_max_occurs) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_min_occurs -class AT_min_occurs (pyxb.binding.datatypes.long): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_min_occurs') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 213, 1) - _Documentation = None -AT_min_occurs._CF_minExclusive = pyxb.binding.facets.CF_minExclusive(value_datatype=pyxb.binding.datatypes.long, value=pyxb.binding.datatypes.integer(0L)) -AT_min_occurs._InitializeFacetMap(AT_min_occurs._CF_minExclusive) -Namespace.addCategoryObject('typeBinding', u'AT_min_occurs', AT_min_occurs) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_ag -class AT_ag (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_ag') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 226, 1) - _Documentation = None -AT_ag._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=AT_ag, enum_prefix=None) -AT_ag.No_comment = AT_ag._CF_enumeration.addEnumeration(unicode_value=u'No comment', tag=u'No_comment') -AT_ag._InitializeFacetMap(AT_ag._CF_enumeration) -Namespace.addCategoryObject('typeBinding', u'AT_ag', AT_ag) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_docu -class AT_docu (pyxb.binding.datatypes.string): - - """Référence une position dans un fichier maître contenant une liste de références à des pages de documentations""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_docu') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 231, 1) - _Documentation = u'R\xe9f\xe9rence une position dans un fichier ma\xeetre contenant une liste de r\xe9f\xe9rences \xe0 des pages de documentations' -AT_docu._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'AT_docu', AT_docu) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_valeur_sugg -class AT_valeur_sugg (pyxb.binding.datatypes.string): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_valeur_sugg') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 237, 1) - _Documentation = None -AT_valeur_sugg._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'AT_valeur_sugg', AT_valeur_sugg) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_nom -class AT_nom (pyxb.binding.datatypes.string): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_nom') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 241, 1) - _Documentation = None -AT_nom._CF_pattern = pyxb.binding.facets.CF_pattern() -AT_nom._CF_pattern.addPattern(pattern=u'([A-Z]|[a-z]|_)([A-Z]|[a-z]|_|[0-9])*') -AT_nom._InitializeFacetMap(AT_nom._CF_pattern) -Namespace.addCategoryObject('typeBinding', u'AT_nom', AT_nom) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_validators -class T_validators (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_validators') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 303, 1) - _Documentation = None -T_validators._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_validators, enum_prefix=None) -T_validators.NoRepeat = T_validators._CF_enumeration.addEnumeration(unicode_value=u'NoRepeat', tag=u'NoRepeat') -T_validators.OnlyStr = T_validators._CF_enumeration.addEnumeration(unicode_value=u'OnlyStr', tag=u'OnlyStr') -T_validators.VerifExiste = T_validators._CF_enumeration.addEnumeration(unicode_value=u'VerifExiste', tag=u'VerifExiste') -T_validators.VerifTypeTuple = T_validators._CF_enumeration.addEnumeration(unicode_value=u'VerifTypeTuple', tag=u'VerifTypeTuple') -T_validators._InitializeFacetMap(T_validators._CF_enumeration) -Namespace.addCategoryObject('typeBinding', u'T_validators', T_validators) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_Bool -class T_Bool (pyxb.binding.datatypes.boolean): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Bool') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 311, 1) - _Documentation = None -T_Bool._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_Bool', T_Bool) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_I -class T_I (pyxb.binding.datatypes.int): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_I') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 317, 1) - _Documentation = None -T_I._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_I', T_I) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_R -class T_R (pyxb.binding.datatypes.double): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_R') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 323, 1) - _Documentation = None -T_R._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_R', T_R) - -# List simple type: [anonymous] -# superclasses pyxb.binding.datatypes.anySimpleType -class STD_ANON (pyxb.binding.basis.STD_list): - - """Simple type that is a list of pyxb.binding.datatypes.double.""" - - _ExpandedName = None - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 338, 3) - _Documentation = None - - _ItemType = pyxb.binding.datatypes.double -STD_ANON._InitializeFacetMap() - -# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_list_C -# superclasses pyxb.binding.datatypes.anySimpleType -class T_list_C (pyxb.binding.basis.STD_list): - - """Simple type that is a list of pyxb.binding.datatypes.double.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_list_C') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 347, 1) - _Documentation = None - - _ItemType = pyxb.binding.datatypes.double -T_list_C._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_list_C', T_list_C) - -# Atomic simple type: [anonymous] -class STD_ANON_ (pyxb.binding.datatypes.string): - - """An atomic simple type.""" - - _ExpandedName = None - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 402, 3) - _Documentation = None -STD_ANON_._CF_whiteSpace = pyxb.binding.facets.CF_whiteSpace(value=pyxb.binding.facets._WhiteSpace_enum.preserve) -STD_ANON_._InitializeFacetMap(STD_ANON_._CF_whiteSpace) - -# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_list_double -# superclasses pyxb.binding.datatypes.anySimpleType -class T_list_double (pyxb.binding.basis.STD_list): - - """Simple type that is a list of pyxb.binding.datatypes.double.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_list_double') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 428, 1) - _Documentation = None - - _ItemType = pyxb.binding.datatypes.double -T_list_double._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_list_double', T_list_double) - -# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_predicat1 -# superclasses pyxb.binding.datatypes.anySimpleType -class T_predicat1 (pyxb.binding.basis.STD_list): - - """Simple type that is a list of AT_nom.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_predicat1') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 246, 1) - _Documentation = None - - _ItemType = AT_nom -T_predicat1._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_predicat1', T_predicat1) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_subroutine -class AT_subroutine (AT_nom): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_subroutine') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 300, 1) - _Documentation = None -AT_subroutine._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'AT_subroutine', AT_subroutine) - -# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_list_Bool -# superclasses pyxb.binding.datatypes.anySimpleType -class T_list_Bool (pyxb.binding.basis.STD_list): - - """Simple type that is a list of T_Bool.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_list_Bool') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 314, 1) - _Documentation = None - - _ItemType = T_Bool -T_list_Bool._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_list_Bool', T_list_Bool) - -# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_list_I -# superclasses pyxb.binding.datatypes.anySimpleType -class T_list_I (pyxb.binding.basis.STD_list): - - """Simple type that is a list of T_I.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_list_I') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 320, 1) - _Documentation = None - - _ItemType = T_I -T_list_I._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_list_I', T_list_I) - -# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_list_R -# superclasses pyxb.binding.datatypes.anySimpleType -class T_list_R (pyxb.binding.basis.STD_list): - - """Simple type that is a list of T_R.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_list_R') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 326, 1) - _Documentation = None - - _ItemType = T_R -T_list_R._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_list_R', T_list_R) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_TXM -class T_TXM (AT_nom): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_TXM') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 329, 1) - _Documentation = None -T_TXM._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_TXM', T_TXM) - -# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_C -# superclasses STD_ANON -class T_C (pyxb.binding.basis.STD_list): - - """Simple type that is a list of pyxb.binding.datatypes.double.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_C') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 336, 1) - _Documentation = None - - _ItemType = pyxb.binding.datatypes.double -T_C._CF_maxLength = pyxb.binding.facets.CF_maxLength(value=pyxb.binding.datatypes.nonNegativeInteger(2L)) -T_C._CF_minLength = pyxb.binding.facets.CF_minLength(value=pyxb.binding.datatypes.nonNegativeInteger(2L)) -T_C._InitializeFacetMap(T_C._CF_maxLength, - T_C._CF_minLength) -Namespace.addCategoryObject('typeBinding', u'T_C', T_C) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_name_base -class T_name_base (AT_nom): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_name_base') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 350, 1) - _Documentation = None -T_name_base._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_name_base', T_name_base) - -# Atomic simple type: [anonymous] -class STD_ANON_2 (AT_nom, pyxb.binding.basis.enumeration_mixin): - - """An atomic simple type.""" - - _ExpandedName = None - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 385, 3) - _Documentation = None -STD_ANON_2._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=STD_ANON_2, enum_prefix=None) -STD_ANON_2.T_Matrice_double = STD_ANON_2._CF_enumeration.addEnumeration(unicode_value=u'T_Matrice_double', tag=u'T_Matrice_double') -STD_ANON_2.T_Matrice_Symetrique_double = STD_ANON_2._CF_enumeration.addEnumeration(unicode_value=u'T_Matrice_Symetrique_double', tag=u'T_Matrice_Symetrique_double') -STD_ANON_2.T_tuple = STD_ANON_2._CF_enumeration.addEnumeration(unicode_value=u'T_tuple', tag=u'T_tuple') -STD_ANON_2.T_classe_utilisateur = STD_ANON_2._CF_enumeration.addEnumeration(unicode_value=u'T_classe_utilisateur', tag=u'T_classe_utilisateur') -STD_ANON_2._InitializeFacetMap(STD_ANON_2._CF_enumeration) - -# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_Repertoire -# superclasses pyxb.binding.datatypes.anySimpleType -class T_Repertoire (pyxb.binding.basis.STD_list): - - """Simple type that is a list of STD_ANON_.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Repertoire') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 400, 1) - _Documentation = None - - _ItemType = STD_ANON_ -T_Repertoire._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_Repertoire', T_Repertoire) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_classe_utilisateur -class T_classe_utilisateur (AT_nom): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_classe_utilisateur') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 461, 1) - _Documentation = None -T_classe_utilisateur._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_classe_utilisateur', T_classe_utilisateur) - -# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_list_TXM -# superclasses pyxb.binding.datatypes.anySimpleType -class T_list_TXM (pyxb.binding.basis.STD_list): - - """Simple type that is a list of T_TXM.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_list_TXM') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 332, 1) - _Documentation = None - - _ItemType = T_TXM -T_list_TXM._InitializeFacetMap() -Namespace.addCategoryObject('typeBinding', u'T_list_TXM', T_list_TXM) - -# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_simple_name -class T_simple_name (T_name_base, pyxb.binding.basis.enumeration_mixin): - - """An atomic simple type.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_simple_name') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 353, 1) - _Documentation = None -T_simple_name._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_simple_name, enum_prefix=None) -T_simple_name.Fichier = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'Fichier', tag=u'Fichier') -T_simple_name.Repertoire = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'Repertoire', tag=u'Repertoire') -T_simple_name.TXM = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'TXM', tag=u'TXM') -T_simple_name.I = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'I', tag=u'I') -T_simple_name.R = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'R', tag=u'R') -T_simple_name.C = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'C', tag=u'C') -T_simple_name.Bool = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'Bool', tag=u'Bool') -T_simple_name.grma = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'grma', tag=u'grma') -T_simple_name.grno = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'grno', tag=u'grno') -T_simple_name.SalomeEntry = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'SalomeEntry', tag=u'SalomeEntry') -T_simple_name._InitializeFacetMap(T_simple_name._CF_enumeration) -Namespace.addCategoryObject('typeBinding', u'T_simple_name', T_simple_name) - -# Union simple type: {http://chercheurs.edf.com/logiciels/efficas}T_name -# superclasses pyxb.binding.datatypes.anySimpleType -class T_name (pyxb.binding.basis.STD_union): - - """Simple type that is a union of T_simple_name, STD_ANON_2.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_name') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 383, 1) - _Documentation = None - - _MemberTypes = ( T_simple_name, STD_ANON_2, ) -T_name._CF_pattern = pyxb.binding.facets.CF_pattern() -T_name._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_name) -T_name.Fichier = u'Fichier' # originally T_simple_name.Fichier -T_name.Repertoire = u'Repertoire' # originally T_simple_name.Repertoire -T_name.TXM = u'TXM' # originally T_simple_name.TXM -T_name.I = u'I' # originally T_simple_name.I -T_name.R = u'R' # originally T_simple_name.R -T_name.C = u'C' # originally T_simple_name.C -T_name.Bool = u'Bool' # originally T_simple_name.Bool -T_name.grma = u'grma' # originally T_simple_name.grma -T_name.grno = u'grno' # originally T_simple_name.grno -T_name.SalomeEntry = u'SalomeEntry' # originally T_simple_name.SalomeEntry -T_name.T_Matrice_double = u'T_Matrice_double' # originally STD_ANON_2.T_Matrice_double -T_name.T_Matrice_Symetrique_double = u'T_Matrice_Symetrique_double'# originally STD_ANON_2.T_Matrice_Symetrique_double -T_name.T_tuple = u'T_tuple' # originally STD_ANON_2.T_tuple -T_name.T_classe_utilisateur = u'T_classe_utilisateur'# originally STD_ANON_2.T_classe_utilisateur -T_name._InitializeFacetMap(T_name._CF_pattern, - T_name._CF_enumeration) -Namespace.addCategoryObject('typeBinding', u'T_name', T_name) - -# Union simple type: {http://chercheurs.edf.com/logiciels/efficas}T_simple -# superclasses pyxb.binding.datatypes.anySimpleType -class T_simple (pyxb.binding.basis.STD_union): - - """Simple type that is a union of T_I, T_list_I, T_R, T_list_R, T_C, T_list_C, T_TXM, T_list_TXM, T_Bool, T_list_Bool, T_Repertoire.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_simple') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 409, 1) - _Documentation = None - - _MemberTypes = ( T_I, T_list_I, T_R, T_list_R, T_C, T_list_C, T_TXM, T_list_TXM, T_Bool, T_list_Bool, T_Repertoire, ) -T_simple._CF_pattern = pyxb.binding.facets.CF_pattern() -T_simple._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_simple) -T_simple._InitializeFacetMap(T_simple._CF_pattern, - T_simple._CF_enumeration) -Namespace.addCategoryObject('typeBinding', u'T_simple', T_simple) - -# Union simple type: {http://chercheurs.edf.com/logiciels/efficas}T_classe_utilisateur_name -# superclasses T_name, pyxb.binding.basis.enumeration_mixin -class T_classe_utilisateur_name (pyxb.binding.basis.STD_union): - - """Simple type that is a union of T_simple_name, STD_ANON_2.""" - - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_classe_utilisateur_name') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 371, 1) - _Documentation = None - - _MemberTypes = ( T_simple_name, STD_ANON_2, ) -T_classe_utilisateur_name._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_classe_utilisateur_name, enum_prefix=None) -T_classe_utilisateur_name.T_classe_utilisateur = T_classe_utilisateur_name._CF_enumeration.addEnumeration(unicode_value=u'T_classe_utilisateur', tag=u'T_classe_utilisateur') -T_classe_utilisateur_name._InitializeFacetMap(T_classe_utilisateur_name._CF_enumeration) -Namespace.addCategoryObject('typeBinding', u'T_classe_utilisateur_name', T_classe_utilisateur_name) - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_cata with content type ELEMENT_ONLY -class T_cata (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_cata with content type ELEMENT_ONLY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_cata') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 66, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - - # Element {http://chercheurs.edf.com/logiciels/efficas}commandes uses Python identifier commandes - __commandes = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'commandes'), 'commandes', '__httpchercheurs_edf_comlogicielsefficas_T_cata_httpchercheurs_edf_comlogicielsefficascommandes', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 11, 1), ) - - - commandes = property(__commandes.value, __commandes.set, None, None) - - _ElementMap.update({ - __commandes.name() : __commandes - }) - _AttributeMap.update({ - - }) -Namespace.addCategoryObject('typeBinding', u'T_cata', T_cata) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_commandes with content type ELEMENT_ONLY -class T_commandes (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_commandes with content type ELEMENT_ONLY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_commandes') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 71, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - - # Element {http://chercheurs.edf.com/logiciels/efficas}OPER uses Python identifier OPER - __OPER = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'OPER'), 'OPER', '__httpchercheurs_edf_comlogicielsefficas_T_commandes_httpchercheurs_edf_comlogicielsefficasOPER', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 99, 1), ) - - - OPER = property(__OPER.value, __OPER.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}PROC uses Python identifier PROC - __PROC = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'PROC'), 'PROC', '__httpchercheurs_edf_comlogicielsefficas_T_commandes_httpchercheurs_edf_comlogicielsefficasPROC', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 110, 1), ) - - - PROC = property(__PROC.value, __PROC.set, None, None) - - _ElementMap.update({ - __OPER.name() : __OPER, - __PROC.name() : __PROC - }) - _AttributeMap.update({ - - }) -Namespace.addCategoryObject('typeBinding', u'T_commandes', T_commandes) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Cardinalite with content type EMPTY -class T_Cardinalite (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Cardinalite with content type EMPTY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Cardinalite') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 77, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - _ElementMap.update({ - - }) - _AttributeMap.update({ - - }) -Namespace.addCategoryObject('typeBinding', u'T_Cardinalite', T_Cardinalite) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_PlageValeur with content type ELEMENT_ONLY -class T_PlageValeur (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_PlageValeur with content type ELEMENT_ONLY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_PlageValeur') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 78, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - - # Element {http://chercheurs.edf.com/logiciels/efficas}borne_sup uses Python identifier borne_sup - __borne_sup = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'borne_sup'), 'borne_sup', '__httpchercheurs_edf_comlogicielsefficas_T_PlageValeur_httpchercheurs_edf_comlogicielsefficasborne_sup', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 46, 1), ) - - - borne_sup = property(__borne_sup.value, __borne_sup.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}borne_inf uses Python identifier borne_inf - __borne_inf = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'borne_inf'), 'borne_inf', '__httpchercheurs_edf_comlogicielsefficas_T_PlageValeur_httpchercheurs_edf_comlogicielsefficasborne_inf', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 47, 1), ) - - - borne_inf = property(__borne_inf.value, __borne_inf.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}into uses Python identifier into - __into = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'into'), 'into', '__httpchercheurs_edf_comlogicielsefficas_T_PlageValeur_httpchercheurs_edf_comlogicielsefficasinto', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 49, 1), ) - - - into = property(__into.value, __into.set, None, None) - - _ElementMap.update({ - __borne_sup.name() : __borne_sup, - __borne_inf.name() : __borne_inf, - __into.name() : __into - }) - _AttributeMap.update({ - - }) -Namespace.addCategoryObject('typeBinding', u'T_PlageValeur', T_PlageValeur) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_predicat2 with content type ELEMENT_ONLY -class T_predicat2 (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_predicat2 with content type ELEMENT_ONLY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_predicat2') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 250, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - - # Element {http://chercheurs.edf.com/logiciels/efficas}p1 uses Python identifier p1 - __p1 = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'p1'), 'p1', '__httpchercheurs_edf_comlogicielsefficas_T_predicat2_httpchercheurs_edf_comlogicielsefficasp1', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 252, 3), ) - - - p1 = property(__p1.value, __p1.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}p2 uses Python identifier p2 - __p2 = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'p2'), 'p2', '__httpchercheurs_edf_comlogicielsefficas_T_predicat2_httpchercheurs_edf_comlogicielsefficasp2', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 253, 3), ) - - - p2 = property(__p2.value, __p2.set, None, None) - - _ElementMap.update({ - __p1.name() : __p1, - __p2.name() : __p2 - }) - _AttributeMap.update({ - - }) -Namespace.addCategoryObject('typeBinding', u'T_predicat2', T_predicat2) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_regles with content type ELEMENT_ONLY -class T_regles (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_regles with content type ELEMENT_ONLY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_regles') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 291, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - - # Element {http://chercheurs.edf.com/logiciels/efficas}A_CLASSER uses Python identifier A_CLASSER - __A_CLASSER = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'A_CLASSER'), 'A_CLASSER', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasA_CLASSER', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 257, 1), ) - - - A_CLASSER = property(__A_CLASSER.value, __A_CLASSER.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}AU_MOINS_UN uses Python identifier AU_MOINS_UN - __AU_MOINS_UN = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'AU_MOINS_UN'), 'AU_MOINS_UN', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasAU_MOINS_UN', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 258, 1), ) - - - AU_MOINS_UN = property(__AU_MOINS_UN.value, __AU_MOINS_UN.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}AU_PLUS_UN uses Python identifier AU_PLUS_UN - __AU_PLUS_UN = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'AU_PLUS_UN'), 'AU_PLUS_UN', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasAU_PLUS_UN', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 259, 1), ) - - - AU_PLUS_UN = property(__AU_PLUS_UN.value, __AU_PLUS_UN.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}ENSEMBLE uses Python identifier ENSEMBLE - __ENSEMBLE = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'ENSEMBLE'), 'ENSEMBLE', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasENSEMBLE', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 260, 1), ) - - - ENSEMBLE = property(__ENSEMBLE.value, __ENSEMBLE.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}EXCLUS uses Python identifier EXCLUS - __EXCLUS = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'EXCLUS'), 'EXCLUS', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasEXCLUS', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 261, 1), ) - - - EXCLUS = property(__EXCLUS.value, __EXCLUS.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}PRESENT_ABSENT uses Python identifier PRESENT_ABSENT - __PRESENT_ABSENT = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_ABSENT'), 'PRESENT_ABSENT', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasPRESENT_ABSENT', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 269, 1), ) - - - PRESENT_ABSENT = property(__PRESENT_ABSENT.value, __PRESENT_ABSENT.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}PRESENT_PRESENT uses Python identifier PRESENT_PRESENT - __PRESENT_PRESENT = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_PRESENT'), 'PRESENT_PRESENT', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasPRESENT_PRESENT', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 270, 1), ) - - - PRESENT_PRESENT = property(__PRESENT_PRESENT.value, __PRESENT_PRESENT.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}UN_PARMI uses Python identifier UN_PARMI - __UN_PARMI = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'UN_PARMI'), 'UN_PARMI', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasUN_PARMI', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 271, 1), ) - - - UN_PARMI = property(__UN_PARMI.value, __UN_PARMI.set, None, None) - - _ElementMap.update({ - __A_CLASSER.name() : __A_CLASSER, - __AU_MOINS_UN.name() : __AU_MOINS_UN, - __AU_PLUS_UN.name() : __AU_PLUS_UN, - __ENSEMBLE.name() : __ENSEMBLE, - __EXCLUS.name() : __EXCLUS, - __PRESENT_ABSENT.name() : __PRESENT_ABSENT, - __PRESENT_PRESENT.name() : __PRESENT_PRESENT, - __UN_PARMI.name() : __UN_PARMI - }) - _AttributeMap.update({ - - }) -Namespace.addCategoryObject('typeBinding', u'T_regles', T_regles) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_grma with content type EMPTY -class T_grma (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_grma with content type EMPTY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_grma') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 395, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - _ElementMap.update({ - - }) - _AttributeMap.update({ - - }) -Namespace.addCategoryObject('typeBinding', u'T_grma', T_grma) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_grno with content type EMPTY -class T_grno (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_grno with content type EMPTY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_grno') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 396, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - _ElementMap.update({ - - }) - _AttributeMap.update({ - - }) -Namespace.addCategoryObject('typeBinding', u'T_grno', T_grno) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_SalomeEntry with content type EMPTY -class T_SalomeEntry (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_SalomeEntry with content type EMPTY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_SalomeEntry') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 397, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - _ElementMap.update({ - - }) - _AttributeMap.update({ - - }) -Namespace.addCategoryObject('typeBinding', u'T_SalomeEntry', T_SalomeEntry) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Fichier with content type EMPTY -class T_Fichier (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Fichier with content type EMPTY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Fichier') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 398, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - _ElementMap.update({ - - }) - _AttributeMap.update({ - - }) -Namespace.addCategoryObject('typeBinding', u'T_Fichier', T_Fichier) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_tuple with content type SIMPLE -class T_tuple (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_tuple with content type SIMPLE""" - _TypeDefinition = pyxb.binding.datatypes.anySimpleType - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_SIMPLE - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_tuple') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 454, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anySimpleType - - # Attribute n uses Python identifier n - __n = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'n'), 'n', '__httpchercheurs_edf_comlogicielsefficas_T_tuple_n', pyxb.binding.datatypes.int, required=True) - __n._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 457, 4) - __n._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 457, 4) - - n = property(__n.value, __n.set, None, None) - - _ElementMap.update({ - - }) - _AttributeMap.update({ - __n.name() : __n - }) -Namespace.addCategoryObject('typeBinding', u'T_tuple', T_tuple) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_into with content type ELEMENT_ONLY -class T_into (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_into with content type ELEMENT_ONLY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_into') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 501, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - - # Element {http://chercheurs.edf.com/logiciels/efficas}fonction_utilisateur uses Python identifier fonction_utilisateur - __fonction_utilisateur = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'fonction_utilisateur'), 'fonction_utilisateur', '__httpchercheurs_edf_comlogicielsefficas_T_into_httpchercheurs_edf_comlogicielsefficasfonction_utilisateur', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 10, 1), ) - - - fonction_utilisateur = property(__fonction_utilisateur.value, __fonction_utilisateur.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}typesimple uses Python identifier typesimple - __typesimple = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'typesimple'), 'typesimple', '__httpchercheurs_edf_comlogicielsefficas_T_into_httpchercheurs_edf_comlogicielsefficastypesimple', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 464, 1), ) - - - typesimple = property(__typesimple.value, __typesimple.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}matrice_double uses Python identifier matrice_double - __matrice_double = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'matrice_double'), 'matrice_double', '__httpchercheurs_edf_comlogicielsefficas_T_into_httpchercheurs_edf_comlogicielsefficasmatrice_double', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 465, 1), ) - - - matrice_double = property(__matrice_double.value, __matrice_double.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}matrice_symetrique_double uses Python identifier matrice_symetrique_double - __matrice_symetrique_double = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'matrice_symetrique_double'), 'matrice_symetrique_double', '__httpchercheurs_edf_comlogicielsefficas_T_into_httpchercheurs_edf_comlogicielsefficasmatrice_symetrique_double', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 466, 1), ) - - - matrice_symetrique_double = property(__matrice_symetrique_double.value, __matrice_symetrique_double.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}tuple uses Python identifier tuple - __tuple = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'tuple'), 'tuple', '__httpchercheurs_edf_comlogicielsefficas_T_into_httpchercheurs_edf_comlogicielsefficastuple', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 467, 1), ) - - - tuple = property(__tuple.value, __tuple.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}classe_utilisateur uses Python identifier classe_utilisateur - __classe_utilisateur = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'classe_utilisateur'), 'classe_utilisateur', '__httpchercheurs_edf_comlogicielsefficas_T_into_httpchercheurs_edf_comlogicielsefficasclasse_utilisateur', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 468, 1), ) - - - classe_utilisateur = property(__classe_utilisateur.value, __classe_utilisateur.set, None, None) - - _ElementMap.update({ - __fonction_utilisateur.name() : __fonction_utilisateur, - __typesimple.name() : __typesimple, - __matrice_double.name() : __matrice_double, - __matrice_symetrique_double.name() : __matrice_symetrique_double, - __tuple.name() : __tuple, - __classe_utilisateur.name() : __classe_utilisateur - }) - _AttributeMap.update({ - - }) -Namespace.addCategoryObject('typeBinding', u'T_into', T_into) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_doc with content type EMPTY -class T_doc (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_doc with content type EMPTY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_doc') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 61, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}fr uses Python identifier fr - __fr = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'fr'), 'fr', '__httpchercheurs_edf_comlogicielsefficas_T_doc_httpchercheurs_edf_comlogicielsefficasfr', pyxb.binding.datatypes.string) - __fr._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 53, 1) - __fr._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 62, 2) - - fr = property(__fr.value, __fr.set, None, None) - - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}ang uses Python identifier ang - __ang = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'ang'), 'ang', '__httpchercheurs_edf_comlogicielsefficas_T_doc_httpchercheurs_edf_comlogicielsefficasang', pyxb.binding.datatypes.string) - __ang._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 54, 1) - __ang._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 63, 2) - - ang = property(__ang.value, __ang.set, None, None) - - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}docu uses Python identifier docu - __docu = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'docu'), 'docu', '__httpchercheurs_edf_comlogicielsefficas_T_doc_httpchercheurs_edf_comlogicielsefficasdocu', AT_docu) - __docu._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 55, 1) - __docu._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 64, 2) - - docu = property(__docu.value, __docu.set, None, None) - - _ElementMap.update({ - - }) - _AttributeMap.update({ - __fr.name() : __fr, - __ang.name() : __ang, - __docu.name() : __docu - }) -Namespace.addCategoryObject('typeBinding', u'T_doc', T_doc) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common with content type ELEMENT_ONLY -class T_Accas_Common (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common with content type ELEMENT_ONLY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Accas.Common') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 87, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - - # Element {http://chercheurs.edf.com/logiciels/efficas}doc uses Python identifier doc - __doc = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'doc'), 'doc', '__httpchercheurs_edf_comlogicielsefficas_T_Accas_Common_httpchercheurs_edf_comlogicielsefficasdoc', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 4, 1), ) - - - doc = property(__doc.value, __doc.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}regles uses Python identifier regles - __regles = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'regles'), 'regles', '__httpchercheurs_edf_comlogicielsefficas_T_Accas_Common_httpchercheurs_edf_comlogicielsefficasregles', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 6, 1), ) - - - regles = property(__regles.value, __regles.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}SIMP uses Python identifier SIMP - __SIMP = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'SIMP'), 'SIMP', '__httpchercheurs_edf_comlogicielsefficas_T_Accas_Common_httpchercheurs_edf_comlogicielsefficasSIMP', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 43, 1), ) - - - SIMP = property(__SIMP.value, __SIMP.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}FACT uses Python identifier FACT - __FACT = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'FACT'), 'FACT', '__httpchercheurs_edf_comlogicielsefficas_T_Accas_Common_httpchercheurs_edf_comlogicielsefficasFACT', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 123, 1), ) - - - FACT = property(__FACT.value, __FACT.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}BLOC uses Python identifier BLOC - __BLOC = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'BLOC'), 'BLOC', '__httpchercheurs_edf_comlogicielsefficas_T_Accas_Common_httpchercheurs_edf_comlogicielsefficasBLOC', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 157, 1), ) - - - BLOC = property(__BLOC.value, __BLOC.set, None, None) - - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}nom uses Python identifier nom - __nom = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'nom'), 'nom', '__httpchercheurs_edf_comlogicielsefficas_T_Accas_Common_httpchercheurs_edf_comlogicielsefficasnom', AT_nom, required=True) - __nom._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 51, 1) - __nom._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 97, 2) - - nom = property(__nom.value, __nom.set, None, None) - - _ElementMap.update({ - __doc.name() : __doc, - __regles.name() : __regles, - __SIMP.name() : __SIMP, - __FACT.name() : __FACT, - __BLOC.name() : __BLOC - }) - _AttributeMap.update({ - __nom.name() : __nom - }) -Namespace.addCategoryObject('typeBinding', u'T_Accas.Common', T_Accas_Common) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_SIMP with content type ELEMENT_ONLY -class T_SIMP (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_SIMP with content type ELEMENT_ONLY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_SIMP') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 167, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is pyxb.binding.datatypes.anyType - - # Element {http://chercheurs.edf.com/logiciels/efficas}doc uses Python identifier doc - __doc = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'doc'), 'doc', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasdoc', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 4, 1), ) - - - doc = property(__doc.value, __doc.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}ValeurDef uses Python identifier ValeurDef - __ValeurDef = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'ValeurDef'), 'ValeurDef', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasValeurDef', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 8, 1), ) - - - ValeurDef = property(__ValeurDef.value, __ValeurDef.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}ValeurSugg uses Python identifier ValeurSugg - __ValeurSugg = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'ValeurSugg'), 'ValeurSugg', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasValeurSugg', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 9, 1), ) - - - ValeurSugg = property(__ValeurSugg.value, __ValeurSugg.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}validators uses Python identifier validators - __validators = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'validators'), 'validators', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasvalidators', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 39, 1), ) - - - validators = property(__validators.value, __validators.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}PlageValeur uses Python identifier PlageValeur - __PlageValeur = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'PlageValeur'), 'PlageValeur', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasPlageValeur', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 40, 1), ) - - - PlageValeur = property(__PlageValeur.value, __PlageValeur.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}typeAttendu uses Python identifier typeAttendu - __typeAttendu = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'typeAttendu'), 'typeAttendu', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficastypeAttendu', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 41, 1), ) - - - typeAttendu = property(__typeAttendu.value, __typeAttendu.set, None, None) - - - # Element {http://chercheurs.edf.com/logiciels/efficas}portee uses Python identifier portee - __portee = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'portee'), 'portee', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasportee', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 44, 1), ) - - - portee = property(__portee.value, __portee.set, None, None) - - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}nom uses Python identifier nom - __nom = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'nom'), 'nom', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasnom', AT_nom, required=True) - __nom._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 51, 1) - __nom._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 181, 2) - - nom = property(__nom.value, __nom.set, None, None) - - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}statut uses Python identifier statut - __statut = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'statut'), 'statut', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasstatut', AT_statut, unicode_default=u'o') - __statut._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 57, 1) - __statut._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 182, 2) - - statut = property(__statut.value, __statut.set, None, None) - - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}max_occurs uses Python identifier max_occurs - __max_occurs = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'max_occurs'), 'max_occurs', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasmax_occurs', AT_max_occurs, unicode_default=u'1') - __max_occurs._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 58, 1) - __max_occurs._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 184, 2) - - max_occurs = property(__max_occurs.value, __max_occurs.set, None, None) - - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}min_occurs uses Python identifier min_occurs - __min_occurs = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'min_occurs'), 'min_occurs', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasmin_occurs', AT_min_occurs, unicode_default=u'1') - __min_occurs._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 59, 1) - __min_occurs._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 183, 2) - - min_occurs = property(__min_occurs.value, __min_occurs.set, None, None) - - _ElementMap.update({ - __doc.name() : __doc, - __ValeurDef.name() : __ValeurDef, - __ValeurSugg.name() : __ValeurSugg, - __validators.name() : __validators, - __PlageValeur.name() : __PlageValeur, - __typeAttendu.name() : __typeAttendu, - __portee.name() : __portee - }) - _AttributeMap.update({ - __nom.name() : __nom, - __statut.name() : __statut, - __max_occurs.name() : __max_occurs, - __min_occurs.name() : __min_occurs - }) -Namespace.addCategoryObject('typeBinding', u'T_SIMP', T_SIMP) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Matrice_double with content type SIMPLE -class T_Matrice_double (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Matrice_double with content type SIMPLE""" - _TypeDefinition = T_list_double - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_SIMPLE - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Matrice_double') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 432, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is T_list_double - - # Attribute n uses Python identifier n - __n = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'n'), 'n', '__httpchercheurs_edf_comlogicielsefficas_T_Matrice_double_n', pyxb.binding.datatypes.integer, required=True) - __n._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 435, 4) - __n._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 435, 4) - - n = property(__n.value, __n.set, None, None) - - - # Attribute m uses Python identifier m - __m = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'm'), 'm', '__httpchercheurs_edf_comlogicielsefficas_T_Matrice_double_m', pyxb.binding.datatypes.integer, required=True) - __m._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 436, 4) - __m._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 436, 4) - - m = property(__m.value, __m.set, None, None) - - _ElementMap.update({ - - }) - _AttributeMap.update({ - __n.name() : __n, - __m.name() : __m - }) -Namespace.addCategoryObject('typeBinding', u'T_Matrice_double', T_Matrice_double) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Matrice_Symetrique_double with content type SIMPLE -class T_Matrice_Symetrique_double (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Matrice_Symetrique_double with content type SIMPLE""" - _TypeDefinition = T_list_double - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_SIMPLE - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Matrice_Symetrique_double') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 441, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is T_list_double - - # Attribute n uses Python identifier n - __n = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'n'), 'n', '__httpchercheurs_edf_comlogicielsefficas_T_Matrice_Symetrique_double_n', pyxb.binding.datatypes.int, required=True) - __n._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 444, 4) - __n._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 444, 4) - - n = property(__n.value, __n.set, None, None) - - _ElementMap.update({ - - }) - _AttributeMap.update({ - __n.name() : __n - }) -Namespace.addCategoryObject('typeBinding', u'T_Matrice_Symetrique_double', T_Matrice_Symetrique_double) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_typeAttendu with content type ELEMENT_ONLY -class T_typeAttendu (T_into): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_typeAttendu with content type ELEMENT_ONLY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_typeAttendu') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 512, 1) - _ElementMap = T_into._ElementMap.copy() - _AttributeMap = T_into._AttributeMap.copy() - # Base type is T_into - - # Element typesimple ({http://chercheurs.edf.com/logiciels/efficas}typesimple) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_into - - # Element matrice_double ({http://chercheurs.edf.com/logiciels/efficas}matrice_double) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_into - - # Element matrice_symetrique_double ({http://chercheurs.edf.com/logiciels/efficas}matrice_symetrique_double) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_into - - # Element tuple ({http://chercheurs.edf.com/logiciels/efficas}tuple) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_into - - # Element classe_utilisateur ({http://chercheurs.edf.com/logiciels/efficas}classe_utilisateur) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_into - _ElementMap.update({ - - }) - _AttributeMap.update({ - - }) -Namespace.addCategoryObject('typeBinding', u'T_typeAttendu', T_typeAttendu) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_OPER with content type ELEMENT_ONLY -class T_OPER (T_Accas_Common): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_OPER with content type ELEMENT_ONLY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_OPER') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 100, 1) - _ElementMap = T_Accas_Common._ElementMap.copy() - _AttributeMap = T_Accas_Common._AttributeMap.copy() - # Base type is T_Accas_Common - - # Element doc ({http://chercheurs.edf.com/logiciels/efficas}doc) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element regles ({http://chercheurs.edf.com/logiciels/efficas}regles) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element {http://chercheurs.edf.com/logiciels/efficas}typeCree uses Python identifier typeCree - __typeCree = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'typeCree'), 'typeCree', '__httpchercheurs_edf_comlogicielsefficas_T_OPER_httpchercheurs_edf_comlogicielsefficastypeCree', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 7, 1), ) - - - typeCree = property(__typeCree.value, __typeCree.set, None, None) - - - # Element SIMP ({http://chercheurs.edf.com/logiciels/efficas}SIMP) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element FACT ({http://chercheurs.edf.com/logiciels/efficas}FACT) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element BLOC ({http://chercheurs.edf.com/logiciels/efficas}BLOC) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Attribute nom inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}subroutine uses Python identifier subroutine - __subroutine = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'subroutine'), 'subroutine', '__httpchercheurs_edf_comlogicielsefficas_T_OPER_httpchercheurs_edf_comlogicielsefficassubroutine', AT_subroutine, unicode_default=u'None') - __subroutine._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 60, 1) - __subroutine._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 106, 4) - - subroutine = property(__subroutine.value, __subroutine.set, None, None) - - _ElementMap.update({ - __typeCree.name() : __typeCree - }) - _AttributeMap.update({ - __subroutine.name() : __subroutine - }) -Namespace.addCategoryObject('typeBinding', u'T_OPER', T_OPER) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_PROC with content type ELEMENT_ONLY -class T_PROC (T_Accas_Common): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_PROC with content type ELEMENT_ONLY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_PROC') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 116, 1) - _ElementMap = T_Accas_Common._ElementMap.copy() - _AttributeMap = T_Accas_Common._AttributeMap.copy() - # Base type is T_Accas_Common - - # Element doc ({http://chercheurs.edf.com/logiciels/efficas}doc) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element regles ({http://chercheurs.edf.com/logiciels/efficas}regles) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element SIMP ({http://chercheurs.edf.com/logiciels/efficas}SIMP) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element FACT ({http://chercheurs.edf.com/logiciels/efficas}FACT) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element BLOC ({http://chercheurs.edf.com/logiciels/efficas}BLOC) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Attribute nom inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}subroutine uses Python identifier subroutine - __subroutine = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'subroutine'), 'subroutine', '__httpchercheurs_edf_comlogicielsefficas_T_PROC_httpchercheurs_edf_comlogicielsefficassubroutine', AT_subroutine, unicode_default=u'None') - __subroutine._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 60, 1) - __subroutine._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 119, 4) - - subroutine = property(__subroutine.value, __subroutine.set, None, None) - - _ElementMap.update({ - - }) - _AttributeMap.update({ - __subroutine.name() : __subroutine - }) -Namespace.addCategoryObject('typeBinding', u'T_PROC', T_PROC) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_FACT with content type ELEMENT_ONLY -class T_FACT (T_Accas_Common): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_FACT with content type ELEMENT_ONLY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_FACT') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 139, 1) - _ElementMap = T_Accas_Common._ElementMap.copy() - _AttributeMap = T_Accas_Common._AttributeMap.copy() - # Base type is T_Accas_Common - - # Element doc ({http://chercheurs.edf.com/logiciels/efficas}doc) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element regles ({http://chercheurs.edf.com/logiciels/efficas}regles) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element SIMP ({http://chercheurs.edf.com/logiciels/efficas}SIMP) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element FACT ({http://chercheurs.edf.com/logiciels/efficas}FACT) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element BLOC ({http://chercheurs.edf.com/logiciels/efficas}BLOC) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Attribute nom inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}statut uses Python identifier statut - __statut = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'statut'), 'statut', '__httpchercheurs_edf_comlogicielsefficas_T_FACT_httpchercheurs_edf_comlogicielsefficasstatut', AT_statut, unicode_default=u'o') - __statut._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 57, 1) - __statut._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 142, 4) - - statut = property(__statut.value, __statut.set, None, None) - - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}max_occurs uses Python identifier max_occurs - __max_occurs = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'max_occurs'), 'max_occurs', '__httpchercheurs_edf_comlogicielsefficas_T_FACT_httpchercheurs_edf_comlogicielsefficasmax_occurs', AT_max_occurs, unicode_default=u'1') - __max_occurs._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 58, 1) - __max_occurs._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 144, 4) - - max_occurs = property(__max_occurs.value, __max_occurs.set, None, None) - - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}min_occurs uses Python identifier min_occurs - __min_occurs = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'min_occurs'), 'min_occurs', '__httpchercheurs_edf_comlogicielsefficas_T_FACT_httpchercheurs_edf_comlogicielsefficasmin_occurs', AT_min_occurs, unicode_default=u'1') - __min_occurs._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 59, 1) - __min_occurs._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 143, 4) - - min_occurs = property(__min_occurs.value, __min_occurs.set, None, None) - - _ElementMap.update({ - - }) - _AttributeMap.update({ - __statut.name() : __statut, - __max_occurs.name() : __max_occurs, - __min_occurs.name() : __min_occurs - }) -Namespace.addCategoryObject('typeBinding', u'T_FACT', T_FACT) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_BLOC with content type ELEMENT_ONLY -class T_BLOC (T_Accas_Common): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_BLOC with content type ELEMENT_ONLY""" - _TypeDefinition = None - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_BLOC') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 158, 1) - _ElementMap = T_Accas_Common._ElementMap.copy() - _AttributeMap = T_Accas_Common._AttributeMap.copy() - # Base type is T_Accas_Common - - # Element doc ({http://chercheurs.edf.com/logiciels/efficas}doc) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element regles ({http://chercheurs.edf.com/logiciels/efficas}regles) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element SIMP ({http://chercheurs.edf.com/logiciels/efficas}SIMP) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element {http://chercheurs.edf.com/logiciels/efficas}condition uses Python identifier condition - __condition = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'condition'), 'condition', '__httpchercheurs_edf_comlogicielsefficas_T_BLOC_httpchercheurs_edf_comlogicielsefficascondition', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 45, 1), ) - - - condition = property(__condition.value, __condition.set, None, None) - - - # Element FACT ({http://chercheurs.edf.com/logiciels/efficas}FACT) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Element BLOC ({http://chercheurs.edf.com/logiciels/efficas}BLOC) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - - # Attribute nom inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common - _ElementMap.update({ - __condition.name() : __condition - }) - _AttributeMap.update({ - - }) -Namespace.addCategoryObject('typeBinding', u'T_BLOC', T_BLOC) - - -# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_classe_utilisateur_username with content type SIMPLE -class T_classe_utilisateur_username (pyxb.binding.basis.complexTypeDefinition): - """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_classe_utilisateur_username with content type SIMPLE""" - _TypeDefinition = T_classe_utilisateur_name - _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_SIMPLE - _Abstract = False - _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_classe_utilisateur_username') - _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 376, 1) - _ElementMap = {} - _AttributeMap = {} - # Base type is T_classe_utilisateur_name - - # Attribute {http://chercheurs.edf.com/logiciels/efficas}nom uses Python identifier nom - __nom = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'nom'), 'nom', '__httpchercheurs_edf_comlogicielsefficas_T_classe_utilisateur_username_httpchercheurs_edf_comlogicielsefficasnom', AT_nom, required=True) - __nom._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 51, 1) - __nom._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 379, 4) - - nom = property(__nom.value, __nom.set, None, None) - - _ElementMap.update({ - - }) - _AttributeMap.update({ - __nom.name() : __nom - }) -Namespace.addCategoryObject('typeBinding', u'T_classe_utilisateur_username', T_classe_utilisateur_username) - - -cata = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'cata'), T_cata, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 5, 1)) -Namespace.addCategoryObject('elementBinding', cata.name().localName(), cata) - -regles = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'regles'), T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 6, 1)) -Namespace.addCategoryObject('elementBinding', regles.name().localName(), regles) - -fonction_utilisateur = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'fonction_utilisateur'), T_fonction_python, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 10, 1)) -Namespace.addCategoryObject('elementBinding', fonction_utilisateur.name().localName(), fonction_utilisateur) - -commandes = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'commandes'), T_commandes, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 11, 1)) -Namespace.addCategoryObject('elementBinding', commandes.name().localName(), commandes) - -validators = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'validators'), T_validators, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 39, 1)) -Namespace.addCategoryObject('elementBinding', validators.name().localName(), validators) - -PlageValeur = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PlageValeur'), T_PlageValeur, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 40, 1)) -Namespace.addCategoryObject('elementBinding', PlageValeur.name().localName(), PlageValeur) - -portee = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'portee'), T_portee, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 44, 1), unicode_default=u'None') -Namespace.addCategoryObject('elementBinding', portee.name().localName(), portee) - -condition = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'condition'), T_fonction_python, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 45, 1)) -Namespace.addCategoryObject('elementBinding', condition.name().localName(), condition) - -into = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'into'), T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 49, 1)) -Namespace.addCategoryObject('elementBinding', into.name().localName(), into) - -A_CLASSER = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'A_CLASSER'), T_predicat2, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 257, 1)) -Namespace.addCategoryObject('elementBinding', A_CLASSER.name().localName(), A_CLASSER) - -tuple = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'tuple'), T_tuple, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 467, 1)) -Namespace.addCategoryObject('elementBinding', tuple.name().localName(), tuple) - -doc = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'doc'), T_doc, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 4, 1)) -Namespace.addCategoryObject('elementBinding', doc.name().localName(), doc) - -typeCree = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'typeCree'), T_classe_utilisateur, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 7, 1)) -Namespace.addCategoryObject('elementBinding', typeCree.name().localName(), typeCree) - -ValeurDef = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'ValeurDef'), T_typeAttendu, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 8, 1)) -Namespace.addCategoryObject('elementBinding', ValeurDef.name().localName(), ValeurDef) - -ValeurSugg = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'ValeurSugg'), T_typeAttendu, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 9, 1)) -Namespace.addCategoryObject('elementBinding', ValeurSugg.name().localName(), ValeurSugg) - -SIMP = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'SIMP'), T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 43, 1)) -Namespace.addCategoryObject('elementBinding', SIMP.name().localName(), SIMP) - -borne_sup = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'borne_sup'), T_typeAttendu, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 46, 1)) -Namespace.addCategoryObject('elementBinding', borne_sup.name().localName(), borne_sup) - -borne_inf = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'borne_inf'), T_typeAttendu, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 47, 1)) -Namespace.addCategoryObject('elementBinding', borne_inf.name().localName(), borne_inf) - -AU_MOINS_UN = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'AU_MOINS_UN'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 258, 1)) -Namespace.addCategoryObject('elementBinding', AU_MOINS_UN.name().localName(), AU_MOINS_UN) - -AU_PLUS_UN = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'AU_PLUS_UN'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 259, 1)) -Namespace.addCategoryObject('elementBinding', AU_PLUS_UN.name().localName(), AU_PLUS_UN) - -ENSEMBLE = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'ENSEMBLE'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 260, 1)) -Namespace.addCategoryObject('elementBinding', ENSEMBLE.name().localName(), ENSEMBLE) - -EXCLUS = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'EXCLUS'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 261, 1)) -Namespace.addCategoryObject('elementBinding', EXCLUS.name().localName(), EXCLUS) - -PRESENT_ABSENT = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_ABSENT'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 269, 1)) -Namespace.addCategoryObject('elementBinding', PRESENT_ABSENT.name().localName(), PRESENT_ABSENT) - -PRESENT_PRESENT = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_PRESENT'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 270, 1)) -Namespace.addCategoryObject('elementBinding', PRESENT_PRESENT.name().localName(), PRESENT_PRESENT) - -UN_PARMI = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'UN_PARMI'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 271, 1)) -Namespace.addCategoryObject('elementBinding', UN_PARMI.name().localName(), UN_PARMI) - -matrice_double = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'matrice_double'), T_Matrice_double, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 465, 1)) -Namespace.addCategoryObject('elementBinding', matrice_double.name().localName(), matrice_double) - -matrice_symetrique_double = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'matrice_symetrique_double'), T_Matrice_Symetrique_double, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 466, 1)) -Namespace.addCategoryObject('elementBinding', matrice_symetrique_double.name().localName(), matrice_symetrique_double) - -classe_utilisateur = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'classe_utilisateur'), T_classe_utilisateur, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 468, 1)) -Namespace.addCategoryObject('elementBinding', classe_utilisateur.name().localName(), classe_utilisateur) - -OPER = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'OPER'), T_OPER, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 99, 1)) -Namespace.addCategoryObject('elementBinding', OPER.name().localName(), OPER) - -PROC = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PROC'), T_PROC, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 110, 1)) -Namespace.addCategoryObject('elementBinding', PROC.name().localName(), PROC) - -FACT = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'FACT'), T_FACT, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 123, 1)) -Namespace.addCategoryObject('elementBinding', FACT.name().localName(), FACT) - -BLOC = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'BLOC'), T_BLOC, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 157, 1)) -Namespace.addCategoryObject('elementBinding', BLOC.name().localName(), BLOC) - -typeAttendu = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'typeAttendu'), T_name, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 41, 1)) -Namespace.addCategoryObject('elementBinding', typeAttendu.name().localName(), typeAttendu) - -typesimple = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'typesimple'), T_simple, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 464, 1)) -Namespace.addCategoryObject('elementBinding', typesimple.name().localName(), typesimple) - -classeUtilisateurName = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'classeUtilisateurName'), T_classe_utilisateur_username, abstract=pyxb.binding.datatypes.boolean(1), location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 42, 1)) -Namespace.addCategoryObject('elementBinding', classeUtilisateurName.name().localName(), classeUtilisateurName) - - - -T_cata._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'commandes'), T_commandes, scope=T_cata, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 11, 1))) - -def _BuildAutomaton (): - # Remove this helper function from the namespace after it is invoked - global _BuildAutomaton - del _BuildAutomaton - import pyxb.utils.fac as fac - - counters = set() - cc_0 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 68, 3)) - counters.add(cc_0) - states = [] - final_update = set() - final_update.add(fac.UpdateInstruction(cc_0, False)) - symbol = pyxb.binding.content.ElementUse(T_cata._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'commandes')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 68, 3)) - st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_0) - transitions = [] - transitions.append(fac.Transition(st_0, [ - fac.UpdateInstruction(cc_0, True) ])) - st_0._set_transitionSet(transitions) - return fac.Automaton(states, counters, True, containing_state=None) -T_cata._Automaton = _BuildAutomaton() - - - - -T_commandes._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'OPER'), T_OPER, scope=T_commandes, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 99, 1))) - -T_commandes._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PROC'), T_PROC, scope=T_commandes, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 110, 1))) - -def _BuildAutomaton_ (): - # Remove this helper function from the namespace after it is invoked - global _BuildAutomaton_ - del _BuildAutomaton_ - import pyxb.utils.fac as fac - - counters = set() - cc_0 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 72, 2)) - counters.add(cc_0) - states = [] - final_update = set() - final_update.add(fac.UpdateInstruction(cc_0, False)) - symbol = pyxb.binding.content.ElementUse(T_commandes._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'OPER')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 73, 3)) - st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_0) - final_update = set() - final_update.add(fac.UpdateInstruction(cc_0, False)) - symbol = pyxb.binding.content.ElementUse(T_commandes._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'PROC')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 74, 3)) - st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_1) - transitions = [] - transitions.append(fac.Transition(st_0, [ - fac.UpdateInstruction(cc_0, True) ])) - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_0, True) ])) - st_0._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_0, [ - fac.UpdateInstruction(cc_0, True) ])) - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_0, True) ])) - st_1._set_transitionSet(transitions) - return fac.Automaton(states, counters, True, containing_state=None) -T_commandes._Automaton = _BuildAutomaton_() - - - - -T_PlageValeur._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'borne_sup'), T_typeAttendu, scope=T_PlageValeur, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 46, 1))) - -T_PlageValeur._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'borne_inf'), T_typeAttendu, scope=T_PlageValeur, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 47, 1))) - -T_PlageValeur._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'into'), T_into, scope=T_PlageValeur, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 49, 1))) - -def _BuildAutomaton_2 (): - # Remove this helper function from the namespace after it is invoked - global _BuildAutomaton_2 - del _BuildAutomaton_2 - import pyxb.utils.fac as fac - - counters = set() - cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 81, 4)) - counters.add(cc_0) - cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 82, 4)) - counters.add(cc_1) - states = [] - final_update = set() - final_update.add(fac.UpdateInstruction(cc_0, False)) - symbol = pyxb.binding.content.ElementUse(T_PlageValeur._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'borne_sup')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 81, 4)) - st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_0) - final_update = set() - final_update.add(fac.UpdateInstruction(cc_1, False)) - symbol = pyxb.binding.content.ElementUse(T_PlageValeur._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'borne_inf')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 82, 4)) - st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_1) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_PlageValeur._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'into')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 84, 3)) - st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_2) - transitions = [] - transitions.append(fac.Transition(st_0, [ - fac.UpdateInstruction(cc_0, True) ])) - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_0, False) ])) - st_0._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_1, True) ])) - st_1._set_transitionSet(transitions) - transitions = [] - st_2._set_transitionSet(transitions) - return fac.Automaton(states, counters, True, containing_state=None) -T_PlageValeur._Automaton = _BuildAutomaton_2() - - - - -T_predicat2._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'p1'), T_predicat1, scope=T_predicat2, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 252, 3))) - -T_predicat2._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'p2'), AT_nom, scope=T_predicat2, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 253, 3))) - -def _BuildAutomaton_3 (): - # Remove this helper function from the namespace after it is invoked - global _BuildAutomaton_3 - del _BuildAutomaton_3 - import pyxb.utils.fac as fac - - counters = set() - states = [] - final_update = None - symbol = pyxb.binding.content.ElementUse(T_predicat2._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'p1')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 252, 3)) - st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_0) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_predicat2._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'p2')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 253, 3)) - st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) - states.append(st_1) - transitions = [] - transitions.append(fac.Transition(st_1, [ - ])) - st_0._set_transitionSet(transitions) - transitions = [] - st_1._set_transitionSet(transitions) - return fac.Automaton(states, counters, False, containing_state=None) -T_predicat2._Automaton = _BuildAutomaton_3() - - - - -T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'A_CLASSER'), T_predicat2, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 257, 1))) - -T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'AU_MOINS_UN'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 258, 1))) - -T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'AU_PLUS_UN'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 259, 1))) - -T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'ENSEMBLE'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 260, 1))) - -T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'EXCLUS'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 261, 1))) - -T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_ABSENT'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 269, 1))) - -T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_PRESENT'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 270, 1))) - -T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'UN_PARMI'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 271, 1))) - -def _BuildAutomaton_4 (): - # Remove this helper function from the namespace after it is invoked - global _BuildAutomaton_4 - del _BuildAutomaton_4 - import pyxb.utils.fac as fac - - counters = set() - states = [] - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'A_CLASSER')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 274, 3)) - st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_0) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'AU_MOINS_UN')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 275, 3)) - st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_1) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'AU_PLUS_UN')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 276, 3)) - st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_2) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'ENSEMBLE')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 277, 3)) - st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_3) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'EXCLUS')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 278, 3)) - st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_4) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_ABSENT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 286, 3)) - st_5 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_5) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_PRESENT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 287, 3)) - st_6 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_6) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'UN_PARMI')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 288, 3)) - st_7 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_7) - transitions = [] - transitions.append(fac.Transition(st_0, [ - ])) - transitions.append(fac.Transition(st_1, [ - ])) - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - transitions.append(fac.Transition(st_6, [ - ])) - transitions.append(fac.Transition(st_7, [ - ])) - st_0._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_0, [ - ])) - transitions.append(fac.Transition(st_1, [ - ])) - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - transitions.append(fac.Transition(st_6, [ - ])) - transitions.append(fac.Transition(st_7, [ - ])) - st_1._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_0, [ - ])) - transitions.append(fac.Transition(st_1, [ - ])) - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - transitions.append(fac.Transition(st_6, [ - ])) - transitions.append(fac.Transition(st_7, [ - ])) - st_2._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_0, [ - ])) - transitions.append(fac.Transition(st_1, [ - ])) - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - transitions.append(fac.Transition(st_6, [ - ])) - transitions.append(fac.Transition(st_7, [ - ])) - st_3._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_0, [ - ])) - transitions.append(fac.Transition(st_1, [ - ])) - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - transitions.append(fac.Transition(st_6, [ - ])) - transitions.append(fac.Transition(st_7, [ - ])) - st_4._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_0, [ - ])) - transitions.append(fac.Transition(st_1, [ - ])) - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - transitions.append(fac.Transition(st_6, [ - ])) - transitions.append(fac.Transition(st_7, [ - ])) - st_5._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_0, [ - ])) - transitions.append(fac.Transition(st_1, [ - ])) - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - transitions.append(fac.Transition(st_6, [ - ])) - transitions.append(fac.Transition(st_7, [ - ])) - st_6._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_0, [ - ])) - transitions.append(fac.Transition(st_1, [ - ])) - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - transitions.append(fac.Transition(st_6, [ - ])) - transitions.append(fac.Transition(st_7, [ - ])) - st_7._set_transitionSet(transitions) - return fac.Automaton(states, counters, False, containing_state=None) -T_regles._Automaton = _BuildAutomaton_4() - - - - -T_into._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'fonction_utilisateur'), T_fonction_python, scope=T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 10, 1))) - -T_into._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'typesimple'), T_simple, scope=T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 464, 1))) - -T_into._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'matrice_double'), T_Matrice_double, scope=T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 465, 1))) - -T_into._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'matrice_symetrique_double'), T_Matrice_Symetrique_double, scope=T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 466, 1))) - -T_into._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'tuple'), T_tuple, scope=T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 467, 1))) - -T_into._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'classe_utilisateur'), T_classe_utilisateur, scope=T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 468, 1))) - -def _BuildAutomaton_5 (): - # Remove this helper function from the namespace after it is invoked - global _BuildAutomaton_5 - del _BuildAutomaton_5 - import pyxb.utils.fac as fac - - counters = set() - cc_0 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 504, 3)) - counters.add(cc_0) - cc_1 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 505, 3)) - counters.add(cc_1) - cc_2 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 506, 3)) - counters.add(cc_2) - cc_3 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 507, 3)) - counters.add(cc_3) - cc_4 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 508, 3)) - counters.add(cc_4) - states = [] - final_update = set() - final_update.add(fac.UpdateInstruction(cc_0, False)) - symbol = pyxb.binding.content.ElementUse(T_into._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'typesimple')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 504, 3)) - st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_0) - final_update = set() - final_update.add(fac.UpdateInstruction(cc_1, False)) - symbol = pyxb.binding.content.ElementUse(T_into._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'matrice_double')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 505, 3)) - st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_1) - final_update = set() - final_update.add(fac.UpdateInstruction(cc_2, False)) - symbol = pyxb.binding.content.ElementUse(T_into._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'matrice_symetrique_double')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 506, 3)) - st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_2) - final_update = set() - final_update.add(fac.UpdateInstruction(cc_3, False)) - symbol = pyxb.binding.content.ElementUse(T_into._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'tuple')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 507, 3)) - st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_3) - final_update = set() - final_update.add(fac.UpdateInstruction(cc_4, False)) - symbol = pyxb.binding.content.ElementUse(T_into._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'classe_utilisateur')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 508, 3)) - st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_4) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_into._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'fonction_utilisateur')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 509, 3)) - st_5 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_5) - transitions = [] - transitions.append(fac.Transition(st_0, [ - fac.UpdateInstruction(cc_0, True) ])) - st_0._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_1, True) ])) - st_1._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_2, True) ])) - st_2._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_3, True) ])) - st_3._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_4, True) ])) - st_4._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_5, [ - ])) - st_5._set_transitionSet(transitions) - return fac.Automaton(states, counters, True, containing_state=None) -T_into._Automaton = _BuildAutomaton_5() - - - - -T_Accas_Common._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'doc'), T_doc, scope=T_Accas_Common, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 4, 1))) - -T_Accas_Common._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'regles'), T_regles, scope=T_Accas_Common, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 6, 1))) - -T_Accas_Common._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'SIMP'), T_SIMP, scope=T_Accas_Common, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 43, 1))) - -T_Accas_Common._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'FACT'), T_FACT, scope=T_Accas_Common, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 123, 1))) - -T_Accas_Common._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'BLOC'), T_BLOC, scope=T_Accas_Common, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 157, 1))) - -def _BuildAutomaton_6 (): - # Remove this helper function from the namespace after it is invoked - global _BuildAutomaton_6 - del _BuildAutomaton_6 - import pyxb.utils.fac as fac - - counters = set() - cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) - counters.add(cc_0) - cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) - counters.add(cc_1) - states = [] - final_update = None - symbol = pyxb.binding.content.ElementUse(T_Accas_Common._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'regles')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) - st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_0) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_Accas_Common._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'doc')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) - st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_1) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_Accas_Common._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'BLOC')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 92, 4)) - st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_2) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_Accas_Common._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'FACT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 93, 4)) - st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_3) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_Accas_Common._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'SIMP')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 94, 4)) - st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_4) - transitions = [] - transitions.append(fac.Transition(st_0, [ - fac.UpdateInstruction(cc_0, True) ])) - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_0, False) ])) - st_0._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_1, True) ])) - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_1, False) ])) - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_1, False) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_1, False) ])) - st_1._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - st_2._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - st_3._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - st_4._set_transitionSet(transitions) - return fac.Automaton(states, counters, False, containing_state=None) -T_Accas_Common._Automaton = _BuildAutomaton_6() - - - - -T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'doc'), T_doc, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 4, 1))) - -T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'ValeurDef'), T_typeAttendu, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 8, 1))) - -T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'ValeurSugg'), T_typeAttendu, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 9, 1))) - -T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'validators'), T_validators, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 39, 1))) - -T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PlageValeur'), T_PlageValeur, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 40, 1))) - -T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'typeAttendu'), T_name, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 41, 1))) - -T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'portee'), T_portee, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 44, 1), unicode_default=u'None')) - -def _BuildAutomaton_7 (): - # Remove this helper function from the namespace after it is invoked - global _BuildAutomaton_7 - del _BuildAutomaton_7 - import pyxb.utils.fac as fac - - counters = set() - cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 169, 3)) - counters.add(cc_0) - cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 170, 3)) - counters.add(cc_1) - cc_2 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 175, 3)) - counters.add(cc_2) - cc_3 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 176, 3)) - counters.add(cc_3) - cc_4 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 177, 3)) - counters.add(cc_4) - cc_5 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 179, 3)) - counters.add(cc_5) - states = [] - final_update = None - symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'doc')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 169, 3)) - st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_0) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'portee')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 170, 3)) - st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_1) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'ValeurDef')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 175, 3)) - st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_2) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'ValeurSugg')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 176, 3)) - st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_3) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'PlageValeur')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 177, 3)) - st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_4) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'typeAttendu')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 178, 3)) - st_5 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_5) - final_update = set() - final_update.add(fac.UpdateInstruction(cc_5, False)) - symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'validators')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 179, 3)) - st_6 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) - states.append(st_6) - transitions = [] - transitions.append(fac.Transition(st_0, [ - fac.UpdateInstruction(cc_0, True) ])) - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_5, [ - fac.UpdateInstruction(cc_0, False) ])) - st_0._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_1, True) ])) - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_1, False) ])) - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_1, False) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_1, False) ])) - transitions.append(fac.Transition(st_5, [ - fac.UpdateInstruction(cc_1, False) ])) - st_1._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_2, True) ])) - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_2, False) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_2, False) ])) - transitions.append(fac.Transition(st_5, [ - fac.UpdateInstruction(cc_2, False) ])) - st_2._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_3, True) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_3, False) ])) - transitions.append(fac.Transition(st_5, [ - fac.UpdateInstruction(cc_3, False) ])) - st_3._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_4, True) ])) - transitions.append(fac.Transition(st_5, [ - fac.UpdateInstruction(cc_4, False) ])) - st_4._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_6, [ - ])) - st_5._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_6, [ - fac.UpdateInstruction(cc_5, True) ])) - st_6._set_transitionSet(transitions) - return fac.Automaton(states, counters, False, containing_state=None) -T_SIMP._Automaton = _BuildAutomaton_7() - - - - -def _BuildAutomaton_8 (): - # Remove this helper function from the namespace after it is invoked - global _BuildAutomaton_8 - del _BuildAutomaton_8 - import pyxb.utils.fac as fac - - counters = set() - cc_0 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 516, 5)) - counters.add(cc_0) - cc_1 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 517, 5)) - counters.add(cc_1) - cc_2 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 518, 5)) - counters.add(cc_2) - cc_3 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 519, 5)) - counters.add(cc_3) - cc_4 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 520, 5)) - counters.add(cc_4) - states = [] - final_update = set() - final_update.add(fac.UpdateInstruction(cc_0, False)) - symbol = pyxb.binding.content.ElementUse(T_typeAttendu._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'typesimple')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 516, 5)) - st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_0) - final_update = set() - final_update.add(fac.UpdateInstruction(cc_1, False)) - symbol = pyxb.binding.content.ElementUse(T_typeAttendu._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'matrice_double')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 517, 5)) - st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_1) - final_update = set() - final_update.add(fac.UpdateInstruction(cc_2, False)) - symbol = pyxb.binding.content.ElementUse(T_typeAttendu._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'matrice_symetrique_double')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 518, 5)) - st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_2) - final_update = set() - final_update.add(fac.UpdateInstruction(cc_3, False)) - symbol = pyxb.binding.content.ElementUse(T_typeAttendu._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'tuple')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 519, 5)) - st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_3) - final_update = set() - final_update.add(fac.UpdateInstruction(cc_4, False)) - symbol = pyxb.binding.content.ElementUse(T_typeAttendu._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'classe_utilisateur')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 520, 5)) - st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_4) - transitions = [] - transitions.append(fac.Transition(st_0, [ - fac.UpdateInstruction(cc_0, True) ])) - st_0._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_1, True) ])) - st_1._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_2, True) ])) - st_2._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_3, True) ])) - st_3._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_4, True) ])) - st_4._set_transitionSet(transitions) - return fac.Automaton(states, counters, True, containing_state=None) -T_typeAttendu._Automaton = _BuildAutomaton_8() - - - - -T_OPER._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'typeCree'), T_classe_utilisateur, scope=T_OPER, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 7, 1))) - -def _BuildAutomaton_9 (): - # Remove this helper function from the namespace after it is invoked - global _BuildAutomaton_9 - del _BuildAutomaton_9 - import pyxb.utils.fac as fac - - counters = set() - cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) - counters.add(cc_0) - cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) - counters.add(cc_1) - states = [] - final_update = None - symbol = pyxb.binding.content.ElementUse(T_OPER._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'regles')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) - st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_0) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_OPER._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'doc')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) - st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_1) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_OPER._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'BLOC')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 92, 4)) - st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_2) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_OPER._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'FACT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 93, 4)) - st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_3) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_OPER._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'SIMP')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 94, 4)) - st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_4) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_OPER._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'typeCree')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 104, 5)) - st_5 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) - states.append(st_5) - transitions = [] - transitions.append(fac.Transition(st_0, [ - fac.UpdateInstruction(cc_0, True) ])) - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_0, False) ])) - st_0._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_1, True) ])) - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_1, False) ])) - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_1, False) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_1, False) ])) - st_1._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - st_2._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - st_3._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - st_4._set_transitionSet(transitions) - transitions = [] - st_5._set_transitionSet(transitions) - return fac.Automaton(states, counters, False, containing_state=None) -T_OPER._Automaton = _BuildAutomaton_9() - - - - -def _BuildAutomaton_10 (): - # Remove this helper function from the namespace after it is invoked - global _BuildAutomaton_10 - del _BuildAutomaton_10 - import pyxb.utils.fac as fac - - counters = set() - cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) - counters.add(cc_0) - cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) - counters.add(cc_1) - states = [] - final_update = None - symbol = pyxb.binding.content.ElementUse(T_PROC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'regles')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) - st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_0) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_PROC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'doc')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) - st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_1) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_PROC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'BLOC')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 92, 4)) - st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_2) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_PROC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'FACT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 93, 4)) - st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_3) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_PROC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'SIMP')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 94, 4)) - st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_4) - transitions = [] - transitions.append(fac.Transition(st_0, [ - fac.UpdateInstruction(cc_0, True) ])) - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_0, False) ])) - st_0._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_1, True) ])) - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_1, False) ])) - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_1, False) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_1, False) ])) - st_1._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - st_2._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - st_3._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - st_4._set_transitionSet(transitions) - return fac.Automaton(states, counters, False, containing_state=None) -T_PROC._Automaton = _BuildAutomaton_10() - - - - -def _BuildAutomaton_11 (): - # Remove this helper function from the namespace after it is invoked - global _BuildAutomaton_11 - del _BuildAutomaton_11 - import pyxb.utils.fac as fac - - counters = set() - cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) - counters.add(cc_0) - cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) - counters.add(cc_1) - states = [] - final_update = None - symbol = pyxb.binding.content.ElementUse(T_FACT._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'regles')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) - st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_0) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_FACT._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'doc')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) - st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_1) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_FACT._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'BLOC')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 92, 4)) - st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_2) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_FACT._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'FACT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 93, 4)) - st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_3) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_FACT._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'SIMP')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 94, 4)) - st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_4) - transitions = [] - transitions.append(fac.Transition(st_0, [ - fac.UpdateInstruction(cc_0, True) ])) - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_0, False) ])) - st_0._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_1, True) ])) - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_1, False) ])) - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_1, False) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_1, False) ])) - st_1._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - st_2._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - st_3._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - st_4._set_transitionSet(transitions) - return fac.Automaton(states, counters, False, containing_state=None) -T_FACT._Automaton = _BuildAutomaton_11() - - - - -T_BLOC._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'condition'), T_fonction_python, scope=T_BLOC, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 45, 1))) - -def _BuildAutomaton_12 (): - # Remove this helper function from the namespace after it is invoked - global _BuildAutomaton_12 - del _BuildAutomaton_12 - import pyxb.utils.fac as fac - - counters = set() - cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) - counters.add(cc_0) - cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) - counters.add(cc_1) - states = [] - final_update = None - symbol = pyxb.binding.content.ElementUse(T_BLOC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'regles')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) - st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_0) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_BLOC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'doc')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) - st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_1) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_BLOC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'BLOC')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 92, 4)) - st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_2) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_BLOC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'FACT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 93, 4)) - st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_3) - final_update = None - symbol = pyxb.binding.content.ElementUse(T_BLOC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'SIMP')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 94, 4)) - st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) - states.append(st_4) - final_update = set() - symbol = pyxb.binding.content.ElementUse(T_BLOC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'condition')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 162, 5)) - st_5 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) - states.append(st_5) - transitions = [] - transitions.append(fac.Transition(st_0, [ - fac.UpdateInstruction(cc_0, True) ])) - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_0, False) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_0, False) ])) - st_0._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_1, [ - fac.UpdateInstruction(cc_1, True) ])) - transitions.append(fac.Transition(st_2, [ - fac.UpdateInstruction(cc_1, False) ])) - transitions.append(fac.Transition(st_3, [ - fac.UpdateInstruction(cc_1, False) ])) - transitions.append(fac.Transition(st_4, [ - fac.UpdateInstruction(cc_1, False) ])) - st_1._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - st_2._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - st_3._set_transitionSet(transitions) - transitions = [] - transitions.append(fac.Transition(st_2, [ - ])) - transitions.append(fac.Transition(st_3, [ - ])) - transitions.append(fac.Transition(st_4, [ - ])) - transitions.append(fac.Transition(st_5, [ - ])) - st_4._set_transitionSet(transitions) - transitions = [] - st_5._set_transitionSet(transitions) - return fac.Automaton(states, counters, False, containing_state=None) -T_BLOC._Automaton = _BuildAutomaton_12() - - -classeUtilisateurName._setSubstitutionGroup(typeAttendu) diff --git a/EssaiInit/readerEfficas.py b/EssaiInit/readerEfficas.py deleted file mode 100755 index afd12497..00000000 --- a/EssaiInit/readerEfficas.py +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -import sys,os -import raw.efficas as efficas -import types - -sys.path.insert(0,os.path.abspath(os.path.join(os.getcwd(),'..'))) -sys.path.insert(0,os.path.abspath(os.path.join(os.getcwd(),'..','UiQT5'))) - - -from Accas import * - - -# Attention pas d heritage possible (cf doc pyxbe) - -dictSIMPEficasXML= { 'typ' : 'typeAttendu', 'statut' : 'statut', - 'min_occurs': 'min' , 'max_occurs' : 'max', - 'homo' : 'homo' , 'position' : 'portee', - 'validators': 'validators' , 'sug' : 'valeur_sugg', - 'defaut' : 'ValeurDef' , 'into' : ('PlageValeur','into'), - 'val_min' : ('PlageValeur','borne_inf') , 'val_max' : ('PlageValeur','borne_sup'), - 'ang' : ('doc','ang') , 'fr' : ('doc','fr',) , - 'docu' : ('doc','docu'),} - -dictSIMPXMLEficas = {'doc' : {'fr' : 'fr' , 'ang' : 'ang' , 'docu' : 'docu' }, - 'PlageValeur' : {'borne_sup' : 'val_max' , 'into' : 'into' , 'borne_inf' : 'val_min' ,}, - 'statut' : 'statut' , 'validators' : 'validators' , 'homo' : 'homo' , - 'ValeurDef' : 'defaut' , 'min' : 'min_occurs' , - 'valeur_sugg' : 'sug' , 'portee' : 'position' , 'max' : 'max_occurs' , } - - -# ------------------------------ -class monSIMP (efficas.T_SIMP): -# ------------------------------ - - def explore(self): - print "je passe dans explore pour SIMP ", self.nom - self.dictArgsEficas={} - self.dictArgsEficas['typ']=self.typeAttendu - for nomXMLArg in dir(self) : - if nomXMLArg in dictSIMPXMLEficas.keys() : - nomEficasArg=dictSIMPXMLEficas[nomXMLArg] - argu=getattr(self,nomXMLArg) - if argu==None : continue - if type(nomEficasArg) == types.DictionaryType: - for nomXML in nomEficasArg.keys(): - arguDecoupe=getattr(argu,nomXML) - nomEficasDecoupe=nomEficasArg[nomXML] - self.dictArgsEficas[nomEficasDecoupe]=arguDecoupe - else : - self.dictArgsEficas[nomEficasArg] = argu - - #if argNew != None : print argNew - self.objAccas=A_SIMP.SIMP(**self.dictArgsEficas) - self.objAccas.nom=self.nom - - def getAccasEquivalent(self): - return self.nom, self.objAccas - -# ------------------------------ -class monPROC(efficas.T_PROC): -# ------------------------------ - def explore(self): - print "je passe dans explore pour PROC ", self.nom - self.dictConstruction={} - self.dictConstruction['nom']=self.nom - - for obj in self.content(): - if hasattr(obj,'explore') : obj.explore () - if hasattr(obj,'getAccasEquivalent') : - nom,objetAccas=obj.getAccasEquivalent() - self.dictConstruction[nom]=objetAccas - self.dictConstruction['op']=None - self.objAccas=A_PROC.PROC(**self.dictConstruction) - print dir(self.objAccas) - print self.objAccas.entites - - -# ------------------------------ -class monFACT(efficas.T_FACT): -# ------------------------------ - def explore(self): - #print "je passe dans explore pour FACT ", self.nom - self.dictConstruction={} - for obj in self.content(): - if hasattr(obj,'explore') : obj.explore - if hasattr(obj,'creeAccasEquivalent') : - nom,objetAccas=obj.creeAccasEquivalent() - self.dictConstruction[nom]=objetAccas - self.objAccas=A_FACT.FACT(**self.dictConstruction) - - def getAccasEquivalent(self): - return self.nom, self.objAccas - - -# ------------------------------ -class monCata(efficas.T_cata): -# ------------------------------ - def exploreCata(self): - # On positionne le contexte ACCAS - self.JdC = JDC_CATA (code = 'MED', execmodul = None,) - objAExplorer=self.commandes[0] - for obj in objAExplorer.content(): - if hasattr(obj,'explore') : obj.explore() - - - -efficas.T_SIMP._SetSupersedingClass(monSIMP) -efficas.T_FACT._SetSupersedingClass(monFACT) -efficas.T_PROC._SetSupersedingClass(monPROC) -efficas.T_cata._SetSupersedingClass(monCata) - -if __name__ == "__main__": -# print dir(efficas) -# print dir(efficas.T_SIMP) - - - xml = open('Cata_MED_FAM.xml').read() - SchemaMed = efficas.CreateFromDocument(xml) - SchemaMed.exploreCata() - - #print dir(efficas.T_SIMP) - #print dir(efficas.T_SIMP) - - #for maCommande in monCata.commandes : - # for monProc in maCommande.PROC: - # for monFact in monProc.FACT: - # for simp in monFact.SIMP: - # simp.creeAccasEquivalent() diff --git a/Extensions/__init__.py b/Extensions/__init__.py index e4044aec..5b4f0e3b 100644 --- a/Extensions/__init__.py +++ b/Extensions/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Extensions/commande_comm.py b/Extensions/commande_comm.py index 31439d93..dd23124b 100644 --- a/Extensions/commande_comm.py +++ b/Extensions/commande_comm.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Extensions/commentaire.py b/Extensions/commentaire.py index 5decbe1f..7108920e 100644 --- a/Extensions/commentaire.py +++ b/Extensions/commentaire.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Extensions/etape_niveau.py b/Extensions/etape_niveau.py index b7a6f003..4351c6d8 100644 --- a/Extensions/etape_niveau.py +++ b/Extensions/etape_niveau.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Extensions/interpreteur_formule.py b/Extensions/interpreteur_formule.py index 9afdbaff..9d17d85e 100644 --- a/Extensions/interpreteur_formule.py +++ b/Extensions/interpreteur_formule.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Extensions/jdc.py b/Extensions/jdc.py index e984c864..7dd76ec2 100644 --- a/Extensions/jdc.py +++ b/Extensions/jdc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Extensions/jdc_include.py b/Extensions/jdc_include.py index 98467da9..009c305c 100644 --- a/Extensions/jdc_include.py +++ b/Extensions/jdc_include.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Extensions/mcnuplet.py b/Extensions/mcnuplet.py index 1078fb27..76b195c2 100644 --- a/Extensions/mcnuplet.py +++ b/Extensions/mcnuplet.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Extensions/niveau.py b/Extensions/niveau.py index 9ca012e9..504a8881 100644 --- a/Extensions/niveau.py +++ b/Extensions/niveau.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Extensions/nuplet.py b/Extensions/nuplet.py index 465c6f01..0cc524ea 100644 --- a/Extensions/nuplet.py +++ b/Extensions/nuplet.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Extensions/param2.py b/Extensions/param2.py index cc198709..5da28c1b 100644 --- a/Extensions/param2.py +++ b/Extensions/param2.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Extensions/parametre.py b/Extensions/parametre.py index 9f5bb93d..9cdf5bb5 100644 --- a/Extensions/parametre.py +++ b/Extensions/parametre.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Extensions/parametre_eval.py b/Extensions/parametre_eval.py index 4bb03cd6..7118e1b1 100644 --- a/Extensions/parametre_eval.py +++ b/Extensions/parametre_eval.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Extensions/pluginloader.py b/Extensions/pluginloader.py index 49b47bd9..009af7ef 100644 --- a/Extensions/pluginloader.py +++ b/Extensions/pluginloader.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/CONNECTOR.py b/Ihm/CONNECTOR.py index 5c066074..f0e3f0ef 100644 --- a/Ihm/CONNECTOR.py +++ b/Ihm/CONNECTOR.py @@ -1,5 +1,5 @@ #i -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_ASSD.py b/Ihm/I_ASSD.py index a3359c53..ff896ce8 100644 --- a/Ihm/I_ASSD.py +++ b/Ihm/I_ASSD.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_AVANT.py b/Ihm/I_AVANT.py index c783cb38..84fa108d 100644 --- a/Ihm/I_AVANT.py +++ b/Ihm/I_AVANT.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_A_CLASSER.py b/Ihm/I_A_CLASSER.py index 389869c4..d03f800e 100644 --- a/Ihm/I_A_CLASSER.py +++ b/Ihm/I_A_CLASSER.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_ENTITE.py b/Ihm/I_ENTITE.py index f29bda01..8196d771 100644 --- a/Ihm/I_ENTITE.py +++ b/Ihm/I_ENTITE.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_ETAPE.py b/Ihm/I_ETAPE.py index 06fc8935..d97ec4a2 100644 --- a/Ihm/I_ETAPE.py +++ b/Ihm/I_ETAPE.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_EVAL.py b/Ihm/I_EVAL.py index 426c9c88..d99c9d9f 100644 --- a/Ihm/I_EVAL.py +++ b/Ihm/I_EVAL.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_EXCLUS.py b/Ihm/I_EXCLUS.py index d1ddee60..81d00322 100644 --- a/Ihm/I_EXCLUS.py +++ b/Ihm/I_EXCLUS.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_FICHIER.py b/Ihm/I_FICHIER.py index 94478178..7b64ce38 100644 --- a/Ihm/I_FICHIER.py +++ b/Ihm/I_FICHIER.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_FONCTION.py b/Ihm/I_FONCTION.py index 9efb621b..2cd1596e 100644 --- a/Ihm/I_FONCTION.py +++ b/Ihm/I_FONCTION.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_FORM_ETAPE.py b/Ihm/I_FORM_ETAPE.py index b97ac8f8..bf52caa3 100644 --- a/Ihm/I_FORM_ETAPE.py +++ b/Ihm/I_FORM_ETAPE.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_JDC.py b/Ihm/I_JDC.py index c0db8261..9071b5a2 100644 --- a/Ihm/I_JDC.py +++ b/Ihm/I_JDC.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_JDC_CATA.py b/Ihm/I_JDC_CATA.py index b8de9558..014e7a74 100644 --- a/Ihm/I_JDC_CATA.py +++ b/Ihm/I_JDC_CATA.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_LASSD.py b/Ihm/I_LASSD.py index bdeba371..b4346754 100644 --- a/Ihm/I_LASSD.py +++ b/Ihm/I_LASSD.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_MACRO_ETAPE.py b/Ihm/I_MACRO_ETAPE.py index 2f4771f1..0e29f26c 100644 --- a/Ihm/I_MACRO_ETAPE.py +++ b/Ihm/I_MACRO_ETAPE.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -77,7 +77,7 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): ou leve une exception --> utilisee par ops.POURSUITE et INCLUDE """ - print ("getContexteJdc",self,self.nom, text) + #print ("getContexteJdc",self,self.nom, text) # On recupere l'etape courante step=CONTEXT.getCurrentStep() self.text_included_converted=0 @@ -226,24 +226,15 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): if callable(v):continue self.g_context[k]=param2.Variable(k,v) - print (j) - print (dir(j)) - print (j.currentContext) # On recupere le contexte courant self.currentContext=j.currentContext - print ('kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkmmmmmmmmmmmmmmmmmmmmmm') self.index_etape_courante=j.index_etape_courante - print ('kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkmmmmmmmmmmmmmmmmmmmmmm') self.jdc_aux=j - print ('kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkmmmmmmmmmmmmmmmmmmmmmm') # On retablit l'etape courante step CONTEXT.unsetCurrentStep() - print ('kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkmmmmmmmmmmmmmmmmmmmmmm') CONTEXT.setCurrentStep(step) - print ('kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkmmmmmmmmmmmmmmmmmmmmmm') - print ('kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkmmmmmmmmmmmmmmmmmmmmmm') return j_context def reevalueSdJdc(self): @@ -330,7 +321,7 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): """ Supprime le concept produit sd s'il est produit par l'etape """ - print ('supprimeSdprod de MACRO_ETAPE') + #print ('supprimeSdprod de MACRO_ETAPE') if sd in self.sdprods: self.initModif() self.parent.delSdprod(sd) @@ -626,10 +617,10 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): """ Cette methode sert a craer un contexte en interpratant un texte source Python. """ - print ("makeContexteInclude",fichier) + #print ("makeContexteInclude",fichier) # on recupere le contexte d'un nouveau jdc dans lequel on interprete text contexte = self.getContexteJdc(fichier,text) - print (contexte) + #print (contexte) if contexte == None : raise EficasException("Impossible de construire le jeu de commandes correspondant au fichier") else: @@ -641,7 +632,7 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): # g_context est utilise pour avoir les concepts produits par la macro # contexte_fichier_init est utilise pour avoir les concepts supprimes par la macro self.contexte_fichier_init = contexte - print ("fin makeContexteInclude",fichier) + #print ("fin makeContexteInclude",fichier) def reevalueFichierInitObsolete(self): """Recalcule les concepts produits par le fichier enregistre""" @@ -806,7 +797,6 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): return if type(self.definition.op_init) == types.FunctionType: - print ('mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm dans updateContext') self.definition.op_init(*(self,d)) if self.sd != None :d[self.sd.nom]=self.sd for co in self.sdprods: @@ -985,7 +975,6 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): raise EficasException(" ") if nbVariableOut != 1 : - print((nbVariableOut ,"nbVariableOut")) self.makeIncl2Except(mess=tr("le fichier doit contenir une unique variable de sortie")) raise EficasException(" ") @@ -998,7 +987,6 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): raise EficasException(" ") try: - print((self.fichier_ini ,self.fichier_text)) self.makeContexteInclude(self.fichier_ini ,self.fichier_text) self.old_context_fichier_init=self.contexte_fichier_init self.parent.recordUnit(unite,self) @@ -1065,7 +1053,6 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): Sinon on retourne None. Les concepts produits par l'INCLUDE sont pris en compte par le JDC parent lors du calcul du contexte (appel de ???) """ - print ("makeInclude",fname) # On supprime l'attribut unite qui bloque l'evaluation du source de l'INCLUDE # car on ne s'appuie pas sur lui dans EFICAS mais sur l'attribut fichier_ini # Si unite n'a pas de valeur, l'etape est forcement invalide. On peut retourner None @@ -1099,11 +1086,8 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): raise EficasException(self.fichier_err) try: - print ('iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii') self.makeContexteInclude(self.fichier_ini ,self.fichier_text) - print ('iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii') self.parent.recordUnit(unite,self) - print ('iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii') except: l=traceback.format_exception_only(tr("Fichier invalide %s",sys.exc_info()[1])) if self.jdc.editor: @@ -1123,7 +1107,7 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): self.updateFichierInit(unite) self.fichier_unite=unite if self.fichier_err is not None: raise EficasException(self.fichier_err) - print ('self.g_context', self.g_context) + #print ('self.g_context', self.g_context) #ATTENTION SURCHARGE : cette methode surcharge celle de Noyau (a garder en synchro) diff --git a/Ihm/I_MCBLOC.py b/Ihm/I_MCBLOC.py index 19a2690e..923bb649 100644 --- a/Ihm/I_MCBLOC.py +++ b/Ihm/I_MCBLOC.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_MCCOMPO.py b/Ihm/I_MCCOMPO.py index f856657d..7d764b87 100644 --- a/Ihm/I_MCCOMPO.py +++ b/Ihm/I_MCCOMPO.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_MCFACT.py b/Ihm/I_MCFACT.py index a95eba45..13d272e1 100644 --- a/Ihm/I_MCFACT.py +++ b/Ihm/I_MCFACT.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_MCLIST.py b/Ihm/I_MCLIST.py index 17f5da40..5db4b341 100644 --- a/Ihm/I_MCLIST.py +++ b/Ihm/I_MCLIST.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_MCSIMP.py b/Ihm/I_MCSIMP.py index eef48d84..6eca2a13 100644 --- a/Ihm/I_MCSIMP.py +++ b/Ihm/I_MCSIMP.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_OBJECT.py b/Ihm/I_OBJECT.py index 56b08c19..0c204847 100644 --- a/Ihm/I_OBJECT.py +++ b/Ihm/I_OBJECT.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_PRESENT_ABSENT.py b/Ihm/I_PRESENT_ABSENT.py index b4a43e46..d2bb5b38 100644 --- a/Ihm/I_PRESENT_ABSENT.py +++ b/Ihm/I_PRESENT_ABSENT.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_PRESENT_PRESENT.py b/Ihm/I_PRESENT_PRESENT.py index a6f1ba06..f86d86b4 100644 --- a/Ihm/I_PRESENT_PRESENT.py +++ b/Ihm/I_PRESENT_PRESENT.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_PROC_ETAPE.py b/Ihm/I_PROC_ETAPE.py index 4b46b592..823e6c6c 100644 --- a/Ihm/I_PROC_ETAPE.py +++ b/Ihm/I_PROC_ETAPE.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_REGLE.py b/Ihm/I_REGLE.py index b0f19adc..d2c30f35 100644 --- a/Ihm/I_REGLE.py +++ b/Ihm/I_REGLE.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_UN_PARMI.py b/Ihm/I_UN_PARMI.py index 65812619..c5bbf8a1 100644 --- a/Ihm/I_UN_PARMI.py +++ b/Ihm/I_UN_PARMI.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/I_VALIDATOR.py b/Ihm/I_VALIDATOR.py index 604feffc..3bcd79ac 100644 --- a/Ihm/I_VALIDATOR.py +++ b/Ihm/I_VALIDATOR.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Ihm/__init__.py b/Ihm/__init__.py index 0553daf2..64162464 100644 --- a/Ihm/__init__.py +++ b/Ihm/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/__init__.py b/InterfaceQT4/__init__.py index e059172e..57dacc3f 100644 --- a/InterfaceQT4/__init__.py +++ b/InterfaceQT4/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/aiemonWidgetPlusieursBase.py b/InterfaceQT4/aiemonWidgetPlusieursBase.py index 0e794877..c11d1dc2 100644 --- a/InterfaceQT4/aiemonWidgetPlusieursBase.py +++ b/InterfaceQT4/aiemonWidgetPlusieursBase.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/bizarreEditorDu5aout.py b/InterfaceQT4/bizarreEditorDu5aout.py index bdcbcecd..9ec84ab3 100644 --- a/InterfaceQT4/bizarreEditorDu5aout.py +++ b/InterfaceQT4/bizarreEditorDu5aout.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/browser.py b/InterfaceQT4/browser.py index 64ee7d2d..faa4fc96 100644 --- a/InterfaceQT4/browser.py +++ b/InterfaceQT4/browser.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/compobloc.py b/InterfaceQT4/compobloc.py index a05c21e8..96feead9 100644 --- a/InterfaceQT4/compobloc.py +++ b/InterfaceQT4/compobloc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/compocomm.py b/InterfaceQT4/compocomm.py index 8c501b79..fbfc5afc 100644 --- a/InterfaceQT4/compocomm.py +++ b/InterfaceQT4/compocomm.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/compocommandecomm.py b/InterfaceQT4/compocommandecomm.py index 41eed95a..068f6a81 100644 --- a/InterfaceQT4/compocommandecomm.py +++ b/InterfaceQT4/compocommandecomm.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/compofact.py b/InterfaceQT4/compofact.py index 57dd1df8..4c9c032f 100644 --- a/InterfaceQT4/compofact.py +++ b/InterfaceQT4/compofact.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/compoformule.py b/InterfaceQT4/compoformule.py index d18af81b..c0b72040 100644 --- a/InterfaceQT4/compoformule.py +++ b/InterfaceQT4/compoformule.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/compojdc.py b/InterfaceQT4/compojdc.py index 87121de4..5f5f7ad5 100644 --- a/InterfaceQT4/compojdc.py +++ b/InterfaceQT4/compojdc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/compomacro.py b/InterfaceQT4/compomacro.py index 9a1fcbb2..afb748d4 100644 --- a/InterfaceQT4/compomacro.py +++ b/InterfaceQT4/compomacro.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/compomclist.py b/InterfaceQT4/compomclist.py index c37efb07..e8735ea8 100644 --- a/InterfaceQT4/compomclist.py +++ b/InterfaceQT4/compomclist.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/compooper.py b/InterfaceQT4/compooper.py index b8f4aafe..b8aff454 100644 --- a/InterfaceQT4/compooper.py +++ b/InterfaceQT4/compooper.py @@ -1,5 +1,5 @@ #-*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/compoparam.py b/InterfaceQT4/compoparam.py index 74a44238..b9eddf99 100644 --- a/InterfaceQT4/compoparam.py +++ b/InterfaceQT4/compoparam.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/compoproc.py b/InterfaceQT4/compoproc.py index dcbea7f0..35a75c8d 100644 --- a/InterfaceQT4/compoproc.py +++ b/InterfaceQT4/compoproc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/composimp.py b/InterfaceQT4/composimp.py index c550b15e..7f2318ee 100644 --- a/InterfaceQT4/composimp.py +++ b/InterfaceQT4/composimp.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/configuration.py b/InterfaceQT4/configuration.py index 6b4aab48..08b0b2c4 100644 --- a/InterfaceQT4/configuration.py +++ b/InterfaceQT4/configuration.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -61,11 +61,11 @@ class configBase(object): self.repIni = repIni if self.code == None : self.code='' - if sys.platform[0:5]=="linux" : + #if sys.platform[0:5]=="linux" : #self.rep_user = os.path.join(os.environ['HOME'],'.config/Eficas',self.code) - self.rep_user = os.path.join(os.path.expanduser("~"),'.config/Eficas',self.code) - else : - self.rep_user = os.path.join('C:/','.config/Eficas',self.code) + self.rep_user = os.path.join(os.path.expanduser("~"),'.config/Eficas',self.code) + #else : + # self.rep_user = os.path.join('C:/','.config/Eficas',self.code) self.setValeursParDefaut() @@ -102,11 +102,11 @@ class configBase(object): self.path_doc = os.path.abspath(os.path.join(self.repIni,'..','Doc')) self.exec_acrobat = 'acroread' nomDir="Eficas_"+self.code - if sys.platform[0:5]=="linux" : + #if sys.platform[0:5]=="linux" : #self.savedir = os.path.abspath(os.path.join(os.environ['HOME'],nomDir)) - rep=os.path.join(os.path.expanduser("~"),'.config/Eficas',self.code) - else: - self.savedir = os.path.abspath('C:/') + self.savedir=os.path.join(os.path.expanduser("~"),'.config/Eficas',self.code) + #else: + # self.savedir = os.path.abspath('C:/') self.modeNouvCommande='initial' self.affiche="alpha" self.closeAutreCommande = False diff --git a/InterfaceQT4/editor.pourCIST b/InterfaceQT4/editor.pourCIST deleted file mode 100644 index 7051af09..00000000 --- a/InterfaceQT4/editor.pourCIST +++ /dev/null @@ -1,1967 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -from __future__ import absolute_import -from __future__ import print_function -try : - from builtins import str - from builtins import range -except : pass - -import types,sys,os, re -import subprocess -import traceback - -import six -from six.moves import range -from PyQt5.QtWidgets import QWidget, QMessageBox, QFileDialog, QApplication, QSplitter -from PyQt5.QtGui import QPalette -from PyQt5.QtCore import QProcess, QFileInfo, QTimer, Qt, QDir, QSize -import time -import pdb -from datetime import date -from Extensions.i18n import tr - -import traceback - -# Modules Eficas - -import convert, generator -from Editeur import session -from Editeur import comploader -from Editeur import Objecttreeitem -from desBaseWidget import Ui_baseWidget -from InterfaceQT4.monViewTexte import ViewText -from monWidgetCreeParam import MonWidgetCreeParam -from . import browser -from . import readercata - -DictExtensions= {"MAP" : ".map", "TELEMAC" : '.cas'} - - - - -class JDCEditor(Ui_baseWidget,QWidget): -# ----------------------------------------- # - """ - Editeur de jdc - """ - - def __init__ (self,appli,fichier = None, jdc = None, QWParent=None, units = None, include=0 , vm=None): - #----------------------------------------------------------------------------------------------------------# - - QWidget.__init__(self,None) - self.i=0 - self.setupUi(self) - self.inhibeSplitter=0 - self.widgetOptionnel=None - self.fenetreCentraleAffichee=None - self.dejaDansPlieTout=False - self.afficheCommandesPliees = True - self.listeDesListesOuvertes=set() - self.appliEficas = appli - self.appli = appli #---- attendu par IHM - self.vm = vm - self.fichier = fichier - self.jdc = jdc - self.first = True - self.QWParent = QWParent - self.couleur = Qt.black - self.nodeEnCours=None - - if appli != None : - self.salome = self.appliEficas.salome - else : - self.salome=0 - print ("dans JDC pas d appli ????????") - - # ces attributs sont mis a jour par definitCode appelee par newEditor - self.code = self.appliEficas.CONFIGURATION.code - self.initSplitterSizes() - - #self.afficheListesPliees=False - self.afficheListesPliees=True - if self.code == "ASTER" or self.code == "monCode" : self.afficheListesPliees =True - if self.code == 'PSEN_N1' : self.afficheListesPliees = False - - self.mode_nouv_commande=self.appliEficas.CONFIGURATION.mode_nouv_commande - self.closeAutreCommande=self.appliEficas.CONFIGURATION.closeAutreCommande - self.closeFrameRechercheCommande=self.appliEficas.CONFIGURATION.closeFrameRechercheCommande - self.closeArbre=self.appliEficas.CONFIGURATION.closeArbre - self.affiche=self.appliEficas.CONFIGURATION.affiche - self.afficheOptionnelVide=self.appliEficas.CONFIGURATION.afficheOptionnelVide - self.nombreDeBoutonParLigne = self.appliEficas.CONFIGURATION.nombreDeBoutonParLigne - self.dicoImages = self.appliEficas.CONFIGURATION.dicoImages - self.simpleClic = self.appliEficas.CONFIGURATION.simpleClic - #self.taille = self.appliEficas.taille - - #if self.code in ['MAP','CARMELCND','PSEN'] : self.afficheCommandesPliees=False - if self.code in ['MAP','CARMELCND'] : self.afficheCommandesPliees=False - if self.code in ['MAP',]: - self.widgetTree.close() - self.widgetTree=None - if self.closeArbre: self.fermeArbre() - - self.version_code = session.d_env.cata - - - if not hasattr ( self.appliEficas, 'readercata') or self.appliEficas.multi==True: - self.readercata = readercata.READERCATA( self, self.appliEficas ) - self.appliEficas.readercata=self.readercata - self.appliEficas.code=self.code - else : - self.readercata=self.appliEficas.readercata - if self.readercata.fic_cata == None : return #Sortie Salome - self.titre=self.readercata.titre - self.Ordre_Des_Commandes=self.readercata.Ordre_Des_Commandes - self.Classement_Commandes_Ds_Arbre=self.readercata.Classement_Commandes_Ds_Arbre - - self.format = self.appliEficas.format_fichier - - self.dict_reels={} - self.liste_simp_reel=[] - self.ihm="QT" - self.dicoNouveauxMC={} - self.dicoNouveauxFact={} - - nameConf='configuration_'+self.code - configuration=__import__(nameConf) - self.CONFIGURATION = self.appliEficas.CONFIGURATION - self.CONFIGStyle = self.appliEficas.CONFIGStyle - - try: - self.CONFIGURATION.generator_module - _module = __import__(self.CONFIGURATION.generator_module) - info = _module.entryPoint() - generator.plugins.addEntryPoint(info) - except: - pass - - try: - self.CONFIGURATION.convert_module - #print self.CONFIGURATION.convert_module - _module = __import__(self.CONFIGURATION.convert_module) - info = _module.entryPoint() - convert.plugins.addEntryPoint(info) - except : - pass - - self.sb = None - if hasattr(self.appliEficas,"statusBar"): - self.sb = self.appliEficas.statusBar() - - self.fileInfo = None - self.lastModified = 0 - - self.modified = False - self.isReadOnly = False - self.node_selected = [] - self.deplier = True - self.message='' - if self.code in ['Adao','ADAO','MAP'] : self.afficheApresInsert=True - else : self.afficheApresInsert=False - if self.code in ['TELEMAC',] : self.enteteQTree='premier' - else : self.enteteQTree='complet' - if self.code in ['Adao','ADAO','TELEMAC'] : self.affichePlie=True - else : self.affichePlie=False - - self.Commandes_Ordre_Catalogue =self.readercata.Commandes_Ordre_Catalogue - - #------- construction du jdc -------------- - - jdc_item = None - - self.nouveau=0 - if self.fichier is not None: # fichier jdc fourni - self.fileInfo = QFileInfo(self.fichier) - self.fileInfo.setCaching(0) - if jdc==None : - try : - self.jdc = self.readFile(self.fichier) - if self.salome : self.appliEficas.addJdcInSalome( self.fichier) - except : - print ("mauvaise lecture") - else : - self.jdc=jdc - if self.jdc is not None and units is not None: - self.jdc.recorded_units=units - self.jdc.old_recorded_units=units - else: - if not self.jdc: # nouveau jdc - if not include : - self.jdc = self._newJDC(units=units) - else : - self.jdc = self._newJDCInclude(units=units) - self.nouveau=1 - - if self.jdc: - self.jdc.appli = self # a resorber - self.jdc.editor = self - self.jdc.lang = self.appli.langue - self.jdc.aReafficher=False - txt_exception = None - if not jdc: - self.jdc.analyse() - txt_exception = self.jdc.cr.get_mess_exception() - if txt_exception: - self.jdc = None - QApplication.restoreOverrideCursor() - self.affiche_infos(tr("Erreur fatale au chargement de %s",str(fichier)),Qt.red) - if (self.appliEficas.ssIhm == False) : QMessageBox.critical( self, tr("Erreur fatale au chargement d'un fichier"), txt_exception) - else: - comploader.charger_composants("QT") - jdc_item=Objecttreeitem.make_objecttreeitem( self, "nom", self.jdc ) - if (not self.jdc.isvalid()) and (not self.nouveau) and (self.appliEficas.ssIhm == False): - self.viewJdcRapport() - - - - if jdc_item and self.appliEficas.ssIhm==False: - self.tree = browser.JDCTree( jdc_item, self ) - self.appliEficas.construitMenu() - - - ############# - self.adjustSize() - - - #-------------------# Pour execution avec output et error dans le bash - def runPSEN(self): - # #-------------------# - # #if self.modified or self.fichier==None : self.saveFile() - # self.saveFile() - # - # #lancement avec le .bat - # path1 = os.path.abspath(os.path.join(os.path.abspath(__file__), '../','../','PSEN_Eficas','PSEN')) - # WrapperFilePath = os.path.join(path1, 'PSSEWrapper.py') - # import subprocess - # p = subprocess.Popen(['python',WrapperFilePath]) - # (out,err)=p.communicate() - # print out - # print err - - - self.saveFile() - - # lancement avec le .bat - path1 = os.path.abspath(os.path.join(os.path.abspath(__file__), '../', '../', 'PSEN_Eficas', 'PSEN')) - filer = open('temp.txt', 'r') - _path = [] - for line in filer: - _path.append(line) - filer.close() - - - if 'PF_PARAMETERS' in self.Ordre_Des_Commandes: - Python3_path = _path[2].replace('\n', '') - import subprocess - - # execfile - # 'PF_PARAMETERS' in self.readercata.Ordre_Des_Commandes - if 'PF_PARAMETERS' in self.Ordre_Des_Commandes: - WrapperFilePath = os.path.join(path1, 'PFWrapper.py') - p = subprocess.Popen([Python3_path + '/python.exe', WrapperFilePath]) - else: - WrapperFilePath = os.path.join(path1, 'PSSEWrapper.py') - p = subprocess.Popen(['python', WrapperFilePath]) - (out, err) = p.communicate() - print( out) - print( err) - - #-------------------# Pour execution avec output et error dans le bash - def runPSEN_N1(self): - #-------------------# - - self.saveFile() - #cmd = os.path.abspath(os.path.join(os.path.abspath(__file__), '../','../','PSEN_N1','run.py')) - #cmd = "from run import runPSEN_N1; dico="+str(dico) - - #textePython=("python "+ cmd + " "+ str(dico)) - #self._viewTextExecute( textePython,"psen_run",".sh") - - path1 = os.path.abspath(os.path.join(os.path.abspath(__file__), '../','../','ProcessOutputs_Eficas','TreatOutputs')) - sys.path.append(path1) - - if not(self.jdc.isvalid()): - QMessageBox.information( self, tr( "Unvalid JDC"),tr("incorrect keywords will be ignored")) - if generator.plugins.has_key('dicoImbrique'): - self.generator=generator.plugins['dicoImbrique']() - jdc_formate=self.generator.gener(self.jdc) - dico=self.generator.Dico - - ##to delete - fileDico = os.path.join(path1, 'dicoN1.py') #r'C:\Logiciels DER\PSEN_V16\Code\ProcessOutputs_Eficas\TreatOutputs\dicoN1.py' - f = open( str(fileDico), 'wb') - f.write("Dico =" + str(dico) ) - f.close() - - if 'PSSE_path' in dico['CASE_SELECTION']: - from Run import run - #self.appliEficas.close() - run(dico) - elif 'PF_path' in dico['CASE_SELECTION']: - import subprocess - RunPFfile = os.path.join(path1, 'RunPF.py') - Python3_path=dico['CASE_SELECTION']['Python3_path'] - p = subprocess.Popen([Python3_path + '/python.exe', RunPFfile]) - p.wait() - - - #res,txt_exception=run(dico) - #if res : QMessageBox.information( self, tr("fin de script run"), txt_exception) - #else : QMessageBox.critical( self, tr("Erreur fatale script run"), txt_exception) - - - #-------------------# Pour execution avec output et error dans le bash - def process_N1(self): - #-------------------# - - path1 = os.path.abspath(os.path.join(os.path.abspath(__file__), '../','../','ProcessOutputs_Eficas','TreatOutputs')) - sys.path.append(path1) - - - if generator.plugins.has_key('dicoImbrique'): - self.generator=generator.plugins['dicoImbrique']() - jdc_formate=self.generator.gener(self.jdc) - dico=self.get_Dico() #generator.Dico - - - for k in dico['CONTINGENCY_PROCESSING'].keys(): - - if k[0:19] == 'Component_List_For_' or k[0:21] =='Contingency_List_For_' : - newK=k.replace('___',' ') - l="'"+str(newK)+"'" - dico['CONTINGENCY_PROCESSING'][l]=dico['CONTINGENCY_PROCESSING'][k] - del dico['CONTINGENCY_PROCESSING'][k] - - ###to delete - fileDico = os.path.join(path1, 'dicoN1_process.py') - f = open( str(fileDico), 'wb') - f.write("Dico =" + str(dico) ) - f.close() - ### - return dico - - #return self.get_Dico() - - #-------------------# Pour execution avec output et error dans le bash - def process_VP(self): - #-------------------# - if 'dicoImbrique' in generator.plugins: - self.generator=generator.plugins['dicoImbrique']() - jdc_formate=self.generator.gener(self.jdc) - dico=self.get_Dico() #generator.Dico - return dico - - - #--------------------------------# - def ajoutCommentaire(self): - #--------------------------------# - if self.tree.selectedItems()==[] : - QMessageBox.warning( self, tr("Pas de noeud selectionne"),tr("Selectionnez un Noeud \nLe commentaire sera place apres le noeud selectionne")) - return - noeudAvantCommentaire=self.tree.selectedItems()[0] - if noeudAvantCommentaire ==self.tree.racine : - self.tree.racine.append_child("COMMENTAIRE",pos=0) - return - noeudAvantCommentaire.addComment(True) - - - - #--------------------------------# - def _newJDC( self ,units = None): - #--------------------------------# - """ - Initialise un nouveau JDC vierge - """ - self.modified=1 - CONTEXT.unset_current_step() - - texte="" - if self.code == "CARMELCND" : texte=self._newJDCCND() - if self.code == "ZCRACKS" : texte=self._newZCRACKS() - if self.code == "TELEMAC" : texte=self._newTELEMAC() - if self.code == "PSEN" : texte = self._newPSEN() - if self.code == "PSEN_N1" : texte = self._newPSEN_N1() - - if hasattr(self.readercata.cata[0],'TEXTE_NEW_JDC') : texte=self.readercata.cata[0].TEXTE_NEW_JDC - - #if self.code == "CF" : texte = self._new_CF() - # texte=self.newTexteCND - - jdc=self.readercata.cata[0].JdC( procedure =texte, - appli=self, - cata=self.readercata.cata, - cata_ord_dico=self.readercata.cata_ordonne_dico, - rep_mat=self.CONFIGURATION.rep_mat - ) - jdc.lang = self.appli.langue - if units is not None: - jdc.recorded_units=units - jdc.old_recorded_units=units - ## PNPN est ce que la ligne suivante est bien utile ? - if texte == "" :jdc.analyse() - return jdc - - #--------------------------------# - def _newJDCInclude( self ,units = None): - #--------------------------------# - """ - Initialise un nouveau JDC vierge - """ - import Extensions.jdc_include - JdC_aux=Extensions.jdc_include.JdC_include - CONTEXT.unset_current_step() - - jaux=self.readercata.cata[0].JdC( procedure="", - appli=self, - cata=self.readercata.cata, - cata_ord_dico=self.readercata.cata_ordonne_dico, - rep_mat=self.CONFIGURATION.rep_mat, - ) - jaux.analyse() - - J=JdC_aux( procedure="", - appli=self, - cata=self.readercata.cata, - cata_ord_dico=self.readercata.cata_ordonne_dico, - jdc_pere=jaux, - rep_mat=self.CONFIGURATION.rep_mat, - ) - J.analyse() - if units is not None: - J.recorded_units=units - J.old_recorded_units=units - return J - - - #-------------------------------# - def readFile(self, fn): - #--------------------------------# - """ - Public slot to read the text from a file. - @param fn filename to read from (string or QString) - """ - fn = six.text_type(fn) - - # ------------------------------------------------------------------------------------ - # charge le JDC - # ------------------------------------------------------------------------------------ - - jdcName=os.path.basename(fn) - # Il faut convertir le contenu du fichier en fonction du format - if self.appliEficas.format_fichier_in in convert.plugins: - # Le convertisseur existe on l'utilise - #appli = self - p=convert.plugins[self.appliEficas.format_fichier_in]() - p.readfile(fn) - if p.text=="" : self.nouveau=1 - pareil,texteNew=self.verifieCHECKSUM(p.text) - #if texteNew == "" - if pareil == False and (self.appliEficas.ssIhm == False) : - QMessageBox.warning( self, tr("fichier modifie"),tr("Attention! fichier change hors EFICAS")) - p.text=texteNew - memeVersion,texteNew=self.verifieVersionCataDuJDC(p.text) - if memeVersion == 0 : texteNew=self.traduitCatalogue(texteNew) - p.text=texteNew - text=p.convert('exec',self.appliEficas) - if not p.cr.estvide(): - self.affiche_infos("Erreur a la conversion",Qt.red) - else : - self.affiche_infos("Type de fichier non reconnu",Qt.red) - if self.appliEficas.ssIhm == False: - QMessageBox.critical( self, tr("Type de fichier non reconnu"), - tr("EFICAS ne sait pas ouvrir le type de fichier %s" ,self.appliEficas.format_fichier_in)) - return None - - CONTEXT.unset_current_step() - jdc=self.readercata.cata[0].JdC(procedure=text, - appli=self, - cata=self.readercata.cata, - cata_ord_dico=self.readercata.cata_ordonne_dico, - nom=jdcName, - rep_mat=self.CONFIGURATION.rep_mat - ) - # ---------------------------------------------------- - # charge le JDC fin - # ---------------------------------------------------- - self.modified = False - -# qApp.restoreOverrideCursor() - if self.fileInfo!= None : - self.lastModified = self.fileInfo.lastModified() - else : - self.lastModified = 1 - nouveauTitre=self.titre+" "+os.path.basename(self.fichier) - self.appliEficas.setWindowTitle(nouveauTitre) - return jdc - - - #-----------------------# - def get_source(self,file): - #-----------------------# - - # Il faut convertir le contenu du fichier en fonction du format - if self.format in convert.plugins : - # Le convertisseur existe on l'utilise - p=convert.plugins[self.format]() - p.readfile(file) - text=p.convert('execnoparseur') - if not p.cr.estvide(): - self.affiche_infos("Erreur a la conversion",Qt.red) - return text - else: - # Il n'existe pas c'est une erreur - self.affiche_infos("Type de fichier non reconnu",Qt.red) - QMessageBox.critical( self, tr("Type de fichier non reconnu"),tr("EFICAS ne sait pas ouvrir ce type de fichier")) - return None - - #-----------------------------------------------------------------------# - def _viewText(self, txt, caption = "FILE_VIEWER",largeur=1200,hauteur=600): - #--------------------------------------------------------------------# - w = ViewText( self.QWParent,self ,caption,txt,largeur,hauteur) - w.show() - # - - #----------------------------------------------# - def __generateTempFilename(self, prefix, suffix): - #----------------------------------------------# - import tempfile - (fd, filename) = tempfile.mkstemp(prefix=prefix, suffix=suffix) - os.close(fd) - return filename - # - - - #----------------------------------------------# - def _viewTextExecute(self, txt, prefix, suffix): - #----------------------------------------------# - self.w = ViewText( self.QWParent ) - self.w.setWindowTitle( "execution" ) - self.monExe=QProcess(self.w) - pid=self.monExe.pid() - nomFichier = self.__generateTempFilename(prefix, suffix = ".sh") - f=open(nomFichier,'w') - f.write(txt) - f.close() - self.monExe.readyReadStandardOutput.connect( self.readFromStdOut) - self.monExe.readyReadStandardError.connect( self.readFromStdErr) - exe='sh ' + nomFichier - self.monExe.start(exe) - self.monExe.closeWriteChannel() - self.w.exec_() - try: - commande="rm "+ nomFichier - os.system(commande) - except : - pass - - def readFromStdErr(self): - a=self.monExe.readAllStandardError() - self.w.view.append(str(a.data())) - - def readFromStdOut(self) : - a=self.monExe.readAllStandardOutput() - self.w.view.append(str(a.data())) - - def readFromStdErrQT4(self): - a=self.monExe.readAllStandardError() - self.w.view.append(QString.fromUtf8(a.data(),len(a))) ; - - def readFromStdOutQT4(self) : - a=self.monExe.readAllStandardOutput() - self.w.view.append(QString.fromUtf8(a.data(),len(a))) ; - - #-----------------------# - def generDico(self): - #-----------------------# - if 'dico' in generator.plugins: - self.generator=generator.plugins['dico']() - jdc_formate=self.generator.gener(self.jdc) - dico=self.generator.Dico - return dico - - #-----------------------# - def gestionParam(self): - #-----------------------# - w = MonWidgetCreeParam( self) - w.show() - - #-----------------------# - def viewJdcSource(self): - #-----------------------# - if self.fichier == None : return - f=open(self.fichier,'r') - texteSource=f.read() - f.close() - self._viewText(texteSource, "JDC_SOURCE") - - #-----------------------# - def viewJdcPy(self): - #-----------------------# - strSource = str( self.get_text_JDC(self.format) ) - self._viewText(strSource, "JDC_RESULTAT") - - #-----------------------# - def viewJdcRapport(self): - #-----------------------# - strRapport = six.text_type( self.jdc.report() ) - # on ajoute les regles - - self._viewText(strRapport, "JDC_RAPPORT") - - #-----------------------# - def viewJdcRegles(self): - #-----------------------# - if self.tree :self.tree.AppelleBuildLBRegles() - - - #----------------# - def closeIt(self): - #----------------# - """ - Public method called by the viewmanager to finally get rid of us. - """ - if self.jdc: - self.jdc.supprime() - self.close() - - #----------------------------------------------# - def affiche_infos(self,message,couleur=Qt.black): - #----------------------------------------------# - if self.sb: - mapalette=self.sb.palette() - mapalette.setColor( QPalette.WindowText, couleur ) - self.sb.setPalette( mapalette ); - self.sb.showMessage(message,4000) - self.couleur=couleur - - #------------------------------# - def affiche_alerte(self,titre,message): - #------------------------------# - # appele par I_MACRO_ETAPE - QMessageBox.information( self, titre, message) - - #-----------------------------------# - def affiche_commentaire(self,message): - #-----------------------------------# - self.labelCommentaire.setText(message) - QTimer.singleShot(6000, self.rendInvisible) - - #----------------------# - def rendInvisible(self): - #----------------------# - self.labelCommentaire.setText("") - - #-------------------# - def init_modif(self): - #-------------------# - """ - Met l'attribut modified a 'o' : utilise par Eficas pour savoir - si un JDC doit etre sauvegarde avant destruction ou non - """ - self.modified = True - - #---------------------------------------# - def chercheNoeudSelectionne(self,copie=1): - #---------------------------------------# - """ - appele par Cut et Copy pour positionner self.node_selected - """ - self.node_selected=[] - if len(self.tree.selectedItems()) == 0 : return - self.node_selected=self.tree.selectedItems() - - - #---------------------# - def handleSupprimer(self): - #---------------------# - self.chercheNoeudSelectionne() - if len(self.node_selected) == 0 : return - self.QWParent.noeud_a_editer = [] - if self.node_selected[0]==self.tree.racine: return - if len(self.node_selected) == 1 : self.node_selected[0].delete() - else : self.node_selected[0].deleteMultiple(self.node_selected) - - #---------------------# - def handleRechercher(self): - #---------------------# - from .monRecherche import DRecherche - monRechercheDialg=DRecherche(parent=self,fl=0) - monRechercheDialg.show() - - - #--------------------------------# - def handleRechercherDsCatalogue(self): - #-----------------------------# - from .monRechercheCatalogue import DRechercheCatalogue - monRechercheDialg=DRechercheCatalogue(self.QWParent,self) - monRechercheDialg.show() - - #---------------------# - def handleDeplier(self): - #---------------------# - if self.tree == None : return - #self.tree.collapseAll() - if self.deplier : - #print "je plie" - self.tree.expandItem(self.tree.topLevelItem(0)) - self.deplier = False - if self.fenetreCentraleAffichee != None : - if hasattr(self.fenetreCentraleAffichee.node,'plieToutEtReaffiche'): - self.fenetreCentraleAffichee.node.plieToutEtReaffiche() - else: - #print "je deplie" - self.tree.expandItem(self.tree.topLevelItem(0)) - self.deplier = True - if self.fenetreCentraleAffichee != None : - if hasattr(self.fenetreCentraleAffichee.node,'deplieToutEtReaffiche'): - self.fenetreCentraleAffichee.node.deplieToutEtReaffiche() - - #---------------------# - def handleEditCut(self): - #---------------------# - """ - Stocke dans Eficas.noeud_a_editer le noeud a couper - """ - #print "handleEditCut" - self.chercheNoeudSelectionne() - self.QWParent.edit="couper" - self.QWParent.noeud_a_editer = self.node_selected - - #-----------------------# - def handleEditCopy(self): - #-----------------------# - """ - Stocke dans Eficas.noeud_a_editer le noeud a copier - """ - self.chercheNoeudSelectionne() - if len(self.node_selected) == 0 : return - if len(self.node_selected) == 1 : self.node_selected[0].update_node_label_in_blue() - else : self.node_selected[0].update_plusieurs_node_label_in_blue(self.node_selected) - self.QWParent.edit="copier" - self.QWParent.noeud_a_editer = self.node_selected - - #------------------------# - def handleEditPaste(self): - #------------------------# - """ - Lance la copie de l'objet place dans self.QWParent.noeud_a_editer - Ne permet que la copie d'objets de type Commande ou MCF - """ - self.chercheNoeudSelectionne() - if (not(hasattr(self.QWParent,'noeud_a_editer'))) or len(self.QWParent.noeud_a_editer)==0: - QMessageBox.information( self, - tr("Copie impossible"), - tr("Veuillez selectionner un objet a copier")) - return - if len(self.node_selected) != 1 : - QMessageBox.information( self, - tr("Copie impossible"), - tr("Veuillez selectionner un seul objet : la copie se fera apres le noeud selectionne")) - return - noeudOuColler=self.node_selected[0] - - if len(self.QWParent.noeud_a_editer)!=1: - #self.handleEditPasteMultiple() - QMessageBox.information( self, tr("Copie impossible"), tr("Aucun Objet n a ete copie ou coupe")) - return - - noeudACopier=self.QWParent.noeud_a_editer[0] - - if (self.QWParent.edit != "couper"): - #print (noeudOuColler.item.parent.get_child(noeudOuColler.item.nom)) - try: - if noeudOuColler == self.tree.racine : - child=noeudOuColler.doPastePremier(noeudACopier) - else : - child=noeudACopier.doPaste(noeudOuColler,'after') - - if child==None or child==0: - QMessageBox.critical( self,tr( "Copie refusee"),tr('Eficas n a pas reussi a copier l objet')) - self.message = '' - self.affiche_infos("Copie refusee",Qt.red) - if noeudACopier.treeParent.editor != noeudOuColler.treeParent.editor: - try : - nom=noeudACopier.item.sd.nom - child.item.nomme_sd(nom) - except : - pass - return - self.init_modif() - child.select() - except : - traceback.print_exc() - QMessageBox.critical( self,tr( "Copie refusee"),tr('Copie refusee pour ce type d objet')) - self.message = '' - self.affiche_infos("Copie refusee",Qt.red) - return - - # il faut declarer le JDCDisplay_courant modifie - # suppression eventuelle du noeud selectionne - # si possible on renomme l objet comme le noeud couper - - if (self.QWParent.edit == "couper"): - print ('je pass la') - if noeudACopier.treeParent.editor != noeudOuColler.treeParent.editor: - QMessageBox.critical( self, tr("Deplacement refuse"),tr('Deplacement refuse entre 2 fichiers. Seule la copie est autorisee ')) - - #if 1: - try : - # indexNoeudACopier=noeudACopier.treeParent.children.index(noeudACopier) - indexNoeudACopier=self.getTreeIndex(noeudACopier) - noeudACopier.treeParent.item.deplaceEntite(indexNoeudACopier,indexNoeudOuColler,pos) - noeudACopier.treeParent.build_children() - - #else: - except: - pass - self.QWParent.noeud_a_editer=[] - - # on rend la copie a nouveau possible en liberant le flag edit - self.QWParent.edit="copier" - noeudACopier.select() - - #----------------------------------# - def handleDeplaceMultiple(self): - #----------------------------------# - pass - - #----------------------------------# - def handleEditPasteMultiple(self): - #----------------------------------# - - # On ne garde que les niveaux "Etape" - # On insere dans l'ordre du JDC - listeNoeudsACouper=[] - listeIndex=[] - listeChild=[] - listeItem=[] - from InterfaceQT4 import compojdc - noeudOuColler=self.node_selected[0] - if not (isinstance(noeudOuColler.treeParent, compojdc.Node)): - QMessageBox.information( self, - tr("Copie impossible a cet endroit",), - tr("Veuillez selectionner une commande, un parametre, un commentaire ou une macro")) - return - indexNoeudOuColler=noeudOuColler.treeParent.children.index(noeudOuColler) - - for noeud in self.QWParent.noeud_a_editer : - if not (isinstance(noeud.treeParent, compojdc.Node)): continue - indexInTree=noeud.treeParent.children.index(noeud) - indice = 0 - for index in listeIndex: - if index < indexInTree : indice = indice +1 - listeIndex.insert(indice, indexInTree) - listeNoeudsACouper.insert(indice, noeud) - - noeudJdc=noeudOuColler.treeParent - dejaCrees=0 - # on les cree a l'envers parcequ'on ajoute a NoeudOuColler - listeIndex.reverse() - for index in listeIndex: - indexTravail=index - if indexNoeudOuColler < index: - indexTravail=indexTravail+dejaCrees - noeudOuColler=noeudJdc.children[indexNoeudOuColler] - noeud=noeudJdc.children[indexTravail] - child=noeud.doPaste(noeudOuColler) - listeChild.append(child) - dejaCrees=dejaCrees+1 - - self.QWParent.noeud_a_editer = [] - for i in range(len(listeIndex)): - noeud=noeudJdc.children[indexNoeudOuColler+1+i] - self.QWParent.noeud_a_editer.append(noeud) - - listeASupprimer=[] - if self.QWParent.edit !="couper" : return - - for index in listeIndex: - indexTravail=index - if indexNoeudOuColler < index: - indexTravail=indexTravail+(len(listeIndex)) - noeud=noeudJdc.children[indexTravail] - - listeItem.append(noeud.item) - listeASupprimer.append(noeud) - - for i in range(len(listeChild)): - self.tree.item.suppitem(listeItem[i]) - listeChild[i].item.update(listeItem[i]) - - self.QWParent.noeud_a_editer = [] - - - #---------------------# - def getFileName(self): - #---------------------# - return self.fichier - - #---------------------------# - def get_file_variable(self) : - #---------------------------# - titre = tr("Choix d'un fichier XML") - texte = tr("Le fichier contient une commande MODEL\n") - texte = texte+tr('Donnez le nom du fichier XML qui contient la description des variables') - QMessageBox.information( self, titre,tr(texte)) - - fichier = QFileDialog.getOpenFileName(self.appliEficas, - tr('Ouvrir Fichier'), - self.appliEficas.CONFIGURATION.savedir, - tr('Wrapper Files (*.xml);;''All Files (*)')) - return fichier - - #--------------------------------------------------# - def writeFile(self, fn, txt = None,formatLigne="beautifie"): - #--------------------------------------------------# - """ - Public slot to write the text to a file. - - @param fn filename to write to string - @return flag indicating success - """ - - fn = six.text_type(fn) - - if txt == None : - txt = self.get_text_JDC(self.format,formatLigne=formatLigne) - eol = '\n' - if len(txt) >= len(eol): - if txt[-len(eol):] != eol: - txt += eol - else: - txt += eol - txt=self.ajoutVersionCataDsJDC(txt) - checksum=self.get_checksum(txt) - txt=txt+checksum - if self.code=="TELEMAC" : return 1 - try: - f = open(fn, 'w') - f.write(txt) - f.close() - return 1 - except IOError as why: - if (self.appliEficas.ssIhm == False): - QMessageBox.critical(self, tr('Sauvegarde du Fichier'), - tr('Le fichier')+str(fn) + tr('n a pas pu etre sauvegarde : ') + str(why)) - else : - print (why) - return 0 - - #-----------------------------------------------------------# - def get_text_JDC(self,format,pourRun=0,formatLigne="beautifie"): - #-----------------------------------------------------------# - if self.code == "MAP" and not(format in generator.plugins): format = "MAP" - if format in generator.plugins: - - # Le generateur existe on l'utilise - self.generator=generator.plugins[format]() - try : - jdc_formate=self.generator.gener(self.jdc,format=formatLigne,config=self.appliEficas.CONFIGURATION,appli=self.appliEficas) - if pourRun : jdc_formate=self.generator.textePourRun - if self.code == 'TELEMAC' : jdc_formate=self.generator.texteDico - except ValueError as e: - QMessageBox.critical(self, tr("Erreur a la generation"),str(e)) - return - - if not self.generator.cr.estvide(): - self.affiche_infos(tr("Erreur a la generation"),Qt.red) - QMessageBox.critical( self, tr("Erreur a la generation"),tr("EFICAS ne sait pas convertir ce JDC")) - return "" - else: - return jdc_formate - else: - # Il n'existe pas c'est une erreur - self.affiche_infos(tr("Format %s non reconnu" , self.format),Qt.red) - QMessageBox.critical( self, "Format non reconnu" ,tr("EFICAS ne sait pas convertir le JDC selon le format "+ self.format)) - return "" - - #----------------------# - def get_Dico(self): - #---------------------# - if 'dicoImbrique' in generator.plugins: - self.generator=generator.plugins['dicoImbrique']() - jdc_formate=self.generator.gener(self.jdc) - dico=self.generator.Dico - return dico - else : - self.affiche_infos(tr("Format %s non reconnu" , self.format),Qt.red) - QMessageBox.critical( self, "Format non reconnu" ,tr("EFICAS ne sait pas convertir le JDC selon le format "+ self.format)) - return "" - - - #------------# - def run(self): - #------------# - fonction="run"+self.code - #print fonction - if fonction in JDCEditor.__dict__: JDCEditor.__dict__[fonction](self,) - - #------------# - def saveRun(self): - #------------# - fonction="saveRun"+self.code - if fonction in JDCEditor.__dict__: JDCEditor.__dict__[fonction](self,) - - #---------------# - def runMAP(self): - #---------------# - - if not(self.jdc.isvalid()): - QMessageBox.critical( self, tr( "Execution impossible "),tr("le JDC doit etre valide pour une execution MAP")) - return - if len(self.jdc.etapes) != 1 : - QMessageBox.critical( self, tr("Execution impossible "),tr("le JDC doit contenir un et un seul composant")) - return - if self.modified or self.fichier==None : - self.fichierMapInput = self.__generateTempFilename(prefix = "map_run", suffix = ".map") - texte=self.get_text_JDC("MAP") - self.writeFile( self.fichierMapInput, txt = texte) - else : - self.fichierMapInput=self.fichier - composant=self.jdc.etapes[0].nom.lower()[0:-5] - - - # :TRICKY: to determine if a component requires SALOME, loads the component from Eficas catalog - # then instantiate corresponding class and call getUseSalome() method - try: - from mapengine.spec import factory - mapComponent = factory.new(composant)[0] - - command = "map" - if mapComponent.getUseSalome(): - command += " -r sappli" - textePython=(command + " run -n "+composant +" -i "+self.fichierMapInput) - - #textePython="ls -l" - self._viewTextExecute( textePython,"map_run",".sh") - #try: - # commande="rm "+self.fichierMapInput - # os.system(commande) - #except : - # pass - except Exception as e: - print((traceback.print_exc())) - - #-------------------# - def runZCRACKS(self): - #-------------------# - if not(self.jdc.isvalid()): - QMessageBox.critical( self, tr( "Execution impossible "),tr("le JDC doit etre valide pour une execution ")) - return - if self.modified or self.fichier==None : - #if 1: - self.fichierZcracksInput = self.__generateTempFilename(prefix = "zcracks_run", suffix = ".z7p") - texte=self.get_text_JDC("ZCRACKS",pourRun=1) - self.writeFile( self.fichierZcracksInput, txt = texte) - else : - self.fichierZcracksInput=self.fichier - try : - #commande ="Zrun -zp " - commande="more " - textePython=(commande + self.fichierZcracksInput) - self._viewTextExecute( textePython,"run_zcracks",".sh") - except Exception as e: - print((traceback.print_exc())) - - #-------------------# - def runCARMELCND(self): - #-------------------# - #if not(self.jdc.isvalid()): - # QMessageBox.critical( self, tr( "Execution impossible "),tr("le JDC doit etre valide pour une execution ")) - # return - if self.modified or self.fichier==None : - QMessageBox.critical( self, tr( "Execution impossible "),tr("Sauvegarder SVP avant l'execution ")) - return - if not hasattr(self,'generator'): texte=self.get_text_JDC(self.format) - from PrepareRunCarmel import prepareRunCarmel - fichierGenerique=os.path.basename(self.fichier).split(".")[0] - repMed=os.path.dirname(self.fichier) - repExeCarmel=self.generator.get_repExeCarmel() - textePython=prepareRunCarmel(repExeCarmel,repMed,fichierGenerique) - nomFichier = self.__generateTempFilename("carmel_run", suffix = ".sh") - f=open(nomFichier,'w') - f.write(textePython) - f.close() - commande="xterm -e sh "+nomFichier +"\n" - os.system(commande) - - #-------------------# - def runCarmelCS(self): - #-------------------# - try : - commande="runSession pilotyacsCS.py" - os.system(commande) - except Exception as e: - print((traceback.print_exc())) - - #-----------------------------------------------------# - def determineNomFichier(self,path,extension): - #-----------------------------------------------------# - if self.appli.code in DictExtensions: - chaine1=DictExtensions[self.appli.code]+" (*."+DictExtensions[self.appli.code]+");;" - extensions= tr(chaine1+ "All Files (*)") - else : - extensions= tr("JDC (*.comm);;" "All Files (*)") - - if self.appli.code == "MAP" : - extensions = extensions + ";; Run (*.input);;" - - fn = QFileDialog.getSaveFileName( self, - tr("sauvegarde"), path, - extensions,None, - QFileDialog.DontConfirmOverwrite) - if fn == None : return (0, None) - fn=fn[0] - if fn=='': return (0, None) - - ext = QFileInfo(fn).suffix() - if ext == '': fn+=extension - - if QFileInfo(fn).exists(): - msgBox = QMessageBox(self) - msgBox.setWindowTitle(tr("Sauvegarde du Fichier")) - msgBox.setText(tr("Le fichier %s existe deja.", six.text_type(fn))) - msgBox.addButton(tr("&Ecraser"),0) - msgBox.addButton(tr("&Abandonner"),1) - abort=msgBox.exec_() - if abort == 1 : return (0, "") - return (1,fn) - - #-----------------# - def saveRunMAP(self): - #-----------------# - extension=".input" - if not(self.jdc.isvalid()): - QMessageBox.critical( self, tr( "Sauvegarde de l'input impossible "), - tr("Un JdC valide est necessaire pour creer un .input") - ) - return - try : - composant=self.jdc.etapes[0].nom.lower()[0:-5] - except : - QMessageBox.critical( self, tr( "Sauvegarde de l'input impossible "), - tr("Choix du composant obligatoire") - ) - return - if hasattr(self.CONFIGURATION, "savedir"): path=self.CONFIGURATION.savedir - else : path='C:/' - - monNomFichier="" - if self.fichier is not None and self.fichier != "" : - maBase=str(QFileInfo(self.fichier).baseName())+".input" - monPath=str(QFileInfo(self.fichier).absolutePath()) - monNomFichier=os.path.join(monPath,maBase) - elif hasattr(self,'monNomFichierInput'): - monNomFichier=self.monNomFichierInput - - - monDialog=QFileDialog(self.appliEficas) - monDialog.setDirectory (path) - monDialog.setWindowTitle ("Save") - - for c in monDialog.children(): - if isinstance(c,QDialogButtonBox): - for b in c.children(): - if isinstance(b,QPushButton): - avant=b.text() - if avant=="&Open": b.setText("Save") - mesFiltres= "input Map (*.input);;All Files (*)" - monDialog.setNameFilters(mesFiltres) - if monNomFichier!="" : monDialog.selectFile(monNomFichier) - BOk=monDialog.exec_() - if BOk==0: return - fn=str(monDialog.selectedFiles()[0]) - if fn == "" or fn == None : return - if not fn.endswith(".input"): - fn += ".input" - self.monNomFichierInput=fn - - if not hasattr(self, 'fichierMapInput') or not self.fichierMapInput or not os.path.exists(self.fichierMapInput): - self.fichierMapInput = self.__generateTempFilename(prefix = "map_run", suffix = ".map") - texte=self.get_text_JDC("MAP") - self.writeFile( self.fichierMapInput, txt = texte) - - cmd = ("map gen -t dat -n " + composant + " -i " + self.fichierMapInput + " -o " + fn) - p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) - (output, err) = p.communicate() - - - #-----------------# - def saveRunPSEN(self): - #-----------------# - print( "saveRunPSEN") - self.saveFile() - return - - - #-----------------------------------------# - def cherche_Groupes(self): - #-----------------------------------------# - listeMA,listeNO=self.get_text_JDC("GroupMA") - return listeMA,listeNO - - #-----------------------------------------# - def cherche_Dico(self): - #-----------------------------------------# - dicoCourant={} - format = self.appliEficas.format_fichier - if format in generator.plugins: - # Le generateur existe on l'utilise - self.generator=generator.plugins[format]() - jdc_formate=self.generator.gener(self.jdc,format='beautifie',config=self.appliEficas.CONFIGURATION) - dicoCourant=self.generator.dico - return dicoCourant - - - - #-----------------------------------------# - def handleAjoutGroup(self,listeGroup): - #-----------------------------------------# - try : - #if 1: - from ajoutGroupe import handleAjoutGroupFiltre - #print listeGroup - handleAjoutGroupFiltre(self,listeGroup) - #print "apres handleAjoutGroupFiltre" - except : - #else : - pass - - #-----------------------------------------------------------------# - def saveFileLegerAs(self, fileName = None) : - #-----------------------------------------------------------------# - if fileName != None : - self.fichier = fileName - return self.saveFileLeger() - return self.saveFileLeger() - - #-----------------------------------------------------------------# - def saveFileLeger(self, path = None, saveas= 0,formatLigne="beautifie"): - #-----------------------------------------------------------------# - extension='.casR' - fn = self.fichier - #saveas=True # Pour forcer le nom - self.generator=generator.plugins[self.format]() - if self.fichier is None or saveas: - if path is None: path=self.CONFIGURATION.savedir - bOK, fn=self.determineNomFichier(path,extension) - if bOK == 0 : return (0, None) - if fn == None : return (0, None) - if fn== '' : return (0, None) - - ulfile = os.path.abspath(six.text_type(fn)) - self.appliEficas.CONFIGURATION.savedir=os.path.split(ulfile)[0] - fn = six.text_type(QDir.toNativeSeparators(fn)) - - self.fichier = os.path.splitext(fn)[0]+extension - - if hasattr(self.generator, "writeLeger"): - self.generator.writeLeger(self.fichier,self.jdc,config=self.appliEficas.CONFIGURATION,appli=self.appliEficas) - - if self.salome : self.appliEficas.addJdcInSalome( self.fichier) - - self.modified = 0 - nouveauTitre=self.titre+" "+str(os.path.basename(self.fichier)) - self.appliEficas.setWindowTitle(nouveauTitre) - return (1, self.fichier) - - #-----------------------------------------------------------------# - def saveFile(self, path = None, saveas= 0,formatLigne="beautifie"): - #-----------------------------------------------------------------# - """ - Public slot to save the text to a file. - - @param path directory to save the file in (string or QString) - @return tuple of two values (boolean, string) giving a success indicator and - the name of the saved file - """ - - self.modified=1 - if not self.modified and not saveas: - return (0, None) # do nothing if text wasn't changed - - if self.appli.code in DictExtensions : - extension=DictExtensions[self.appli.code] - else : - extension='.comm' - - newName = None - fn = self.fichier - if self.fichier is None or saveas: - if path is None: path=self.CONFIGURATION.savedir - bOK, fn=self.determineNomFichier(path,extension) - if bOK == 0 : return (0, None) - if fn == None : return (0, None) - if fn== '' : return (0, None) - - ulfile = os.path.abspath(six.text_type(fn)) - self.appliEficas.CONFIGURATION.savedir=os.path.split(ulfile)[0] - fn = six.text_type(QDir.toNativeSeparators(fn)) - newName = fn - - - if not (self.writeFile(fn,formatLigne=formatLigne)): return (0, None) - self.fichier = fn - self.modified = False - if self.fileInfo is None or saveas: - self.fileInfo = QFileInfo(self.fichier) - self.fileInfo.setCaching(0) - self.lastModified = self.fileInfo.lastModified() - if newName is not None: - self.appliEficas.addToRecentList(newName) - self.tree.racine.item.getObject().nom=os.path.basename(newName) - self.tree.racine.update_node_label() - - if self.jdc.isvalid() != 0 and hasattr(self.generator, "writeDefault"): - self.generator.writeDefault(fn) - elif self.code=="TELEMAC" and hasattr(self.generator, "writeDefault"): - self.generator.writeDefault(fn) - - if self.salome : - self.appliEficas.addJdcInSalome( self.fichier) - self.modified = 0 - nouveauTitre=self.titre+" "+str(os.path.basename(self.fichier)) - self.appliEficas.setWindowTitle(nouveauTitre) - - return (1, self.fichier) -# - - #----------------------------------------------# - def sauveLigneFile(self): - #----------------------------------------------# - self.modified=1 - return self.saveFile(formatLigne="Ligne") - - - #----------------------------------------------# - def saveFileAs(self, path = None,fileName=None): - #----------------------------------------------# - """ - Public slot to save a file with a new name. - - @param path directory to save the file in (string or QString) - @return tuple of two values (boolean, string) giving a success indicator and - the name of the saved file - """ - if fileName != None : - self.fichier = fileName - return self.saveFile() - return self.saveFile(path,1,"beautifie") - - - - #---------------------------------------------# - def get_file(self,unite=None,fic_origine = ''): - #---------------------------------------------# - # appele par I_JDC - ulfile = None - jdcText = "" - - titre = "" - - if unite : - titre = tr("Choix unite %d ", unite) - texte = tr("Le fichier %s contient une commande INCLUDE \n", str(fic_origine)) +"\n" - texte = texte+ tr("Donnez le nom du fichier correspondant a l unite logique ") + repr(unite) - labeltexte = tr('Fichier pour unite ') + repr( unite) - else: - titre = tr("Choix d'un fichier de poursuite") - texte = tr("Le fichier %s contient une commande POURSUITE\n", fic_origine) - texte = texte+tr('Donnez le nom du fichier dont vous \n voulez faire une poursuite') - - QMessageBox.information( self, titre,texte) - fn = QFileDialog.getOpenFileName(self.appliEficas, - titre, - self.appliEficas.CONFIGURATION.savedir) - - # ce retour est impose par le get_file d'I_JDC - if fn== '' : return None," " - if not fn : return (0, " ") - fn=fn[0] - - ulfile = os.path.abspath(six.text_type(fn)) - self.appliEficas.CONFIGURATION.savedir=os.path.split(ulfile)[0] - - # On utilise le convertisseur defini par format_fichier - source=self.get_source(ulfile) - if source: - # On a reussia convertir le fichier self.ulfile - jdcText = source - else: - # Une erreur a ete rencontree - jdcText = '' - return ulfile, jdcText - - #-----------------------------------# - def updateJdc(self, itemApres,texte): - #------------------------------------# - # ajoute une etape de JdC a partir d un texte - monItem=itemApres - etape=monItem.item.object - CONTEXT.set_current_step(etape) - etape.build_includeInclude(texte) - self.tree.racine.build_children() - - #-----------------------------------# - def updateJdcEtape(self, itemApres,texte): - #------------------------------------# - # ajoute une etape de JdC a partir d un texte - monItem=itemApres - etape=monItem.item.object - CONTEXT.set_current_step(etape) - try : - ok=etape.build_includeEtape(texte) - except : - ok=0 - if not ok : - QMessageBox.information( self, - tr("Import texte"), - tr("Impossible d importer le texte")) - self.tree.racine.build_children() - return ok - - - - - - - #----------------------------------------------# - def ajoutMCFact(self,etape,MCFils,listeAvant=()): - #----------------------------------------------# - # dans le JDC - print ('ajoutMCFact') - ouChercher=etape - print (ouChercher) - for mot in listeAvant : - ouChercher=ouChercher.get_child(mot,restreint="oui") - print (mot) - print (ouChercher) - monMC=etape.get_child(ouChercher,restreint="oui") - if monMC== None : monMC= ouChercher.addentite(MCFils) - monMC.isvalid() - - #-------------------------------------# - def getValeur(self,nomEtape,MCFils,listeAvant=()): - #-------------------------------------# - # dans le JDC - - ouChercher=None - for e in self.jdc.etapes: - if e.nom == nomEtape : ouChercher=e; break - if ouChercher==None : return None - for mot in listeAvant : - ouChercher=ouChercher.get_child(mot,restreint="oui") - #print (mot, ouChercher) - if ouChercher==None : return None - monMC=ouChercher.get_child(MCFils,restreint="oui") - if monMC== None : return None - return monMC.valeur - - #-----------------------------------------------------------# - def setValeur(self,nomEtape,MCFils,valeur,listeAvant=()): - #--------------------------------------------------------# - # dans le JDC - - ouChercher=None - for e in self.jdc.etapes: - if e.nom == nomEtape : ouChercher=e; break - if ouChercher==None : return None - for mot in listeAvant : - ouChercher=ouChercher.get_child(mot,restreint="oui") - #print (mot, ouChercher) - if ouChercher==None : return None - monMC=ouChercher.get_child(MCFils,restreint="oui") - monMC.set_valeur(valeur) - monMC.isvalid() - - - #-------------------------------------# - def deleteEtape(self,etape): - #-------------------------------------# - self.jdc.suppentite(etape) - - #-------------------------------------# - def deleteMC(self,etape,MCFils,listeAvant=()): - #-------------------------------------# - ouChercher=etape - for mot in listeAvant : - ouChercher=ouChercher.get_child(mot,restreint="oui") - monMC=ouChercher.get_child(MCFils,restreint="oui") - if monMC != None : ouChercher.suppentite(monMC) - ouChercher.state='changed' - ouChercher.isvalid() - - #-------------------------------------# - def ajoutMC(self,etape,MCFils,valeurs,listeAvant=()): - #-------------------------------------# - print('debut ajoutMC') - ouChercher=etape - for mot in listeAvant : - ouChercher=ouChercher.get_child(mot,restreint="oui") - monMC=etape.get_child(ouChercher,restreint="oui") - print( monMC) - if monMC== None : monMC= ouChercher.addentite(MCFils) - monMC.valeur=valeurs - monMC.val=valeurs - monMC.state='changed' - monMC.isvalid() - print(monMC) - - - #-----------------------------------------------------------# - def changeIntoMC(self,etape,MCFils,valeurs, listeAvant=()): - #-----------------------------------------------------------# - ouChercher=etape - for mot in listeAvant : - ouChercher=ouChercher.get_child(mot,restreint="oui") - if ouChercher ==None : print( 'SOUCI'); return - monMC=ouChercher.get_child(MCFils,restreint="oui") - if monMC== None : monMC= ouChercher.addentite(MCFils) - monMC.definition.into=valeurs - monMC.state='changed' - monMC.isvalid() - - #-------------------------------------# - def changeIntoDefMC(self,etape,listeMC,valeurs): - #-------------------------------------# - definitionEtape=getattr(self.jdc.cata[0],etape) - ouChercher=definitionEtape - if len(listeMC) > 1 : - for mc in listeMC[0:-1]: - mcfact=ouChercher.entites[mc] - ouChercher=mcfact - - mcAccas=ouChercher.entites[listeMC[-1]] - mcAccas.into=valeurs - - #-------------------------------------------------------------# - def deleteDefinitionMC(self,etape,listeAvant,nomDuMC): - #-------------------------------------------------------------# - #print 'in deleteDefinitionMC', etape,listeAvant,nomDuMC - definitionEtape=getattr(self.jdc.cata[0],etape) - ouChercher=definitionEtape - for k in listeAvant : - ouChercher=ouChercher.entites[k] - MCADetruire=ouChercher.entites[nomDuMC] - ouChercher.ordre_mc.remove(nomDuMC) - del ouChercher.entites[nomDuMC] - del self.dicoNouveauxMC[nomDuMC] - - - #-------------------------------------------------------------# - def ajoutDefinitionMC(self,etape,listeAvant,nomDuMC,typ,**args): - #-------------------------------------------------------------# - print('debut ajoutDefinitionMC') - definitionEtape=getattr(self.jdc.cata[0],etape) - ouChercher=definitionEtape - for k in listeAvant : - ouChercher=ouChercher.entites[k] - from Accas import A_SIMP - Nouveau=A_SIMP.SIMP(typ,**args) - Nouveau.pere=ouChercher - Nouveau.nom=nomDuMC - Nouveau.ordre_mc=[] - ouChercher.entites[nomDuMC]=Nouveau - ouChercher.ordre_mc.append(nomDuMC) - self.dicoNouveauxMC[nomDuMC]=('ajoutDefinitionMC',etape,listeAvant,nomDuMC,typ,args) - print( self.dicoNouveauxMC) - print('fin ajoutDefinitionMC') - - #----------------------------------------------------# - def changeIntoMCandSet(self,etape,MCFils,into,valeurs): - #----------------------------------------------------# - monMC=etape.get_child(MCFils,restreint="oui") - if monMC== None : monMC= etape.addentite(MCFils) - monMC.definition.into=into - monMC.valeur=valeurs - monMC.val=valeurs - monMC.state='changed' - monMC.isvalid() - - - - - #-------------------------------------------------------------------# - def reCalculeValiditeMCApresChgtInto(self,nomEtape,MCFils,listeAvant=()): - #-------------------------------------------------------------------# - # dans le JDC - for e in self.jdc.etapes: - if e.nom == nomEtape : ouChercher=e; break - - for mot in listeAvant : - try : - ouChercher=ouChercher.get_child(mot,restreint="oui") - # Le mot clef n est pas la - except : return 0 - try : - monMC=ouChercher.get_child(MCFils,restreint="oui") - # Le mot clef n est pas la - except : return 0 - if monMC == None : return 0 - - if hasattr(monMC.definition,'into') : - if type(monMC.definition.into) ==types.FunctionType : maListeDeValeur=monMC.definition.into() - else : maListeDeValeur=monMC.definition.into - else : - return 0 - - monMC.state='changed' - return 1 - - #-------------------------------------# - def changeDefautDefMC(self,nomEtape,listeMC,valeurs): - #-------------------------------------# - # dans le MDD - - #if isinstance (etape, str): - # for e in self.jdc.etapes: - # if e.nom == etape : etape=e; break - #if etape == None : return - definitionEtape=getattr(self.jdc.cata[0],nomEtape) - ouChercher=definitionEtape - if len(listeMC) > 1 : - - for mc in listeMC[0:-1]: - mcfact=ouChercher.entites[mc] - ouChercher=mcfact - - mcAccas=ouChercher.entites[listeMC[-1]] - mcAccas.defaut=valeurs - return 1 - - - - - #---------------------------------------------------------------------# - def ajoutDefinitionMCFact(self,nomEtape,listeAvant,nomDuMC,listeMC,**args): - #---------------------------------------------------------------------# - # dans le MDD - print ('ajoutDefinitionMCFact', nomDuMC) - definitionEtape=getattr(self.jdc.cata[0],nomEtape) - ouChercher=definitionEtape - for k in listeAvant : - ouChercher=ouChercher.entites[k] - from Accas import A_SIMP - for mc in listeMC : - nomMC=mc[0] - typMC=mc[1] - argsMC=mc[2] - nouveauMC=A_SIMP.SIMP(typMC,**argsMC) - nouveauMC.nom=nomMC - args[nomMC]=nouveauMC - from Accas import A_FACT - nouveauFact=A_FACT.FACT(**args) - nouveauFact.pere=ouChercher - nouveauFact.nom=nomDuMC - from Editeur.autre_analyse_cata import traite_entite - traite_entite(nouveauFact,[]) - ouChercher.entites[nomDuMC]=nouveauFact - ouChercher.ordre_mc.append(nomDuMC) - self.dicoNouveauxFact[nomDuMC]=('ajoutDefinitionMC',nomEtape,listeAvant,nomDuMC,listeMC,args) - #print self.dicoNouveauxMC - - - - #-------------------------------------# - def ajoutVersionCataDsJDC(self,txt): - #-------------------------------------# - if not hasattr(self.readercata.cata[0],'VERSION_CATALOGUE'): return txt - ligneVersion="#VERSION_CATALOGUE:"+self.readercata.cata[0].VERSION_CATALOGUE+":FIN VERSION_CATALOGUE\n" - texte=txt+ligneVersion - return texte - - #-------------------------------------# - def verifieVersionCataDuJDC(self,text): - #-------------------------------------# - memeVersion=False - indexDeb=text.find("#VERSION_CATALOGUE:") - indexFin=text.find(":FIN VERSION_CATALOGUE") - if indexDeb < 0 : - self.versionCataDuJDC="sans" - textJDC=text - else : - self.versionCataDuJDC=text[indexDeb+19:indexFin] - textJDC=text[0:indexDeb]+text[indexFin+23:-1] - - self.versionCata="sans" - if hasattr(self.readercata.cata[0],'VERSION_CATALOGUE'): self.versionCata=self.readercata.cata[0].VERSION_CATALOGUE - - if self.versionCata==self.versionCataDuJDC : memeVersion=True - return memeVersion,textJDC - - #-------------------------------# - def traduitCatalogue(self,texte): - #-------------------------------# - nomTraducteur="traduit"+self.readercata.code+self.versionCataDuJDC+"To"+self.versionCata - sys.path.append(os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)),"../Traducteur"))) - try : - traducteur=__import__(nomTraducteur) - monTraducteur=traducteur.MonTraducteur(texte) - nouveauTexte=monTraducteur.traduit() - return nouveauTexte - except : - return texte - - - #------------------------------# - def verifieCHECKSUM(self,text): - #------------------------------# - indexDeb=text.find("#CHECKSUM:") - if indexDeb < 0 : - return 1, text - indexFin=text.find(":FIN CHECKSUM") - checkAvant=text[indexDeb:indexFin+13] - textJDC=text[0:indexDeb]+text[indexFin+13:-1] - checksum=self.get_checksum(textJDC) - pareil=(checkAvant==checksum) - return pareil, textJDC - - #---------------------------# - def get_checksum(self,texte): - #---------------------------# - newtexte=texte.replace('"','\\"') - commande='echo "'+newtexte+'"|md5sum' - a=os.popen(commande) - checksum=a.read() - a.close() - ligne="#CHECKSUM:"+checksum[0:-1]+":FIN CHECKSUM" - return ligne - - - #---------------------------# - def _new_CF(self): - #---------------------------# - texte="CONDUITE_FORCEE();" - return texte - - - #---------------------------# - def _newTELEMAC(self): - #---------------------------# - #texte="INITIALIZATION();BOUNDARY_CONDITIONS();GENERAL_PARAMETERS();PHYSICAL_PARAMETERS();NUMERICAL_PARAMETERS();" - texte="COMPUTATION_ENVIRONMENT();HYDRO();GENERAL_PARAMETERS();NUMERICAL_PARAMETERS()" - #texte="TRACERS();" - return texte - - #---------------------------# - def _newPSEN(self): - #---------------------------# - if 'PF_PARAMETERS' in self.Ordre_Des_Commandes: - texte = "DIRECTORY() ;PF_PARAMETERS() ; SIMULATION() ; sansnom=DISTRIBUTION() ; sansnom=DISTRIBUTION() ; CORRELATION() ;" - else: - texte = "DIRECTORY() ; PSSE_PARAMETERS() ; SIMULATION() ; sansnom=DISTRIBUTION() ; sansnom=DISTRIBUTION() ; CORRELATION() ;" - # texte="" - return texte - - #---------------------------# - def _newPSEN_N1(self): - #---------------------------# - texte="CASE_SELECTION();N_PROCESSING_OPTIONS();CONTINGENCY_OPTIONS();CONTINGENCY_SELECTION();\nCONTINGENCY_PROCESSING(); " - #texte="CONTINGENCY_SELECTION();\nCONTINGENCY_PROCESSING(); " - return texte - - #---------------------------# - - #---------------------------# - def _newZCRACKS(self): - #---------------------------# - texte="MAILLAGES();REMESHING();" - return texte - - #---------------------------# - def _newJDCCND(self): - #---------------------------# - extensions=tr('Fichiers Med (*.med);;''Tous les Fichiers (*)') - - #if self.salome == 0 : - QMessageBox.information( self, - tr("Fichier Med"), - tr("Veuillez selectionner un fichier Med")) - QSfichier = QFileDialog.getOpenFileName(self.appliEficas, - caption='Fichier Med', - filter=extensions) - QSfichier=QSfichier[0] - self.fichierMED=QSfichier - from acquiertGroupes import getGroupes - erreur,self.listeGroupes,self.nomMaillage,self.dicoCoord=getGroupes(self.fichierMED) - if erreur != "" : print ("a traiter") - texteComm="COMMENTAIRE(u'Cree - fichier : "+self.fichierMED +" - Nom Maillage : "+self.nomMaillage+"');\nPARAMETRES()\n" - texteSources="" - texteCond="" - texteNoCond="" - texteVcut="" - texteZs="" - for groupe in self.listeGroupes : - if groupe[0:8]=='CURRENT_': - texteSources +=groupe[8:]+"=SOURCE(" - texteSources +="VecteurDirecteur=(1.0,2.0,3.0,),);\n" - if groupe[0:5]=='COND_': texteCond +=groupe[5:]+"=CONDUCTEUR();\n" - if groupe[0:7]=='NOCOND_': texteNoCond +=groupe[7:]+"=NOCOND();\n" - if groupe[0:5]=='VCUT_': texteVcut +='V_'+groupe[5:]+"=VCUT();\n" - if groupe[0:3]=='ZS_': texteZs +=groupe[3:]+"=ZS();\n" - texte=texteComm+texteSources+texteCond+texteNoCond+texteVcut+texteZs - self.newTexteCND=texte - self.modified=1 - return texte - - - #---------------------------# - def BoutonFileSelected(self): - #---------------------------# - - QSfichier=self.openfile.selectedFiles()[0] - self.fichierMED=str(QSfichier) - from acquiertGroupes import getGroupes - erreur,self.listeGroupes,self.nomMaillage=getGroupes(self.fichierMED) - if erreur != "" : print ("a traiter") - - #----------------------------- - def BoutonSalomePressed(self): - #---------------------------- - Msg,self.listeGroupes=self.appliEficas.ChercheGrpMailleInSalome() - self.fichierMED="A_partir_de_SMESH" - self.nomMaillage="A_partir_de_SMESH" - self.openfile.close() - - - #----------------------------------------- - def initSplitterSizes(self, nbWidget=3): - #----------------------------------------- - #print ("je passe ds initSplitterSizes", nbWidget) - - if self.code in [ 'Adao', 'ADAO', ] : self.splitterSizes3=[1,1550,150] - elif self.code in [ 'MAP'] : self.splitterSizes3=[700,300] - else : self.splitterSizes3=[150,1000,300] - - if self.code in [ 'Adao', 'ADAO', ] : self.splitterSizes2=[5,1500] - else : self.splitterSizes2=[300,1000] - - - - #----------------------------------------- - def restoreSplitterSizes(self,nbWidget=3): - #---------------------------------------- - - #traceback.print_stack() - #print ("je passe ds restoreSplitterSizes") - if not(hasattr(self,'splitter')) : return - if nbWidget==2 : newSizes=self.splitterSizes2 - if nbWidget==3 : newSizes=self.splitterSizes3 - #self.inhibeSplitter = 1 - self.splitter.setSizes(newSizes) - #self.inhibeSplitter = 0 - QApplication.processEvents() - # seule la fentetre du milieu est necessaire - self.splitter.widget(1).resizeEvent=self.saveSplitterSizes - - #----------------------------------------- - def saveSplitterSizes(self,event): - #----------------------------------------- - #print ("je passe ds saveSplitterSizes") - if self.inhibeSplitter : return - if self.widgetOptionnel == None : self.splitterSizes2 = self.splitter.sizes()[0:2] - else : self.splitterSizes3 = self.splitter.sizes()[0:3] - - #------------------------ - def fermeOptionnel(self): - #------------------------ - if self.widgetOptionnel == None : return - - self.inhibeSplitter=1 - self.widgetOptionnel.setParent(None) - self.widgetOptionnel.close() - self.widgetOptionnel.deleteLater() - self.widgetOptionnel=None - self.inhibeSplitter=0 - self.restoreSplitterSizes(2) - - #------------------------ - def ajoutOptionnel(self): - #------------------------ - #if len(self.splitterSizes) == 2 : self.splitterSizes.append(self.oldSizeWidgetOptionnel) - #else : self.splitterSizes[2] = self.oldSizeWidgetOptionnel # ceinture pour les close bizarres - #self.splitterSizes[1] = self.splitterSizes[1] - self.splitterSizes[2] - - self.restoreSplitterSizes(3) - - - #------------------------ - def fermeArbre(self): - #------------------------ - #print (self.widgetTree) - self.oldWidgetTree=self.widgetTree - self.widgetTree.hide() - #self.widgetTree=None - - #------------------------ - def ouvreArbre(self): - #------------------------ - #print ('je passe la') - #print (self.widgetTree) - #self.widgetTree=self.oldWidgetTree - self.widgetTree.show() - #self.restoreSplitterSizes(3) - - #----------------------------- - def getTreeIndex(self,noeud): - #---------------------------- - indexNoeud=-1 - if noeud in noeud.treeParent.children : - indexNoeud=noeud.treeParent.children.index(noeud) - else : - if hasattr(noeud,'vraiParent') : - noeudVrai = noeud - noeudVraiParent = noeud.vraiParent - while noeudVraiParent != noeud.treeParent and hasattr(noeudVraiParent,'vraiParent') : - noeudVrai = noeudVraiParent - noeudVraiParent = noeudVraiParent.vraiParent - pass - if noeudVraiParent == noeud.treeParent : - indexNoeud=noeud.treeParent.children.index(noeudVrai) - pass - pass - pass - return indexNoeud - -if __name__ == "__main__": - self.code='ASTER' - name='prefs_'+prefs.code - prefsCode=__import__(name) - - - if hasattr(prefsCode,'encoding'): - # Hack pour changer le codage par defaut des strings - import sys - reload(sys) - sys.setdefaultencoding(prefs.encoding) - del sys.setdefaultencoding - # Fin hack - -# code=options.code -# - app = QApplication(sys.argv) - mw = JDCEditor(None,'azAster.comm') - app.setMainWidget(mw) - app.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()")) - mw.show() - - res = app.exec_loop() - sys.exit(res) diff --git a/InterfaceQT4/editor.py b/InterfaceQT4/editor.py index e9ab3864..e3259a91 100755 --- a/InterfaceQT4/editor.py +++ b/InterfaceQT4/editor.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/editorJuillet.py b/InterfaceQT4/editorJuillet.py deleted file mode 100755 index 616587c1..00000000 --- a/InterfaceQT4/editorJuillet.py +++ /dev/null @@ -1,1249 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -from __future__ import absolute_import -from __future__ import print_function -try : - from builtins import str - from builtins import range -except : pass - -import types,sys,os, re -import subprocess -import traceback -import six - -from monCodeMeteoAppelRun import Profil_Neutre - - -from PyQt5.QtWidgets import QWidget, QMessageBox, QFileDialog, QApplication, QSplitter, QLabel -from PyQt5.QtGui import QPalette -from PyQt5.QtCore import QProcess, QFileInfo, QTimer, Qt, QDir, QSize - -import traceback - -# Modules Eficas -from Extensions.i18n import tr - -from Editeur import session -from Editeur import comploader -from Editeur import Objecttreeitem -from InterfaceQT4 import browser - -from desBaseWidget import Ui_baseWidget -from InterfaceQT4.monViewTexte import ViewText -from monWidgetCreeParam import MonWidgetCreeParam - -DictExtensions= {"MAP" : ".map", "TELEMAC" : '.cas'} -debug = False - - -from InterfaceQT4.editorSsIhm import JDCEditorSsIhm - - -class JDCEditor(JDCEditorSsIhm,Ui_baseWidget,QWidget): -# ----------------------------------------- # - """ - Editeur de jdc - """ - -# ---------------------------------------- -# Methodes faisant appel a ssIhm -# ---------------------------------------- - - def __init__ (self,appli,fichier = None, jdc=None, QWParent=None, units = None, include=0): - #------------------------------------------------------------------------------------------ - - - QWidget.__init__(self,None) - self.setupUi(self) - - self.inhibeSplitter=0 - self.widgetOptionnel=None - self.fenetreCentraleAffichee=None - self.dejaDansPlieTout=False - self.listeDesListesOuvertes=set() - self.afficheListesPliees=True - if appli!=None and hasattr(appli,"statusBar"): self.sb = appli.statusBar() - else : self.sb = None - self.QWParent=QWParent - - JDCEditorSsIhm. __init__ (self,appli,fichier, jdc,units,include) - - # Particularites IHM : met la fenetre a jour - - self.initSplitterSizes() - if self.code == "ASTER" or self.code == "monCode" : self.afficheListesPliees =True - if self.code == 'PSEN_N1' : self.afficheListesPliees = False - - #self.affiche=self.appliEficas.maConfiguration.affiche - - if self.code in ['MAP','CARMELCND','PSEN'] : self.maConfiguration.afficheCommandesPliees=False - if self.code in ['MAP',]: self.fermeArbre() - # self.widgetTree.close() - # self.widgetTree=None - - if self.maConfiguration.closeArbre: self.fermeArbre() - if self.maConfiguration.boutonDsMenuBar : self.appliEficas.remplitIconesCommandes() - - self.version_code = session.d_env.cata - - self.format = self.appliEficas.format_fichier - - self.node_selected = [] - self.deplier = True - self.message='' - self.afficheApresInsert=False - if self.maConfiguration.closeArbre : self.afficheApresInsert=True - if self.code in ['Adao','ADAO','MAP'] : self.afficheApresInsert=True - if self.code in ['TELEMAC',] : self.enteteQTree='premier' - else : self.enteteQTree='complet' - if self.code in ['Adao','ADAO','TELEMAC'] : self.affichePlie=True - else : self.affichePlie=False - - self.Commandes_Ordre_Catalogue =self.readercata.Commandes_Ordre_Catalogue - - if self.appliEficas.readercata.demandeCatalogue==True : - nomFichierTranslation='translatorFichier'+'_'+str(self.appliEficas.readercata.versionCode) - if hasattr(self.appliEficas.maConfiguration,nomFichierTranslation) : - translatorFichier=getattr(self.appliEficas.maConfiguration,nomFichierTranslation) - from Extensions import localisation - localisation.localise(None,self.appliEficas.langue,translatorFichier=translatorFichier) - - - if self.jdc_item and self.appliEficas.ssIhm==False : - self.tree = browser.JDCTree( self.jdc_item, self ) - self.appliEficas.construitMenu() - - self.adjustSize() - - - #-------------------------------# - def readFile(self, fn): - #--------------------------------# - """ - Public slot to read the text from a file. - @param fn filename to read from (string or QString) - """ - - jdc=JDCEditorSsIhm.readFile(self, fn) - - # Particularites IHM : met le titre de la fenetre a jour -# qApp.restoreOverrideCursor() - if self.fileInfo!= None : self.lastModified = self.fileInfo.lastModified() - nouveauTitre=self.titre+" "+os.path.basename(self.fichier) - self.appliEficas.setWindowTitle(nouveauTitre) - - return jdc - -# --------------------------------------------- -# Methodes Inchangees -# --------------------------------------------- -# _newJDC -# _newJDCInclude -# __generateTempFilename -# getSource -# generDico -# viewJdcSource -# viewJdcPy -# viewJdcRapport -# getFileName -# initModif -# writeFile -# getTextJDC -# verifieChecksum -# getChecksum -# getDico -# chercheGroupes -# chercheDico -# saveFileLegerAs - -# --------------------------------------------- -# Methodes Surchargees -# --------------------------------------------- - - #-----------------------------------------------------------------------# - def _viewText(self, txt, caption = "FILE_VIEWER",largeur=1200,hauteur=600): - #--------------------------------------------------------------------# - w = ViewText( self.QWParent,self ,caption,txt,largeur,hauteur) - w.show() - - #--------------------------------# - def informe(self,titre,txt,critique=True): - #--------------------------------# - if critique : - self.afficheInfos(tr(txt),Qt.red) - QMessageBox.critical( self, tr(titre), tr(txt)) - else : - QMessageBox.warning( self, tr(titre),tr(txt)) - - #--------------------------------# - def ajoutCommentaire(self): - #--------------------------------# - if self.tree.selectedItems()==[] : - QMessageBox.warning( self, tr("Pas de noeud selectionne"),tr("Selectionnez un Noeud \nLe commentaire sera place apres le noeud selectionne")) - return - noeudAvantCommentaire=self.tree.selectedItems()[0] - if noeudAvantCommentaire ==self.tree.racine : - self.tree.racine.appendChild("COMMENTAIRE",pos=0) - return - noeudAvantCommentaire.addComment(True) - - - #----------------------------------------------# - def _viewTextExecute(self, txt, prefix, suffix): - #----------------------------------------------# - self.w = ViewText( self.QWParent ) - self.w.setWindowTitle( "execution" ) - self.monExe=QProcess(self.w) - pid=self.monExe.pid() - nomFichier = self.__generateTempFilename(prefix, suffix = ".sh") - f=open(nomFichier,'w') - f.write(txt) - f.close() - self.monExe.readyReadStandardOutput.connect( self.readFromStdOut) - self.monExe.readyReadStandardError.connect( self.readFromStdErr) - exe='sh ' + nomFichier - self.monExe.start(exe) - self.monExe.closeWriteChannel() - self.w.exec_() - try: - commande="rm "+ nomFichier - os.system(commande) - except : - pass - - def readFromStdErr(self): - a=self.monExe.readAllStandardError() - self.w.view.append(str(a.data())) - - def readFromStdOut(self) : - a=self.monExe.readAllStandardOutput() - self.w.view.append(str(a.data())) - - - #-----------------------# - def gestionParam(self): - #-----------------------# - w = MonWidgetCreeParam( self) - w.show() - - - #----------------# - def closeIt(self): - #----------------# - """ - Public method called by the viewmanager to finally get rid of us. - """ - if self.jdc: self.jdc.supprime() - self.close() - - #----------------------------------------------# - def afficheInfos(self,message,couleur=Qt.black): - #----------------------------------------------# - if couleur=='red' : couleur = Qt.red - if self.sb: - mapalette=self.sb.palette() - mapalette.setColor( QPalette.WindowText, couleur ) - self.sb.setPalette( mapalette ); - self.sb.showMessage(message,4000) - self.couleur=couleur - - #------------------------------# - def afficheAlerte(self,titre,message): - #------------------------------# - # appele par I_MACRO_ETAPE - QMessageBox.information( self, titre, message) - - #-----------------------------------# - def afficheCommentaire(self,message): - #-----------------------------------# - self.labelCommentaire.setText(message) - QTimer.singleShot(6000, self.rendInvisible) - - #----------------------# - def rendInvisible(self): - #----------------------# - self.labelCommentaire.setText("") - - #---------------------------------------# - def chercheNoeudSelectionne(self,copie=1): - #---------------------------------------# - """ - appele par Cut et Copy pour positionner self.node_selected - """ - self.node_selected=[] - if len(self.tree.selectedItems()) == 0 : return - self.node_selected=self.tree.selectedItems() - - - #---------------------# - def handleSupprimer(self): - #---------------------# - self.chercheNoeudSelectionne() - if len(self.node_selected) == 0 : return - self.QWParent.noeud_a_editer = [] - if self.node_selected[0]==self.tree.racine: return - if len(self.node_selected) == 1 : self.node_selected[0].delete() - else : self.node_selected[0].deleteMultiple(self.node_selected) - - #---------------------# - def handleRechercher(self): - #---------------------# - from .monRecherche import DRecherche - monRechercheDialg=DRecherche(parent=self,fl=0) - monRechercheDialg.show() - - - #--------------------------------# - def handleRechercherDsCatalogue(self): - #-----------------------------# - from .monRechercheCatalogue import DRechercheCatalogue - monRechercheDialg=DRechercheCatalogue(self.QWParent,self) - monRechercheDialg.show() - - #---------------------# - def handleDeplier(self): - #---------------------# - if self.tree == None : return - #self.tree.collapseAll() - if self.deplier : - #print "je plie" - self.tree.expandItem(self.tree.topLevelItem(0)) - self.deplier = False - if self.fenetreCentraleAffichee != None : - if hasattr(self.fenetreCentraleAffichee.node,'plieToutEtReaffiche'): - self.fenetreCentraleAffichee.node.plieToutEtReaffiche() - else: - #print "je deplie" - self.tree.expandItem(self.tree.topLevelItem(0)) - self.deplier = True - if self.fenetreCentraleAffichee != None : - if hasattr(self.fenetreCentraleAffichee.node,'deplieToutEtReaffiche'): - self.fenetreCentraleAffichee.node.deplieToutEtReaffiche() - - #---------------------# - def handleEditCut(self): - #---------------------# - """ - Stocke dans Eficas.noeud_a_editer le noeud a couper - """ - #print "handleEditCut" - self.chercheNoeudSelectionne() - self.QWParent.edit="couper" - self.QWParent.noeud_a_editer = self.node_selected - - #-----------------------# - def handleEditCopy(self): - #-----------------------# - """ - Stocke dans Eficas.noeud_a_editer le noeud a copier - """ - self.chercheNoeudSelectionne() - if len(self.node_selected) == 0 : return - if len(self.node_selected) == 1 : self.node_selected[0].updateNodeLabelInBlue() - else : self.node_selected[0].updatePlusieursNodeLabelInBlue(self.node_selected) - self.QWParent.edit="copier" - self.QWParent.noeud_a_editer = self.node_selected - - #------------------------# - def handleEditPaste(self): - #------------------------# - """ - Lance la copie de l'objet place dans self.QWParent.noeud_a_editer - Ne permet que la copie d'objets de type Commande ou MCF - """ - self.chercheNoeudSelectionne() - if (not(hasattr(self.QWParent,'noeud_a_editer'))) or len(self.QWParent.noeud_a_editer)==0: - QMessageBox.information( self, - tr("Copie impossible"), - tr("Veuillez selectionner un objet a copier")) - return - if len(self.node_selected) != 1 : - QMessageBox.information( self, - tr("Copie impossible"), - tr("Veuillez selectionner un seul objet : la copie se fera apres le noeud selectionne")) - return - noeudOuColler=self.node_selected[0] - - if len(self.QWParent.noeud_a_editer)!=1: - #self.handleEditPasteMultiple() - QMessageBox.information( self, tr("Copie impossible"), tr("Aucun Objet n a ete copie ou coupe")) - return - - noeudACopier=self.QWParent.noeud_a_editer[0] - - if (self.QWParent.edit != "couper"): - #print (noeudOuColler.item.parent.getChild(noeudOuColler.item.nom)) - try: - if noeudOuColler == self.tree.racine : - child=noeudOuColler.doPastePremier(noeudACopier) - else : - child=noeudACopier.doPaste(noeudOuColler,'after') - - if child==None or child==0: - QMessageBox.critical( self,tr( "Copie refusee"),tr('Eficas n a pas reussi a copier l objet')) - self.message = '' - self.afficheInfos("Copie refusee",Qt.red) - if noeudACopier.treeParent.editor != noeudOuColler.treeParent.editor: - try : - nom=noeudACopier.item.sd.nom - child.item.nommeSd(nom) - except : - pass - return - self.initModif() - child.select() - except : - traceback.print_exc() - QMessageBox.critical( self,tr( "Copie refusee"),tr('Copie refusee pour ce type d objet')) - self.message = '' - self.afficheInfos("Copie refusee",Qt.red) - return - - # il faut declarer le JDCDisplay_courant modifie - # suppression eventuelle du noeud selectionne - # si possible on renomme l objet comme le noeud couper - - if (self.QWParent.edit == "couper"): - print ('je pass la') - if noeudACopier.treeParent.editor != noeudOuColler.treeParent.editor: - QMessageBox.critical( self, tr("Deplacement refuse"),tr('Deplacement refuse entre 2 fichiers. Seule la copie est autorisee ')) - - #if 1: - try : - # indexNoeudACopier=noeudACopier.treeParent.children.index(noeudACopier) - indexNoeudACopier=self.getTreeIndex(noeudACopier) - noeudACopier.treeParent.item.deplaceEntite(indexNoeudACopier,indexNoeudOuColler,pos) - noeudACopier.treeParent.buildChildren() - - #else: - except: - pass - self.QWParent.noeud_a_editer=[] - - # on rend la copie a nouveau possible en liberant le flag edit - self.QWParent.edit="copier" - noeudACopier.select() - - #----------------------------------# - def handleDeplaceMultiple(self): - #----------------------------------# - pass - - #----------------------------------# - def handleEditPasteMultiple(self): - #----------------------------------# - - # On ne garde que les niveaux "Etape" - # On insere dans l'ordre du JDC - listeNoeudsACouper=[] - listeIndex=[] - listeChild=[] - listeItem=[] - from InterfaceQT4 import compojdc - noeudOuColler=self.node_selected[0] - if not (isinstance(noeudOuColler.treeParent, compojdc.Node)): - QMessageBox.information( self, - tr("Copie impossible a cet endroit",), - tr("Veuillez selectionner une commande, un parametre, un commentaire ou une macro")) - return - indexNoeudOuColler=noeudOuColler.treeParent.children.index(noeudOuColler) - - for noeud in self.QWParent.noeud_a_editer : - if not (isinstance(noeud.treeParent, compojdc.Node)): continue - indexInTree=noeud.treeParent.children.index(noeud) - indice = 0 - for index in listeIndex: - if index < indexInTree : indice = indice +1 - listeIndex.insert(indice, indexInTree) - listeNoeudsACouper.insert(indice, noeud) - - noeudJdc=noeudOuColler.treeParent - dejaCrees=0 - # on les cree a l'envers parcequ'on ajoute a NoeudOuColler - listeIndex.reverse() - for index in listeIndex: - indexTravail=index - if indexNoeudOuColler < index: - indexTravail=indexTravail+dejaCrees - noeudOuColler=noeudJdc.children[indexNoeudOuColler] - noeud=noeudJdc.children[indexTravail] - child=noeud.doPaste(noeudOuColler) - listeChild.append(child) - dejaCrees=dejaCrees+1 - - self.QWParent.noeud_a_editer = [] - for i in range(len(listeIndex)): - noeud=noeudJdc.children[indexNoeudOuColler+1+i] - self.QWParent.noeud_a_editer.append(noeud) - - listeASupprimer=[] - if self.QWParent.edit !="couper" : return - - for index in listeIndex: - indexTravail=index - if indexNoeudOuColler < index: - indexTravail=indexTravail+(len(listeIndex)) - noeud=noeudJdc.children[indexTravail] - - listeItem.append(noeud.item) - listeASupprimer.append(noeud) - - for i in range(len(listeChild)): - self.tree.item.suppItem(listeItem[i]) - listeChild[i].item.update(listeItem[i]) - - self.QWParent.noeud_a_editer = [] - - #----------------------------------# - def handleAjoutEtape(self,nomEtape): - #----------------------------------# - self.chercheNoeudSelectionne() - if len(self.node_selected) == 0 or self.node_selected[0] == self.tree.racine : - nodeOuAjouter=self.tree.racine - nouveau=nodeOuAjouter.appendChild(nomEtape,pos='first') - else : - nodeOuAjouter=self.node_selected[0] - if nodeOuAjouter != self.tree.racine : - while nodeOuAjouter.treeParent != self.tree.racine: - print (nodeOuAjouter) - nodeOuAjouter=nodeOuAjouter.treeParent - print (nodeOuAjouter.parent == self.tree.racine) - nouveau=nodeOuAjouter.appendBrother(nomEtape) - try : - self.node_selected[0].setSelected(False) - except : pass - nouveau.setSelected(True) - nouveau.affichePanneau() - - - #---------------------------# - def getFileVariable(self) : - #---------------------------# - titre = tr("Choix d'un fichier XML") - texte = tr("Le fichier contient une commande MODEL\n") - texte = texte+tr('Donnez le nom du fichier XML qui contient la description des variables') - QMessageBox.information( self, titre,tr(texte)) - - fichier = QFileDialog.getOpenFileName(self.appliEficas, - tr('Ouvrir Fichier'), - self.appliEficas.maConfiguration.savedir, - tr('Wrapper Files (*.xml);;''All Files (*)')) - return fichier - - #------------# - def run(self): - #------------# - fonction="run"+self.code - #print fonction - if fonction in JDCEditor.__dict__: JDCEditor.__dict__[fonction](self,) - - #------------# - def saveRun(self): - #------------# - fonction="saveRun"+self.code - if fonction in JDCEditor.__dict__: JDCEditor.__dict__[fonction](self,) - - -# --------------------------------------------- -# Methodes Non Crees dans ssIHM -# --------------------------------------------- - - #---------------# - def runMAP(self): - #---------------# - - if not(self.jdc.isValid()): - QMessageBox.critical( self, tr( "Execution impossible "),tr("le JDC doit etre valide pour une execution MAP")) - return - if len(self.jdc.etapes) != 1 : - QMessageBox.critical( self, tr("Execution impossible "),tr("le JDC doit contenir un et un seul composant")) - return - if self.modified or self.fichier==None : - self.fichierMapInput = self.__generateTempFilename(prefix = "map_run", suffix = ".map") - texte=self.getTextJDC("MAP") - self.writeFile( self.fichierMapInput, txt = texte) - else : - self.fichierMapInput=self.fichier - composant=self.jdc.etapes[0].nom.lower()[0:-5] - - - # :TRICKY: to determine if a component requires SALOME, loads the component from Eficas catalog - # then instantiate corresponding class and call getUseSalome() method - try: - from mapengine.spec import factory - mapComponent = factory.new(composant)[0] - - command = "map" - if mapComponent.getUseSalome(): - command += " -r sappli" - textePython=(command + " run -n "+composant +" -i "+self.fichierMapInput) - - #textePython="ls -l" - self._viewTextExecute( textePython,"map_run",".sh") - #try: - # commande="rm "+self.fichierMapInput - # os.system(commande) - #except : - # pass - except Exception as e: - print((traceback.print_exc())) - - #-------------------# - def runZCRACKS(self): - #-------------------# - if not(self.jdc.isValid()): - QMessageBox.critical( self, tr( "Execution impossible "),tr("le JDC doit etre valide pour une execution ")) - return - if self.modified or self.fichier==None : - #if 1: - self.fichierZcracksInput = self.__generateTempFilename(prefix = "zcracks_run", suffix = ".z7p") - texte=self.getTextJDC("ZCRACKS",pourRun=1) - self.writeFile( self.fichierZcracksInput, txt = texte) - else : - self.fichierZcracksInput=self.fichier - try : - #commande ="Zrun -zp " - commande="more " - textePython=(commande + self.fichierZcracksInput) - self._viewTextExecute( textePython,"run_zcracks",".sh") - except Exception as e: - print((traceback.print_exc())) - - #-------------------# - def runCARMELCND(self): - #-------------------# - #if not(self.jdc.isValid()): - # QMessageBox.critical( self, tr( "Execution impossible "),tr("le JDC doit etre valide pour une execution ")) - # return - if self.modified or self.fichier==None : - QMessageBox.critical( self, tr( "Execution impossible "),tr("Sauvegarder SVP avant l'execution ")) - return - if not hasattr(self,'generator'): texte=self.getTextJDC(self.format) - from PrepareRunCarmel import prepareRunCarmel - fichierGenerique=os.path.basename(self.fichier).split(".")[0] - repMed=os.path.dirname(self.fichier) - repExeCarmel=self.generator.get_repExeCarmel() - textePython=prepareRunCarmel(repExeCarmel,repMed,fichierGenerique) - nomFichier = self.__generateTempFilename("carmel_run", suffix = ".sh") - f=open(nomFichier,'w') - f.write(textePython) - f.close() - commande="xterm -e sh "+nomFichier +"\n" - os.system(commande) - - #-------------------# - def runCarmelCS(self): - #-------------------# - try : - commande="runSession pilotyacsCS.py" - os.system(commande) - except Exception as e: - print((traceback.print_exc())) - - #-----------------------------------------------------# - def determineNomFichier(self,path,extension): - #-----------------------------------------------------# - if self.appli.code in DictExtensions: - chaine1=DictExtensions[self.appli.code]+" (*."+DictExtensions[self.appli.code]+");;" - extensions= tr(chaine1+ "All Files (*)") - else : - extensions= tr("JDC (*.comm);;" "All Files (*)") - - if self.appli.code == "MAP" : - extensions = extensions + ";; Run (*.input);;" - - fn = QFileDialog.getSaveFileName( self, - tr("sauvegarde"), path, - extensions,None, - QFileDialog.DontConfirmOverwrite) - if fn == None : return (0, None) - fn=fn[0] - if fn=='': return (0, None) - - ext = QFileInfo(fn).suffix() - if ext == '': fn+=extension - - if QFileInfo(fn).exists(): - msgBox = QMessageBox(self) - msgBox.setWindowTitle(tr("Sauvegarde du Fichier")) - msgBox.setText(tr("Le fichier %s existe deja.", six.text_type(fn))) - msgBox.addButton(tr("&Ecraser"),0) - msgBox.addButton(tr("&Abandonner"),1) - abort=msgBox.exec_() - if abort == 1 : return (0, "") - return (1,fn) - - #-----------------# - def saveRunMAP(self): - #-----------------# - extension=".input" - if not(self.jdc.isValid()): - QMessageBox.critical( self, tr( "Sauvegarde de l'input impossible "), - tr("Un JdC valide est necessaire pour creer un .input") - ) - return - try : - composant=self.jdc.etapes[0].nom.lower()[0:-5] - except : - QMessageBox.critical( self, tr( "Sauvegarde de l'input impossible "), - tr("Choix du composant obligatoire") - ) - return - if hasattr(self.maConfiguration, "savedir"): path=self.maConfiguration.savedir - else : path='C:/' - - monNomFichier="" - if self.fichier is not None and self.fichier != "" : - maBase=str(QFileInfo(self.fichier).baseName())+".input" - monPath=str(QFileInfo(self.fichier).absolutePath()) - monNomFichier=os.path.join(monPath,maBase) - elif hasattr(self,'monNomFichierInput'): - monNomFichier=self.monNomFichierInput - - - monDialog=QFileDialog(self.appliEficas) - monDialog.setDirectory (path) - monDialog.setWindowTitle ("Save") - - for c in monDialog.children(): - if isinstance(c,QDialogButtonBox): - for b in c.children(): - if isinstance(b,QPushButton): - avant=b.text() - if avant=="&Open": b.setText("Save") - mesFiltres= "input Map (*.input);;All Files (*)" - monDialog.setNameFilters(mesFiltres) - if monNomFichier!="" : monDialog.selectFile(monNomFichier) - BOk=monDialog.exec_() - if BOk==0: return - fn=str(monDialog.selectedFiles()[0]) - if fn == "" or fn == None : return - if not fn.endswith(".input"): - fn += ".input" - self.monNomFichierInput=fn - - if not hasattr(self, 'fichierMapInput') or not self.fichierMapInput or not os.path.exists(self.fichierMapInput): - self.fichierMapInput = self.__generateTempFilename(prefix = "map_run", suffix = ".map") - texte=self.getTextJDC("MAP") - self.writeFile( self.fichierMapInput, txt = texte) - - cmd = ("map gen -t dat -n " + composant + " -i " + self.fichierMapInput + " -o " + fn) - p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) - (output, err) = p.communicate() - - - #-----------------# - def saveRunPSEN(self): - #-----------------# - #print ("saveRunPSEN") - self.saveFile() - - - - #-----------------------------------------# - def handleAjoutGroup(self,listeGroup): - #-----------------------------------------# - try : - #if 1: - from ajoutGroupe import handleAjoutGroupFiltre - #print listeGroup - handleAjoutGroupFiltre(self,listeGroup) - #print "apres handleAjoutGroupFiltre" - except : - #else : - pass - - - #-----------------------------------------------------------------# - def saveCompleteFile(self, path = None, saveas= 0,formatLigne="beautifie"): - #-----------------------------------------------------------------# - extension='.casR' - fn = self.fichierComplet - #saveas=True # Pour forcer le nom - self.generator=self.maConfiguration.mesGenerators.plugins[self.format]() - if self.fichierComplet is None or saveas: - if path is None: path=self.maConfiguration.savedir - bOK, fn=self.determineNomFichier(path,extension) - if bOK == 0 : return (0, None) - if fn == None : return (0, None) - if fn== '' : return (0, None) - - ulfile = os.path.abspath(six.text_type(fn)) - self.appliEficas.maConfiguration.savedir=os.path.split(ulfile)[0] - fn = six.text_type(QDir.toNativeSeparators(fn)) - - self.fichierComplet = os.path.splitext(fn)[0]+extension - - if hasattr(self.generator, "writeComplet"): - self.generator.writeComplet(self.fichierComplet,self.jdc,config=self.appliEficas.maConfiguration,appli=self.appliEficas) - - if self.salome : self.appliEficas.addJdcInSalome( self.fichierComplet) - - self.modified = 0 - nouveauTitre=self.titre+" "+str(os.path.basename(self.fichierComplet)) - self.appliEficas.setWindowTitle(nouveauTitre) - return (1, self.fichierComplet) - - #-----------------------------------------------------------------# - def saveFile(self, path = None, saveas= 0,formatLigne="beautifie"): - #-----------------------------------------------------------------# - """ - Public slot to save the text to a file. - - @param path directory to save the file in (string or QString) - @return tuple of two values (boolean, string) giving a success indicator and - the name of the saved file - """ - - self.modified=1 - if not self.modified and not saveas: - return (0, None) # do nothing if text wasn't changed - - if self.appli.code in DictExtensions : - extension=DictExtensions[self.appli.code] - else : - extension='.comm' - - newName = None - fn = self.fichier - if self.fichier is None or saveas: - if path is None: path=self.maConfiguration.savedir - bOK, fn=self.determineNomFichier(path,extension) - if bOK == 0 : return (0, None) - if fn == None : return (0, None) - if fn== '' : return (0, None) - - ulfile = os.path.abspath(six.text_type(fn)) - self.appliEficas.maConfiguration.savedir=os.path.split(ulfile)[0] - fn = six.text_type(QDir.toNativeSeparators(fn)) - newName = fn - - - if not (self.writeFile(fn,formatLigne=formatLigne)): return (0, None) - self.fichier = fn - self.modified = False - if self.fileInfo is None or saveas: - self.fileInfo = QFileInfo(self.fichier) - self.fileInfo.setCaching(0) - self.lastModified = self.fileInfo.lastModified() - if newName is not None: - self.appliEficas.addToRecentList(newName) - self.tree.racine.item.getObject().nom=os.path.basename(newName) - self.tree.racine.updateNodeLabel() - - self.jdc.toXml() - - if self.jdc.isValid() != 0 and hasattr(self.generator, "writeDefault"): - #if hasattr(self.generator, "writeDefault"): - self.generator.writeDefault(fn) - elif self.code=="TELEMAC" and hasattr(self.generator, "writeDefault"): - msgBox = QMessageBox(None) - msgBox.setWindowTitle(tr("Fichier .cas invalide / incomplet")) - msgBox.setText(tr("Le fichier .cas est invalide / incomplet")) - msgBox.addButton(tr("&Sauvegarder"),1) - msgBox.addButton(tr("&Quitter sans sauvegarder"),0) - msgBox.addButton(tr("&Annuler"),2) - res=msgBox.exec_() - if res == 0 : - self.generator.writeDefault(fn) - return (1, self.fichier) - if res == 2 : return (0, None) - if self.appliEficas.salome : self.appliEficas.close() - else : sys.exit(1) - - if self.salome : - self.appliEficas.addJdcInSalome( self.fichier) - self.modified = 0 - nouveauTitre=self.titre+" "+str(os.path.basename(self.fichier)) - self.appliEficas.setWindowTitle(nouveauTitre) - - return (1, self.fichier) -# - - #----------------------------------------------# - def sauveLigneFile(self): - #----------------------------------------------# - self.modified=1 - return self.saveFile(formatLigne="Ligne") - - - #----------------------------------------------# - def saveFileAs(self, path = None,fileName=None): - #----------------------------------------------# - """ - Public slot to save a file with a new name. - - @param path directory to save the file in (string or QString) - @return tuple of two values (boolean, string) giving a success indicator and - the name of the saved file - """ - if fileName != None : - self.fichier = fileName - return self.saveFile() - return self.saveFile(path,1,"beautifie") - - - - #---------------------------------------------# - def getFile(self,unite=None,fic_origine = ''): - #---------------------------------------------# - # appele par I_JDC - ulfile = None - jdcText = "" - - titre = "" - - if unite : - titre = tr("Choix unite %d ", unite) - texte = tr("Le fichier %s contient une commande INCLUDE \n", str(fic_origine)) +"\n" - texte = texte+ tr("Donnez le nom du fichier correspondant a l unite logique ") + repr(unite) - labeltexte = tr('Fichier pour unite ') + repr( unite) - else: - titre = tr("Choix d'un fichier de poursuite") - texte = tr("Le fichier %s contient une commande POURSUITE\n", fic_origine) - texte = texte+tr('Donnez le nom du fichier dont vous \n voulez faire une poursuite') - - QMessageBox.information( self, titre,texte) - fn = QFileDialog.getOpenFileName(self.appliEficas, - titre, - self.appliEficas.maConfiguration.savedir) - - # ce retour est impose par le getFile d'I_JDC - if fn== '' : return None," " - if not fn : return (0, " ") - fn=fn[0] - - ulfile = os.path.abspath(six.text_type(fn)) - self.appliEficas.maConfiguration.savedir=os.path.split(ulfile)[0] - - # On utilise le convertisseur defini par format_fichier - source=self.getSource(ulfile) - if source: - # On a reussia convertir le fichier self.ulfile - jdcText = source - else: - # Une erreur a ete rencontree - jdcText = '' - return ulfile, jdcText - - #-----------------------------------# - def updateJdc(self, etape,texte): - #------------------------------------# - # ajoute une etape de JdC a partir d un texte - CONTEXT.setCurrentStep(etape) - etape.buildIncludeEtape(texte) - self.tree.racine.buildChildren() - - #-----------------------------------# - def updateJdcEtape(self, itemApres,texte): - #------------------------------------# - # ajoute une etape de JdC a partir d un texte - monItem=itemApres - etape=monItem.item.object - - CONTEXT.setCurrentStep(etape) - try : - ok=etape.buildIncludeEtape(texte) - except : - ok=0 - if not ok : - QMessageBox.information( self, - tr("Import texte"), - tr("Impossible d importer le texte")) - self.tree.racine.buildChildren() - return ok - - #-------------------------------------------# - def updateJdcAfterEtape(self, etape,texte): - #--------------------------------------------# - # ajoute une etape de JdC a partir d un texte - CONTEXT.setCurrentStep(etape) - try : - ok=etape.buildIncludeEtape(texte,doitEtreValide=0) - except : - ok=0 - if not ok : - QMessageBox.information( self, - tr("Import texte"), - tr("Impossible d importer le texte")) - self.tree.racine.buildChildren() - return ok - - - #-------------------------------------# - def deleteEtape(self,etape): - #-------------------------------------# - # dans le JDC - self.jdc.suppEntite(etape) - - #-------------------------------------# - def deleteMC(self,etape,MCFils,listeAvant=()): - #-------------------------------------# - # dans le JDC - ouChercher=etape - for mot in listeAvant : - ouChercher=ouChercher.getChild(mot,restreint="oui") - monMC=ouChercher.getChild(MCFils,restreint="oui") - if monMC != None : ouChercher.suppEntite(monMC) - ouChercher.state='changed' - ouChercher.isValid() - - #-------------------------------------# - def ajoutMC(self,etape,MCFils,valeurs,listeAvant=()): - #-------------------------------------# - # dans le JDC - ouChercher=etape - for mot in listeAvant : - ouChercher=ouChercher.getChild(mot,restreint="oui") - monMC=etape.getChild(ouChercher,restreint="oui") - if monMC== None : monMC= ouChercher.addEntite(MCFils) - monMC.valeur=valeurs - monMC.val=valeurs - monMC.state='changed' - monMC.isValid() - - #----------------------------------------------# - def ajoutMCFact(self,etape,MCFils,listeAvant=()): - #----------------------------------------------# - # dans le JDC - print ('ajoutMCFact') - ouChercher=etape - print (ouChercher) - for mot in listeAvant : - ouChercher=ouChercher.getChild(mot,restreint="oui") - print (mot) - print (ouChercher) - monMC=etape.getChild(ouChercher,restreint="oui") - if monMC== None : monMC= ouChercher.addEntite(MCFils) - monMC.isValid() - - - #----------------------------------------- - def initSplitterSizes(self, nbWidget=3): - #----------------------------------------- - #print ("je passe ds initSplitterSizes", nbWidget) - - if self.code in [ 'Adao', 'ADAO','MAP' ] : self.splitterSizes3=[1,1550,150] - #elif self.code in [ 'MAP'] : self.splitterSizes3=[700,300] - else : self.splitterSizes3=[150,1000,300] - - if self.code in [ 'Adao', 'ADAO','MAP' ] : self.splitterSizes2=[5,1500] - else : self.splitterSizes2=[300,1000] - - - #----------------------------------------- - def restoreSplitterSizes(self,nbWidget=3): - #---------------------------------------- - - #traceback.print_stack() - #print ("je passe ds restoreSplitterSizes") - if not(hasattr(self,'splitter')) : return - if nbWidget==2 : newSizes=self.splitterSizes2 - if nbWidget==3 : newSizes=self.splitterSizes3 - #self.inhibeSplitter = 1 - self.splitter.setSizes(newSizes) - #self.inhibeSplitter = 0 - QApplication.processEvents() - # seule la fentetre du milieu est necessaire - self.splitter.widget(1).resizeEvent=self.saveSplitterSizes - - #----------------------------------------- - def saveSplitterSizes(self,event): - #----------------------------------------- - #print ("je passe ds saveSplitterSizes") - if self.inhibeSplitter : return - if self.widgetOptionnel == None : self.splitterSizes2 = self.splitter.sizes()[0:2] - else : self.splitterSizes3 = self.splitter.sizes()[0:3] - - #------------------------ - def fermeOptionnel(self): - #------------------------ - if self.widgetOptionnel == None : return - - self.inhibeSplitter=1 - self.widgetOptionnel.setParent(None) - self.widgetOptionnel.close() - self.widgetOptionnel.deleteLater() - self.widgetOptionnel=None - self.inhibeSplitter=0 - self.restoreSplitterSizes(2) - - #------------------------ - def ajoutOptionnel(self): - #------------------------ - #if len(self.splitterSizes) == 2 : self.splitterSizes.append(self.oldSizeWidgetOptionnel) - #else : self.splitterSizes[2] = self.oldSizeWidgetOptionnel # ceinture pour les close bizarres - #self.splitterSizes[1] = self.splitterSizes[1] - self.splitterSizes[2] - - self.restoreSplitterSizes(3) - - - #------------------------ - def fermeArbre(self): - #------------------------ - #print (self.widgetTree) - self.oldWidgetTree=self.widgetTree - self.widgetTree.hide() - #self.widgetTree=None - - #------------------------ - def ouvreArbre(self): - #------------------------ - #print ('je passe la') - #print (self.widgetTree) - #self.widgetTree=self.oldWidgetTree - self.widgetTree.show() - #self.restoreSplitterSizes(3) - - #----------------------- - def getEtapeCourante(self) : - #----------------------- - print (self.tree.selectedItems()) - if len(self.tree.selectedItems()) != 1 : return None - etape=self.tree.selectedItems()[0].item.object.getEtape() - return etape - #----------------------------- - def getTreeIndex(self,noeud): - #---------------------------- - indexNoeud=-1 - if noeud in noeud.treeParent.children : - indexNoeud=noeud.treeParent.children.index(noeud) - else : - if hasattr(noeud,'vraiParent') : - noeudVrai = noeud - noeudVraiParent = noeud.vraiParent - while noeudVraiParent != noeud.treeParent and hasattr(noeudVraiParent,'vraiParent') : - noeudVrai = noeudVraiParent - noeudVraiParent = noeudVraiParent.vraiParent - pass - if noeudVraiParent == noeud.treeParent : - indexNoeud=noeud.treeParent.children.index(noeudVrai) - pass - pass - pass - return indexNoeud - - #-------------------# - def runMeteo(self): - #-------------------# - - if not(self.jdc.isValid()): - QMessageBox.critical( self, tr( "Execution impossible "),tr("le JDC doit etre valide pour une execution Meteo")) - return - strSource = str( self.getTextJDC(self.format) ) - code = compile(strSource, strSource, 'exec') - exec(code, globals(), {}) - - - - #-------------------# Pour execution avec output et error dans le bash - def runPSEN(self): - #-------------------# - - #if self.modified or self.fichier==None : self.saveFile() - self.saveFile() - - #lancement avec le .bat - path1 = os.path.abspath(os.path.join(os.path.abspath(__file__), '../','../','PSEN_Eficas','PSEN')) - WrapperFilePath = os.path.join(path1, 'PSSEWrapper.py') - import subprocess - p = subprocess.Popen(['python',WrapperFilePath]) - (out,err)=p.communicate() - print (out) - print (err) - - #-------------------# Pour execution avec output et error dans le bash - def runPSEN_N1(self): - #-------------------# - - - self.saveFile() - path1 = os.path.abspath(os.path.join(os.path.abspath(__file__), '../','../','ProcessOutputs_Eficas','TreatOutputs')) - sys.path.append(path1) - - if not(self.jdc.isValid()): - QMessageBox.information( self, tr( "Unvalid JDC"),tr("incorrect keywords will be ignored")) - if 'dicoImbrique' in generator.plugins: - self.generator=generator.plugins['dicoImbrique']() - jdc_formate=self.generator.gener(self.jdc) - dico=self.generator.Dico - - ###to delete - #fileDico = r'C:\Logiciels DER\PSEN_V16\Code\ProcessOutputs_Eficas\TreatOutputs\dicoN1.py' - fileDico = os.path.join(path1, 'dicoN1.py') #r'C:\Logiciels DER\PSEN_V16\Code\ProcessOutputs_Eficas\TreatOutputs\dicoN1.py' - f = open( str(fileDico), 'w') - f.write("Dico =" + str(dico) ) - f.close() - ### - - - print ('in runPSEN_N1', dico) - print (dico) - from Run import run - run(dico) - #res,txt_exception=run(dico) - #if res : QMessageBox.information( self, tr("fin de script run"), txt_exception) - #else : QMessageBox.critical( self, tr("Erreur fatale script run"), txt_exception) - - #-------------------# Pour execution avec output et error dans le bash - def process_N1(self): - #-------------------# - - path1 = os.path.abspath(os.path.join(os.path.abspath(__file__), '../','../','ProcessOutputs_Eficas','TreatOutputs')) - sys.path.append(path1) - - - if 'dicoImbrique' in generator.plugins: - self.generator=generator.plugins['dicoImbrique']() - jdc_formate=self.generator.gener(self.jdc) - dico=self.getDico() #generator.Dico - - - for k in dico['CONTINGENCY_PROCESSING']: - #print (k) - if k[0:19] == 'Component_List_For_' or k[0:21] =='Contingency_List_For_' : - newK=k.replace('__',' ') - l="'"+str(newK)+"'" - dico['CONTINGENCY_PROCESSING'][l]=dico['CONTINGENCY_PROCESSING'][k] - del dico['CONTINGENCY_PROCESSING'][k] - - ###to delete - fileDico = os.path.join(path1, 'dicoN1_process.py') - f = open( str(fileDico), 'w') - f.write("Dico =" + str(dico) ) - f.close() - ### - return dico - - #return self.getDico() - - #-------------------# Pour execution avec output et error dans le bash - def process_VP(self): - #-------------------# - if 'dicoImbrique' in generator.plugins: - self.generator=generator.plugins['dicoImbrique']() - jdc_formate=self.generator.gener(self.jdc) - dico=self.getDico() #generator.Dico - return dico - - -if __name__ == "__main__": - print ('in main') diff --git a/InterfaceQT4/editorSsIhm.py b/InterfaceQT4/editorSsIhm.py index d6f8b9d4..af334d7f 100755 --- a/InterfaceQT4/editorSsIhm.py +++ b/InterfaceQT4/editorSsIhm.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/eficas_go.py b/InterfaceQT4/eficas_go.py index 763af011..1f7828ce 100755 --- a/InterfaceQT4/eficas_go.py +++ b/InterfaceQT4/eficas_go.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -192,7 +192,7 @@ def lanceEficas_ssIhm(code=None,fichier=None,ssCode=None,version=None,debug=Fals print ('deprecated') from Editeur import session options=session.parse(sys.argv) - if version!=None and options.version == None : options.version=version + if version!=None and options.version == None : options.version=version if fichier == None : fichier=options.comm[0] if code == None : code=options.code diff --git a/InterfaceQT4/feuille.py b/InterfaceQT4/feuille.py index 41dc13fa..aa6f6e09 100644 --- a/InterfaceQT4/feuille.py +++ b/InterfaceQT4/feuille.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/gereIcones.py b/InterfaceQT4/gereIcones.py index 26ba38f4..d8a18c5b 100644 --- a/InterfaceQT4/gereIcones.py +++ b/InterfaceQT4/gereIcones.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/gereListe.py b/InterfaceQT4/gereListe.py index 95add18b..3e96a736 100644 --- a/InterfaceQT4/gereListe.py +++ b/InterfaceQT4/gereListe.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -22,7 +22,6 @@ from __future__ import absolute_import try : from builtins import str - from builtins import range from builtins import object except : pass @@ -30,7 +29,7 @@ import types,os import traceback -from PyQt5.QtWidgets import QLineEdit, QLabel, QFileDialog +from PyQt5.QtWidgets import QLineEdit, QLabel, QFileDialog, QMessageBox from PyQt5.QtCore import QEvent, Qt, QTimer from PyQt5.QtGui import QIcon, QPalette @@ -101,6 +100,7 @@ class LECustom(QLineEdit): def getValeur(self): #return self.text() + self.litValeur() return self.valeur def setValeur(self,valeur): diff --git a/InterfaceQT4/gereListeAvril11.py b/InterfaceQT4/gereListeAvril11.py index 44e191e9..e86b2dde 100644 --- a/InterfaceQT4/gereListeAvril11.py +++ b/InterfaceQT4/gereListeAvril11.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/gereRegles.py b/InterfaceQT4/gereRegles.py index e84486b9..fb5f802b 100644 --- a/InterfaceQT4/gereRegles.py +++ b/InterfaceQT4/gereRegles.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/gereTraduction.py b/InterfaceQT4/gereTraduction.py index 9bca1b37..0e9673d4 100644 --- a/InterfaceQT4/gereTraduction.py +++ b/InterfaceQT4/gereTraduction.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/getVersion.py b/InterfaceQT4/getVersion.py index cc7765ec..83322cfb 100644 --- a/InterfaceQT4/getVersion.py +++ b/InterfaceQT4/getVersion.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/groupe.py b/InterfaceQT4/groupe.py index e7d20873..0fe113f9 100644 --- a/InterfaceQT4/groupe.py +++ b/InterfaceQT4/groupe.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monBoutonValide.py b/InterfaceQT4/monBoutonValide.py index 78864707..724df9b4 100644 --- a/InterfaceQT4/monBoutonValide.py +++ b/InterfaceQT4/monBoutonValide.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monChoixCata.py b/InterfaceQT4/monChoixCata.py index 8ecd647d..a66db090 100644 --- a/InterfaceQT4/monChoixCata.py +++ b/InterfaceQT4/monChoixCata.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monChoixCode.py b/InterfaceQT4/monChoixCode.py index a5a2ddcc..89b58ed5 100644 --- a/InterfaceQT4/monChoixCode.py +++ b/InterfaceQT4/monChoixCode.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monChoixCommande.py b/InterfaceQT4/monChoixCommande.py index 990fc1c0..bd0d8dbb 100644 --- a/InterfaceQT4/monChoixCommande.py +++ b/InterfaceQT4/monChoixCommande.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monChoixLangue.py b/InterfaceQT4/monChoixLangue.py index decc00be..59c497e7 100644 --- a/InterfaceQT4/monChoixLangue.py +++ b/InterfaceQT4/monChoixLangue.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monFonctionPanel.py b/InterfaceQT4/monFonctionPanel.py index 93dd4102..3bf95fe4 100644 --- a/InterfaceQT4/monFonctionPanel.py +++ b/InterfaceQT4/monFonctionPanel.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monGroupeOptionnel.py b/InterfaceQT4/monGroupeOptionnel.py index 7b17edba..cd64f1e5 100644 --- a/InterfaceQT4/monGroupeOptionnel.py +++ b/InterfaceQT4/monGroupeOptionnel.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monLabelClic.py b/InterfaceQT4/monLabelClic.py index af472949..90f30c9e 100644 --- a/InterfaceQT4/monLabelClic.py +++ b/InterfaceQT4/monLabelClic.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monLayoutBouton.py b/InterfaceQT4/monLayoutBouton.py index 49a431a4..1a9471bd 100644 --- a/InterfaceQT4/monLayoutBouton.py +++ b/InterfaceQT4/monLayoutBouton.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monRecherche.py b/InterfaceQT4/monRecherche.py index 16fdfaf3..dd73054d 100644 --- a/InterfaceQT4/monRecherche.py +++ b/InterfaceQT4/monRecherche.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monRechercheCatalogue.py b/InterfaceQT4/monRechercheCatalogue.py index 589964a3..b8b57cdd 100644 --- a/InterfaceQT4/monRechercheCatalogue.py +++ b/InterfaceQT4/monRechercheCatalogue.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monSelectVal.py b/InterfaceQT4/monSelectVal.py index 415f5948..0683c679 100644 --- a/InterfaceQT4/monSelectVal.py +++ b/InterfaceQT4/monSelectVal.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monViewRegles.py b/InterfaceQT4/monViewRegles.py index c096c8f5..a144a682 100644 --- a/InterfaceQT4/monViewRegles.py +++ b/InterfaceQT4/monViewRegles.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monViewTexte.py b/InterfaceQT4/monViewTexte.py index c57813ab..3a82aff1 100644 --- a/InterfaceQT4/monViewTexte.py +++ b/InterfaceQT4/monViewTexte.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monVisu.py b/InterfaceQT4/monVisu.py index 68257209..12c90690 100644 --- a/InterfaceQT4/monVisu.py +++ b/InterfaceQT4/monVisu.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidget4a6RadioButton.py b/InterfaceQT4/monWidget4a6RadioButton.py index 3025049b..175dc9a0 100644 --- a/InterfaceQT4/monWidget4a6RadioButton.py +++ b/InterfaceQT4/monWidget4a6RadioButton.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidget4a6RadioButtonSD.py b/InterfaceQT4/monWidget4a6RadioButtonSD.py index 86f198ed..8f75e5d9 100644 --- a/InterfaceQT4/monWidget4a6RadioButtonSD.py +++ b/InterfaceQT4/monWidget4a6RadioButtonSD.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetBloc.py b/InterfaceQT4/monWidgetBloc.py index 1f656d4f..eeef908b 100644 --- a/InterfaceQT4/monWidgetBloc.py +++ b/InterfaceQT4/monWidgetBloc.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetCB.py b/InterfaceQT4/monWidgetCB.py index 3e12bb6b..5c7bc817 100644 --- a/InterfaceQT4/monWidgetCB.py +++ b/InterfaceQT4/monWidgetCB.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2020 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetCBIntoSug.py b/InterfaceQT4/monWidgetCBIntoSug.py index 8075451d..f924e962 100644 --- a/InterfaceQT4/monWidgetCBIntoSug.py +++ b/InterfaceQT4/monWidgetCBIntoSug.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2020 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetCBSD.py b/InterfaceQT4/monWidgetCBSD.py index 929e7426..d914d1bf 100644 --- a/InterfaceQT4/monWidgetCBSD.py +++ b/InterfaceQT4/monWidgetCBSD.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetCommande.py b/InterfaceQT4/monWidgetCommande.py index 54ab0e55..08381df4 100644 --- a/InterfaceQT4/monWidgetCommande.py +++ b/InterfaceQT4/monWidgetCommande.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetCommandeDeplie1Niveau.py b/InterfaceQT4/monWidgetCommandeDeplie1Niveau.py index c03a17c1..ee7b1b2b 100644 --- a/InterfaceQT4/monWidgetCommandeDeplie1Niveau.py +++ b/InterfaceQT4/monWidgetCommandeDeplie1Niveau.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetCommentaire.py b/InterfaceQT4/monWidgetCommentaire.py index 8ff4e317..dd71cc7b 100644 --- a/InterfaceQT4/monWidgetCommentaire.py +++ b/InterfaceQT4/monWidgetCommentaire.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetCreeParam.py b/InterfaceQT4/monWidgetCreeParam.py index d53025c1..28834ebc 100644 --- a/InterfaceQT4/monWidgetCreeParam.py +++ b/InterfaceQT4/monWidgetCreeParam.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetCreeUserAssd.py b/InterfaceQT4/monWidgetCreeUserAssd.py index ba6cd4b9..7ce1b64f 100644 --- a/InterfaceQT4/monWidgetCreeUserAssd.py +++ b/InterfaceQT4/monWidgetCreeUserAssd.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2020 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetDate.py b/InterfaceQT4/monWidgetDate.py index dd5964dd..f6d723f4 100644 --- a/InterfaceQT4/monWidgetDate.py +++ b/InterfaceQT4/monWidgetDate.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetFact.py b/InterfaceQT4/monWidgetFact.py index c6758b39..37add2fe 100644 --- a/InterfaceQT4/monWidgetFact.py +++ b/InterfaceQT4/monWidgetFact.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetFactPlie.py b/InterfaceQT4/monWidgetFactPlie.py index e479f312..2e39daf8 100644 --- a/InterfaceQT4/monWidgetFactPlie.py +++ b/InterfaceQT4/monWidgetFactPlie.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetFormule.py b/InterfaceQT4/monWidgetFormule.py index f1add2f1..b7aba8bd 100644 --- a/InterfaceQT4/monWidgetFormule.py +++ b/InterfaceQT4/monWidgetFormule.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetHeure.py b/InterfaceQT4/monWidgetHeure.py index 8587fb12..d3e1444c 100644 --- a/InterfaceQT4/monWidgetHeure.py +++ b/InterfaceQT4/monWidgetHeure.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetInactif.py b/InterfaceQT4/monWidgetInactif.py index db3657af..f3608e96 100644 --- a/InterfaceQT4/monWidgetInactif.py +++ b/InterfaceQT4/monWidgetInactif.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetInfo.py b/InterfaceQT4/monWidgetInfo.py index 0bfc2dd5..e05d2d03 100644 --- a/InterfaceQT4/monWidgetInfo.py +++ b/InterfaceQT4/monWidgetInfo.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetIntoSug.py b/InterfaceQT4/monWidgetIntoSug.py index 42c72358..bf451cd5 100644 --- a/InterfaceQT4/monWidgetIntoSug.py +++ b/InterfaceQT4/monWidgetIntoSug.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetMatrice.py b/InterfaceQT4/monWidgetMatrice.py index 843da9aa..248c6e14 100644 --- a/InterfaceQT4/monWidgetMatrice.py +++ b/InterfaceQT4/monWidgetMatrice.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetNiveauFact.py b/InterfaceQT4/monWidgetNiveauFact.py index b3a7f27f..2cfb072b 100644 --- a/InterfaceQT4/monWidgetNiveauFact.py +++ b/InterfaceQT4/monWidgetNiveauFact.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetOptionnel.py b/InterfaceQT4/monWidgetOptionnel.py index c698206a..7282da41 100644 --- a/InterfaceQT4/monWidgetOptionnel.py +++ b/InterfaceQT4/monWidgetOptionnel.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetParam.py b/InterfaceQT4/monWidgetParam.py index cb799fe5..71c3bed9 100644 --- a/InterfaceQT4/monWidgetParam.py +++ b/InterfaceQT4/monWidgetParam.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetPlusieursASSDIntoOrdonne.py b/InterfaceQT4/monWidgetPlusieursASSDIntoOrdonne.py index 172a5cf6..8b2c462f 100644 --- a/InterfaceQT4/monWidgetPlusieursASSDIntoOrdonne.py +++ b/InterfaceQT4/monWidgetPlusieursASSDIntoOrdonne.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -21,7 +21,6 @@ from __future__ import absolute_import try : from builtins import str - from builtins import range except : pass import types,os,sys @@ -31,6 +30,7 @@ from Extensions.i18n import tr from .monWidgetPlusieursIntoOrdonne import MonWidgetPlusieursIntoOrdonne from .politiquesValidation import PolitiquePlusieurs +from six.moves import range from PyQt5.QtWidgets import QScrollBar @@ -52,14 +52,10 @@ class MonWidgetPlusieursASSDIntoOrdonne (MonWidgetPlusieursIntoOrdonne): if len(self.listeAAfficher) == 0 : self.ajoutLE(0) return + - if len(self.listeAAfficher)*30 > 400 : self.setMinimumHeight(400) - else : - if self.monSimpDef.min > len(self.listeAAfficher) : self.setMinimumHeight(self.monSimpDef.min*30+30) - if self.monSimpDef.max > len(self.listeAAfficher) : self.setMinimumHeight(180) - else : self.setMinimumHeight(len(self.listeAAfficher)*30+30) - self.adjustSize() - + if len(self.listeAAfficher)*20 > 400 : self.setMinimumHeight(400) + else : self.setMinimumHeight(len(self.listeAAfficher)*30) self.politique=PolitiquePlusieurs(self.node,self.editor) for i in range(1,len(self.listeAAfficher)+1): self.ajoutLE(i) for i in range(len(self.listeAAfficher)): diff --git a/InterfaceQT4/monWidgetPlusieursBase.py b/InterfaceQT4/monWidgetPlusieursBase.py index 3fd6d90c..35c0bf48 100644 --- a/InterfaceQT4/monWidgetPlusieursBase.py +++ b/InterfaceQT4/monWidgetPlusieursBase.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -21,12 +21,12 @@ from __future__ import absolute_import try : from builtins import str - from builtins import range from builtins import object except : pass import types,os,sys +from six.moves import range from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QApplication, QMessageBox, QScrollArea from PyQt5.QtCore import QTimer, QSize, Qt @@ -42,101 +42,98 @@ from InterfaceQT4.gereListe import GereListe from InterfaceQT4.gereListe import GerePlie from InterfaceQT4.gereListe import LECustom -dicoLongueur = {2:90,3:100,4:123,5:145,6:160,float('inf'):200} -hauteurMaxFenetre = 200 -nbMinimumDeQLineEdit=7 +dicoLongueur={2:95,3:125,4:154,5:183,6:210,float('inf'):210} +hauteurMax=253 class MonWidgetPlusieursBase (Ui_WidgetPlusieursBase,Feuille,GereListe,GerePlie): def __init__(self,node,monSimpDef,nom,objSimp,parentQt,commande): - #print ('MonWidgetPlusieursBase', nom) - self.inFocusOutEvent = False - self.changeUnLineEdit = False - self.nomLine = "lineEditVal" - self.inInit = True # pour l affichage quand on cree le lineEdit - self.indexDernierLabel = 0 - self.numLineEditEnCours = 0 - self.changeUnLineEdit = None - self.listeAffichageWidget = [] - self.dictLE = {} - self.politique = PolitiquePlusieurs(node,parentQt) + #print "MonWidgetPlusieursBase", nom + self.inFocusOutEvent=False + self.nomLine="lineEditVal" + self.inInit=True + self.indexDernierLabel=0 + self.numLineEditEnCours=0 + self.listeAffichageWidget=[] Feuille.__init__(self,node,monSimpDef,nom,objSimp,parentQt,commande) GereListe.__init__(self) self.gereIconePlier() self.BSelectFichier.clicked.connect(self.selectInFile) if sys.platform[0:5]!="linux": - repIcon = self.node.editor.appliEficas.repIcon - fichierUp = os.path.join(repIcon, 'arrow_up.png') - iconUp = QIcon(fichierUp) - self.RBHaut.setIcon(iconUp) + repIcon=self.node.editor.appliEficas.repIcon + fichier=os.path.join(repIcon, 'arrow_up.png') + icon = QIcon(fichier) + self.RBHaut.setIcon(icon) self.RBHaut.setIconSize(QSize(32, 32)) - fichierDown = os.path.join(repIcon, 'arrow_down.png') - iconDown = QIcon(fichierDown) - self.RBBas.setIcon(iconArrowDown) - fichierExp = os.path.join(repIcon, 'file-explorer.png') - iconExp = QIcon(fichierExp) - self.BSelectFichier.setIcon(iconExp) + fichier2=os.path.join(repIcon, 'arrow_down.png') + icon2 = QIcon(fichier2) + self.RBBas.setIcon(icon2) + fichier3=os.path.join(repIcon, 'file-explorer.png') + icon3 = QIcon(fichier2) + self.BSelectFichier.setIcon(icon3) self.BSelectFichier.setIconSize(QSize(32, 32)) + icon=QIcon(self.repIcon+"/MoinsBleu.png") + self.RBMoins.setIcon(icon) + icon=QIcon(self.repIcon+"/PlusBleu.png") + self.RBPlus.setIcon(icon) + icon=QIcon(self.repIcon+"/verre-loupe-icone-6087-64.png") + self.RBVoisListe.setIcon(icon) - iconMoins = QIcon (self.repIcon+"/MoinsBleu.png") - self.RBMoins.setIcon(iconMoins) - iconPlus = QIcon(self.repIcon+"/PlusBleu.png") - self.RBPlus.setIcon(iconPlus) - iconLoupe =QIcon(self.repIcon+"/verre-loupe-icone-6087-64.png") - self.RBVoisListe.setIcon(iconLoupe) - - - self.vScrollBar = self.scrollArea.verticalScrollBar() - - if self.monSimpDef.max < 7 : - hauteurMax = dicoLongueur[self.monSimpDef.max] - self.RBVoisListe.close() - self.RBMoins.close() - self.RBPlus.close() - aConstruire = self.monSimpDef.max - else : - hauteurMax = hauteurMaxFenetre - aConstruire = nbMinimumDeQLineEdit - self.setMinimumHeight(hauteurMax) - for i in range(1,aConstruire): self.ajoutLineEdit() + self.listeValeursCourantes=self.node.item.getListeValeurs() + if self.monSimpDef.max != "**" and self.monSimpDef.max < 7: + hauteurMax=dicoLongueur[self.monSimpDef.max] + else : + hauteurMax=220 + # if self.monSimpDef.max == self.monSimpDef.min : self.setMaximumHeight(hauteur) + self.resize(self.width(),hauteurMax) + self.setMinimumHeight(hauteurMax) + self.finCommentaireListe() self.parentQt.commandesLayout.insertWidget(-1,self) - self.maCommande.listeAffichageWidget.append(self.lineEditVal1) - self.AAfficher = self.lineEditVal1 - self.inInit = False + self.AAfficher=self.lineEditVal1 + self.inInit=False # PNPN a completer __ si tuple le type des tuples sinon le tuple - self.finCommentaireListe() self.monCommentaireLabel.setText(self.finCommentaireListe()) self.scrollArea.leaveEvent = self.leaveEventScrollArea - def setValeurs(self): - # uniquement appele a l initialisation. - # les lineEdit ont deja ete crees + self.vScrollBar = self.scrollArea.verticalScrollBar() + self.politique=PolitiquePlusieurs(self.node,self.editor) + # construction du min de valeur a entrer + if self.monSimpDef.max == "**" : aConstruire=7 + elif self.monSimpDef.max == float('inf'): aConstruire=7 + else : aConstruire=self.monSimpDef.max + + for i in range(1,aConstruire): + self.ajoutLineEdit() + QApplication.processEvents() + self.scrollArea.ensureWidgetVisible(self.lineEditVal1) self.listeValeursCourantes=self.node.item.getListeValeurs() index=1 for valeur in self.listeValeursCourantes : - val = self.politique.getValeurTexte(valeur) - nomLineEdit = "lineEditVal"+str(index) + val=self.politique.getValeurTexte(valeur) + nomLineEdit="lineEditVal"+str(index) if hasattr(self,nomLineEdit) : - courant = getattr(self,nomLineEdit) + courant=getattr(self,nomLineEdit) if 'R' in self.objSimp.definition.type and str(val) != repr(val) : courant.setText(repr(val)) - else : courant.setText(str(val)) + else : courant.setText(str(val)) else : self.ajoutLineEdit(val) index=index+1 + # ajout d'une ligne vide ou affichage commentaire if self.indexDernierLabel < self.monSimpDef.max : self.ajoutLineEdit() + else : self.scrollArea.setToolTip('nb max de valeurs atteint') + #self.adjustSize() + #self.vScrollBar.triggerAction(QScrollBar.SliderToMinimum) def ajoutLineEdit(self,valeur=None,): - #print ('ajoutLineEdit, monWidgetPlusieursBase', self.indexDernierLabel) self.indexDernierLabel=self.indexDernierLabel+1 nomLineEdit="lineEditVal"+str(self.indexDernierLabel) if hasattr(self,nomLineEdit) : - #print ('ajoutLineEdit, monWidgetPlusieursBase', self.indexDernierLabel) self.indexDernierLabel=self.indexDernierLabel-1 return nouveauLE = LECustom(self.scrollArea,self,self.indexDernierLabel) @@ -145,21 +142,15 @@ class MonWidgetPlusieursBase (Ui_WidgetPlusieursBase,Feuille,GereListe,GerePlie) if self.indexDernierLabel % 2 == 1 : nouveauLE.setStyleSheet("background:rgb(210,210,210)") else : nouveauLE.setStyleSheet("background:rgb(235,235,235)") nouveauLE.setFrame(False) - # fait dans le init pour pouvoir passer le numero du LE mai 20 - #nouveauLE.returnPressed.connect(self.changeValeur) + nouveauLE.returnPressed.connect(self.changeValeur) setattr(self,nomLineEdit,nouveauLE) self.listeAffichageWidget.append(nouveauLE) self.etablitOrdre() - if valeur != None : - nouveauLE.setText(str(valeur)) - self.dictLE[self.indexDernierLabel] = valeur - else : - self.dictLE[self.indexDernierLabel] = None + if valeur != None : nouveauLE.setText(str(valeur)) # deux lignes pour que le ensureVisible fonctionne self.estVisible=nouveauLE if self.inInit==False :QTimer.singleShot(1, self.rendVisibleLigne) - #print ('ajoutLineEdit, monWidgetPlusieursBase', self.indexDernierLabel) def etablitOrdre(self): i=0 @@ -170,7 +161,6 @@ class MonWidgetPlusieursBase (Ui_WidgetPlusieursBase,Feuille,GereListe,GerePlie) # si on boucle on perd l'ordre - def rendVisibleLigne(self): QApplication.processEvents() self.estVisible.setFocus() @@ -181,8 +171,6 @@ class MonWidgetPlusieursBase (Ui_WidgetPlusieursBase,Feuille,GereListe,GerePlie) return self.finCommentaireListe() def ajout1Valeur(self,valeur=None): - #import traceback - #traceback.print_stack() if valeur == None : return liste,validite=SaisieValeur.TraiteLEValeur(self,str(valeur)) if validite == 0 : return @@ -208,26 +196,30 @@ class MonWidgetPlusieursBase (Ui_WidgetPlusieursBase,Feuille,GereListe,GerePlie) def ajoutNValeur(self,liste): #---------------------------- # attention quand on charge par un fichier, on ne peut pas se contenter d ajouter N fois 1 valeur - # car alors le temps de verification devient prohibitif reconstructution et verification a + # car alors le temps de verification devient prohibitif reconstructu=ion et verification a # chaque valeur. d ou l ajout de ajoutNTuple a politique plusieurs listeFormatee=list(liste) min,max=self.node.item.getMinMax() - if self.objSimp.valeur == None : listeComplete = listeFormatee - else : listeComplete = self.objSimp.valeur + listeFormatee + if self.objSimp.valeur == None : listeComplete=listeFormatee + else : listeComplete =self.objSimp.valeur + listeFormatee if len(listeComplete) > max : texte=tr("Nombre maximum de valeurs ")+str(max)+tr(" atteint") self.editor.afficheInfos(texte,Qt.red) return - validite,comm,comm2 = self.politique.ajoutNTuple(listeComplete) + validite,comm,comm2,listeRetour= self.politique.ajoutNTuple(listeComplete) if not validite : - self.editor.afficheInfos(comm2,Qt.red) + self.editor.affiche_infos(texte,Qt.red) return + # on calcule le dernier lineedit rempli avant de changer la valeur + if self.objSimp.valeur != None : indexDernierRempli=len(self.objSimp.valeur) + else : indexDernierRempli=0 + self.politique.recordValeur(listeComplete) indexDernierRempli=0 @@ -242,22 +234,35 @@ class MonWidgetPlusieursBase (Ui_WidgetPlusieursBase,Feuille,GereListe,GerePlie) indexDernierRempli = indexDernierRempli + 1 - def changeValeur(self,changeDePlace=True,oblige=False,numero=None): - #print ('monWidgetPlusieursBase changeValeur') - self.changeUnLineEdit = False + def changeValeur(self,changeDePlace=True,oblige=False): donneFocus=None derniereValeur=None self.listeValeursCourantes = [] fin=self.indexDernierLabel + for i in range (1, fin): + nomLineEdit="lineEditVal"+str(i) + courant=getattr(self,nomLineEdit) + valeur=courant.text() + lval=valeur.split(',') + if len (lval) > 1 : + msgBox=QMessageBox() + msgBox.setText("separator ',' ") + msgBox.setInformativeText("Do you want to enter " + str (lval) + "?") + msgBox.setStandardButtons( QMessageBox.Ok | QMessageBox.Cancel) + msgBox.setDefaultButton(QMessageBox.Ok) + ret = msgBox.exec_() + if ret != 1024 : + courant.setText("") + return + courant.setText(lval[0]) + self.ajoutNValeur(lval[1:]) + self.listeValeursCourantes = [] for i in range (1, self.indexDernierLabel+1): nomLineEdit="lineEditVal"+str(i) courant=getattr(self,nomLineEdit) valeur=courant.text() if valeur != None and valeur != "" : - # c est ce qui est long mais permet d avoir - # une bonne connaissance des erreurs - # et de traiter le changede place commentaire=self.ajout1Valeur(valeur) if (commentaire != None ): self.editor.afficheInfos(commentaire,Qt.red) @@ -284,19 +289,14 @@ class MonWidgetPlusieursBase (Ui_WidgetPlusieursBase,Feuille,GereListe,GerePlie) self.editor.afficheInfos(tr('nb min de valeurs : ')+str( self.monSimpDef.min)) if len(self.listeValeursCourantes) < min and oblige==True: return if len(self.listeValeursCourantes) > max : return - self.node.item.setValeur(self.listeValeursCourantes) - #print (self.listeValeursCourantes) + retour=self.node.item.setValeur(self.listeValeursCourantes) if len(self.listeValeursCourantes) == self.monSimpDef.max : self.editor.afficheInfos(tr('nb max de valeurs atteint')) self.setValide() self.reaffiche() - def leaveEventScrollArea(self,event): - #print ('monWidgetPlusBase leaveEventScrollArea', self.changeUnLineEdit) - if self.changeUnLineEdit : self.changeValeur(changeDePlace=False) - QScrollArea.leaveEvent(self.scrollArea,event) - - - + self.changeValeur(changeDePlace=False) + QScrollArea.leaveEvent(self.scrollArea,event) +# Avertissement quand on quitte le widget diff --git a/InterfaceQT4/monWidgetPlusieursInto.py b/InterfaceQT4/monWidgetPlusieursInto.py index f54ec53d..8040c914 100644 --- a/InterfaceQT4/monWidgetPlusieursInto.py +++ b/InterfaceQT4/monWidgetPlusieursInto.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -175,7 +175,7 @@ class MonWidgetPlusieursInto (Ui_WidgetPlusieursInto,Feuille,GerePlie,GereListe) self.listeCB.append(nouveauCB) nouveauCB.setText("") if index % 2 == 1 : nouveauCB.setStyleSheet("background:rgb(210,210,210)") - else : nouveauCB.setStyleSheet("background:rgb(240,240,240)") + else : nouveauCB.setStyleSheet("background:rgb(240,240,240)") self.vScrollBar.triggerAction(QScrollBar.SliderToMaximum) nouveauCB.setFocus() setattr(self,nomCB,nouveauCB) @@ -200,7 +200,8 @@ class MonWidgetPlusieursInto (Ui_WidgetPlusieursInto,Feuille,GerePlie,GereListe) - def changeValeur(self,changeDePlace=False,oblige=True, numero=None): + def changeValeur(self): + #def changeValeur(self,changeDePlace=False,oblige=True, numero=None): #print ('changeValeur') if self.inhibe == True: return if hasattr(self,'LEFiltre') :self.noircirResultatFiltre() diff --git a/InterfaceQT4/monWidgetPlusieursIntoOrdonne.py b/InterfaceQT4/monWidgetPlusieursIntoOrdonne.py index 06bc5753..0d3186a6 100644 --- a/InterfaceQT4/monWidgetPlusieursIntoOrdonne.py +++ b/InterfaceQT4/monWidgetPlusieursIntoOrdonne.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -64,6 +64,7 @@ class MonWidgetPlusieursIntoOrdonne (Ui_WidgetPlusieursIntoOrdonne, Feuille,Gere self.prepareListeResultat() if len(self.listeAAfficher) < 20 : self.frameRecherche2.close() if len(self.listeAAfficher) < 20 : self.frameRecherche.close() + self.adjustSize() if sys.platform[0:5]!="linux": repIcon=self.node.editor.appliEficas.repIcon fichier=os.path.join(repIcon, 'arrow_up.png') @@ -107,12 +108,8 @@ class MonWidgetPlusieursIntoOrdonne (Ui_WidgetPlusieursIntoOrdonne, Feuille,Gere self.ajoutLE(0) return self.filtreListe() - if len(self.listeAAfficher)*30 > 400 : self.setMinimumHeight(400) - else : - if self.monSimpDef.min > len(self.listeAAfficher) : self.setMinimumHeight(self.monSimpDef.min*30+30) - if self.monSimpDef.max > len(self.listeAAfficher) : self.setMinimumHeight(180) - else : self.setMinimumHeight(len(self.listeAAfficher)*30+30) - self.adjustSize() + if len(self.listeAAfficher)*20 > 400 : self.setMinimumHeight(400) + else : self.setMinimumHeight(len(self.listeAAfficher)*30) self.politique=PolitiquePlusieurs(self.node,self.editor) for i in range(1,len(self.listeAAfficher)+1): self.ajoutLE(i) @@ -259,7 +256,8 @@ class MonWidgetPlusieursIntoOrdonne (Ui_WidgetPlusieursIntoOrdonne, Feuille,Gere self.changeValeur() self.setValeurs(first=False) - def changeValeur(self,changeDePlace=False,oblige=False, numero=None): + def changeValeur(self,changeDePlace=False,oblige=False): +#def changeValeur(self,changeDePlace=False,oblige=False, numero=None): #PN les 2 arg sont pour que la signature de ma fonction soit identique a monWidgetPlusieursBase listeVal=[] for i in range(1,self.indexDernierLabel+1): diff --git a/InterfaceQT4/monWidgetPlusieursPlie.py b/InterfaceQT4/monWidgetPlusieursPlie.py index 389e5111..382d812c 100644 --- a/InterfaceQT4/monWidgetPlusieursPlie.py +++ b/InterfaceQT4/monWidgetPlusieursPlie.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetPlusieursTuple.py b/InterfaceQT4/monWidgetPlusieursTuple.py index c1c2d0ed..7a84e501 100644 --- a/InterfaceQT4/monWidgetPlusieursTuple.py +++ b/InterfaceQT4/monWidgetPlusieursTuple.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetPlusieursTuple2.py b/InterfaceQT4/monWidgetPlusieursTuple2.py index 564e388d..3c48b18a 100644 --- a/InterfaceQT4/monWidgetPlusieursTuple2.py +++ b/InterfaceQT4/monWidgetPlusieursTuple2.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetPlusieursTuple3.py b/InterfaceQT4/monWidgetPlusieursTuple3.py index 9b4b29c5..5c39773c 100644 --- a/InterfaceQT4/monWidgetPlusieursTuple3.py +++ b/InterfaceQT4/monWidgetPlusieursTuple3.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetPlusieursTupleAvril11.py b/InterfaceQT4/monWidgetPlusieursTupleAvril11.py index df8ceb2c..83980518 100644 --- a/InterfaceQT4/monWidgetPlusieursTupleAvril11.py +++ b/InterfaceQT4/monWidgetPlusieursTupleAvril11.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetPlusieursTupleN.py b/InterfaceQT4/monWidgetPlusieursTupleN.py index 7b0dbb43..42551488 100644 --- a/InterfaceQT4/monWidgetPlusieursTupleN.py +++ b/InterfaceQT4/monWidgetPlusieursTupleN.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetRadioButton.py b/InterfaceQT4/monWidgetRadioButton.py index 569e56be..c2cef59e 100644 --- a/InterfaceQT4/monWidgetRadioButton.py +++ b/InterfaceQT4/monWidgetRadioButton.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetSDCOInto.py b/InterfaceQT4/monWidgetSDCOInto.py index e5c6de93..691d2713 100644 --- a/InterfaceQT4/monWidgetSDCOInto.py +++ b/InterfaceQT4/monWidgetSDCOInto.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetSimpBase.py b/InterfaceQT4/monWidgetSimpBase.py index d1252feb..d916017e 100644 --- a/InterfaceQT4/monWidgetSimpBase.py +++ b/InterfaceQT4/monWidgetSimpBase.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetSimpBool.py b/InterfaceQT4/monWidgetSimpBool.py index 53a60983..8bf811ad 100644 --- a/InterfaceQT4/monWidgetSimpBool.py +++ b/InterfaceQT4/monWidgetSimpBool.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetSimpComplexe.py b/InterfaceQT4/monWidgetSimpComplexe.py index 5239a2d6..157cf161 100644 --- a/InterfaceQT4/monWidgetSimpComplexe.py +++ b/InterfaceQT4/monWidgetSimpComplexe.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetSimpFichier.py b/InterfaceQT4/monWidgetSimpFichier.py index 80970e1c..943e1221 100644 --- a/InterfaceQT4/monWidgetSimpFichier.py +++ b/InterfaceQT4/monWidgetSimpFichier.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetSimpSalome.py b/InterfaceQT4/monWidgetSimpSalome.py index af575fd9..cca59c0e 100644 --- a/InterfaceQT4/monWidgetSimpSalome.py +++ b/InterfaceQT4/monWidgetSimpSalome.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetSimpTuple.py b/InterfaceQT4/monWidgetSimpTuple.py index 792df7d9..7f43db8c 100644 --- a/InterfaceQT4/monWidgetSimpTuple.py +++ b/InterfaceQT4/monWidgetSimpTuple.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetSimpTuple2.py b/InterfaceQT4/monWidgetSimpTuple2.py index 0d74bcaf..e9cae253 100644 --- a/InterfaceQT4/monWidgetSimpTuple2.py +++ b/InterfaceQT4/monWidgetSimpTuple2.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetSimpTuple3.py b/InterfaceQT4/monWidgetSimpTuple3.py index e805c2b0..e7fcf977 100644 --- a/InterfaceQT4/monWidgetSimpTuple3.py +++ b/InterfaceQT4/monWidgetSimpTuple3.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetSimpTupleN.py b/InterfaceQT4/monWidgetSimpTupleN.py index 10eb8092..57341057 100644 --- a/InterfaceQT4/monWidgetSimpTupleN.py +++ b/InterfaceQT4/monWidgetSimpTupleN.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetSimpTxt.py b/InterfaceQT4/monWidgetSimpTxt.py index ca0cb7fe..d377322f 100644 --- a/InterfaceQT4/monWidgetSimpTxt.py +++ b/InterfaceQT4/monWidgetSimpTxt.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetTableau.py b/InterfaceQT4/monWidgetTableau.py index 5a0bc061..317bf64f 100644 --- a/InterfaceQT4/monWidgetTableau.py +++ b/InterfaceQT4/monWidgetTableau.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetUniqueSDCO.py b/InterfaceQT4/monWidgetUniqueSDCO.py index 3d733331..95d6f75e 100644 --- a/InterfaceQT4/monWidgetUniqueSDCO.py +++ b/InterfaceQT4/monWidgetUniqueSDCO.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/monWidgetVide.py b/InterfaceQT4/monWidgetVide.py index 1fb2e720..0225473d 100644 --- a/InterfaceQT4/monWidgetVide.py +++ b/InterfaceQT4/monWidgetVide.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/politiquesValidation.py b/InterfaceQT4/politiquesValidation.py index 83c2dab7..78628531 100644 --- a/InterfaceQT4/politiquesValidation.py +++ b/InterfaceQT4/politiquesValidation.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index 779a9bb5..477b11b4 100755 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -1,5 +1,6 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +#!/usr/bin/env python +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,32 +19,1005 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -import logging -import os -logger=logging.getLogger() - -def initialise(flog=None): - if flog == None : - #MonHome=os.environ['HOME'] - MonHome=os.path.expanduser("~") - MaDir=MonHome+"/Eficas_install" - try : - os.mkdir(MaDir) - except : +from __future__ import absolute_import +from __future__ import print_function +try : + from builtins import str +except : pass + +import os, sys + + +from PyQt5.QtWidgets import QApplication, QMainWindow, QGridLayout, QBoxLayout, QMenu, QAction, QMessageBox +from PyQt5.QtGui import QIcon +from PyQt5.QtCore import Qt, QSize + + +from Editeur import session +from myMain import Ui_Eficas +from InterfaceQT4.viewManager import MyViewManager +from InterfaceQT4.qtEficasSsIhm import AppliSsIhm + +from Extensions.i18n import tr +from Extensions.eficas_exception import EficasException +from Extensions import param2 + + +class Appli(AppliSsIhm,Ui_Eficas,QMainWindow): + """ + Class implementing the main user interface. + """ + def __init__(self,code=None,salome=1,parent=None, multi=False,langue='fr',ssIhm=False, labelCode=None): + """ + Constructor + """ + if ssIhm == True : + print ('mauvaise utilisation de la classe Appli. Utiliser AppliSsIm SVP') + exit() + + AppliSsIhm.__init__(self,code,salome,parent,multi=multi,langue=langue,ssIhm=True, labelCode=labelCode) + QMainWindow.__init__(self,parent) + Ui_Eficas.__init__(self) + + self.ssIhm=False + self.multi=multi + self.demande=multi # voir PSEN + + + if self.multi == False : + self.definitCode(code,None) + if code==None: return + else : + self.definitCode(code,None) + if code==None: return + print ('il faut trouver le chemin du code') + return + + self.suiteTelemac=False + if hasattr (self, 'maConfiguration') : + if self.maConfiguration.demandeLangue : + from InterfaceQT4.monChoixLangue import MonChoixLangue + widgetLangue = MonChoixLangue(self) + ret=widgetLangue.exec_() + self.suiteTelemac=self.maConfiguration.suiteTelemac + + + if not self.salome and hasattr (self, 'maConfiguration') and hasattr(self.maConfiguration,'lang') : self.langue=self.maConfiguration.lang + from Extensions import localisation + app=QApplication + if hasattr (self, 'maConfiguration') : localisation.localise(None,self.langue,translatorFichier=self.maConfiguration.translatorFichier) + self.setupUi(self) + + #if parent != None : self.parentCentralWidget = parent.centralWidget() + #else : self.parentCentralWidget = None + + if not self.salome : + if hasattr (self, 'maConfiguration') and hasattr(self.maConfiguration,'taille') : self.taille=self.maConfiguration.taille + else : self.taille=1700 + + self.resize(self.taille,self.height()) + + + icon = QIcon(self.repIcon+"/parametres.png") + self.actionParametres.setIcon(icon) + if hasattr (self, 'maConfiguration') and self.maConfiguration.boutonDsMenuBar : + self.frameEntete.setMaximumSize(QSize(16777215,100)) + self.frameEntete.setMinimumSize(QSize(0,100)) + if hasattr (self, 'maConfiguration') and self.maConfiguration.enleverActionStructures : + self.enleverActionsStructures() + if hasattr (self, 'maConfiguration') and self.maConfiguration.enleverParametres : + self.enleverParametres() + if hasattr (self, 'maConfiguration') and self.maConfiguration.enleverSupprimer : + self.enleverSupprimer() + + + self.myQtab.removeTab(0) + self.blEnteteGlob = QBoxLayout(2,self.frameEntete) + self.blEnteteGlob.setSpacing(0) + self.blEnteteGlob.setContentsMargins(0,0,0,0) + + self.blEntete = QBoxLayout(0) + self.blEntete.insertWidget(0,self.toolBar) + self.blEntete.insertWidget(0,self.menubar) + self.blEnteteGlob.insertLayout(0,self.blEntete) + + + + if hasattr (self, 'maConfiguration') and self.maConfiguration.boutonDsMenuBar : + self.blEnteteCommmande = QBoxLayout(0) + self.blEnteteCommmande.insertWidget(0,self.toolBarCommande) + self.toolBarCommande.setIconSize(QSize(96,96)) + self.blEnteteGlob.insertLayout(-1,self.blEnteteCommmande) + else : + self.toolBarCommande.close() + + + if hasattr (self, 'maConfiguration') and self.maConfiguration.closeEntete==True and self.salome: self.closeEntete() + + eficas_root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + self.viewmanager = MyViewManager(self) + self.recentMenu=QMenu(tr('&Recents')) + #self.menuFichier.insertMenu(self.actionOuvrir,self.recentMenu) + + # actionARemplacer ne sert que pour l insert Menu + self.menuFichier.insertMenu(self.actionARemplacer ,self.recentMenu) + self.menuFichier.removeAction(self.actionARemplacer) + self.connecterSignaux() + self.toolBar.addSeparator() + + + if self.code != None : self.construitMenu() + + self.setWindowTitle(self.VERSION_EFICAS) + try : + #if 1 : + #print ('attention try devient if 1') + self.ouvreFichiers() + except EficasException as exc: + #except: + print ("je suis dans le except") + if self.salome == 0 : exit() + + #self.adjustSize() + + def closeEntete(self): + self.menuBar().close() + self.toolBar.close() + self.frameEntete.close() + + def definitCode(self,code,ssCode) : + self.code=code + self.ssCode=ssCode + if self.code==None : + self.cleanPath() + from InterfaceQT4.monChoixCode import MonChoixCode + widgetChoix = MonChoixCode(self) + ret=widgetChoix.exec_() + #widgetChoix.show() + if self.code == None:return # pour le cancel de la fenetre choix code + AppliSsIhm.definitCode(self,self.code,ssCode) + + #PN --> pb d exception qui font planter salome + # plus supporte en python 3 + #app=QApplication + #if hasattr(prefsCode,'encoding'): + # import sys + # reload(sys) + # sys.setdefaultencoding(prefsCode.encoding) + + def construitMenu(self): + self.initPatrons() + self.initRecents() + self.initAides() + for intituleMenu in ("menuTraduction","menuOptions","menuMesh","menuExecution","menuN1"): + if hasattr(self,intituleMenu): + menu=getattr(self,intituleMenu) + menu.setAttribute(Qt.WA_DeleteOnClose) + menu.close() + delattr(self,intituleMenu) + for intituleAction in ("actionExecution","actionSaveRun"): + if hasattr(self,intituleAction): + action=getattr(self,intituleAction) + self.toolBar.removeAction(action) + if self.code.upper() in Appli.__dict__: + Appli.__dict__[self.code.upper()](self,) + if self.suiteTelemac : self.lookSuiteTelemac() + self.metMenuAJourUtilisateurs() + if hasattr (self, 'maConfiguration') and self.maConfiguration.ajoutExecution : + self.ajoutExecution() + + def initAides(self): + #print "je passe la" + repAide=os.path.dirname(os.path.abspath(__file__)) + fileName='index.html' + self.docPath=repAide+"/../Aide" + if hasattr(self,'maConfiguration') and hasattr(self.maConfiguration,'docPath') : self.docPath=self.maConfiguration.docPath + if hasattr(self,'maConfiguration') and hasattr(self.maConfiguration,'fileName'):fileName=self.maConfiguration.fileName + self.fileDoc=os.path.join(self.docPath,fileName) + self.actionCode.setText(tr("Aide specifique ")+str(self.code)) + if not os.path.isfile(self.fileDoc) : + self.fileDoc="" + self.docPath="" + self.actionCode.setEnabled(False) + return + + self.actionCode.setEnabled(True) + self.menuAide.addAction(self.actionCode) + + def newN1(self): + ssCode=None + code="PSEN_N1" + self.cleanPath() + dirCode=os.path.abspath(os.path.join(os.path.abspath(__file__),'../..',"ProcessOutputs_Eficas")) + sys.path.insert(0,dirCode) + self.code=code + self.definitCode(code,ssCode) + self.initRecents() + self.multi=True + self.demande=False + self.fileNew() + + def newPSEN(self): + ssCode=None + code="PSEN" + self.cleanPath() + dirCode=os.path.abspath(os.path.join(os.path.abspath(__file__),'../..',code)) + sys.path.insert(0,dirCode) + self.code=code + self.definitCode(code,ssCode) + self.multi=True + self.demande=False + self.fileNew() + + def ajoutN1(self): + return + self.menuN1 = self.menubar.addMenu(tr("Process Output")) + self.actionN1 = QAction(self) + self.actionN1.setText(tr("Process Output")) + self.menuN1.addAction(self.actionN1) + self.actionN1.triggered.connect(self.newN1) + + + if hasattr(self,'actionOpenProcess'):return + + self.actionOpenProcess = QAction(self) + self.actionOpenProcess.setText(tr("Open Process_Output File")) + self.menuN1.addAction(self.actionOpenProcess) + self.actionOpenProcess.triggered.connect(self.openProcess) + + def ajoutExecution(self): + self.menuExecution = self.menubar.addMenu(tr("&Run")) + self.actionExecution = QAction(self) + if sys.platform[0:5]=="linux": + icon6 = QIcon(self.repIcon+"/roue.png") + self.actionExecution.setIcon(icon6) + else : + self.actionExecution.setText(tr("Run")) + self.actionExecution.setObjectName("actionExecution") + self.menuExecution.addAction(self.actionExecution) + if not(self.actionExecution in self.toolBar.actions()): + self.toolBar.addAction(self.actionExecution) + self.actionExecution.setText(tr("Run")) + self.actionExecution.triggered.connect(self.run) + + def ajoutSauveExecution(self): + self.actionSaveRun = QAction(self) + icon7 = QIcon(self.repIcon+"/export_MAP.png") + self.actionSaveRun.setIcon(icon7) + self.actionSaveRun.setObjectName("actionSaveRun") + self.menuExecution.addAction(self.actionSaveRun) + if not(self.actionSaveRun in self.toolBar.actions()): + self.toolBar.addAction(self.actionSaveRun) + self.actionSaveRun.setText(tr("Save Run")) + self.actionSaveRun.triggered.connect(self.saveRun) + + def griserActionsStructures(self): + self.actionCouper.setEnabled(False) + self.actionColler.setEnabled(False) + self.actionCopier.setEnabled(False) + self.actionSupprimer.setEnabled(False) + + def enleverActionsStructures(self): + self.toolBar.removeAction(self.actionCopier) + self.toolBar.removeAction(self.actionColler) + self.toolBar.removeAction(self.actionCouper) + self.menuEdition.removeAction(self.actionCouper) + self.menuEdition.removeAction(self.actionCopier) + self.menuEdition.removeAction(self.actionColler) + + + def enleverParametres(self): + self.toolBar.removeAction(self.actionParametres) + self.menuJdC.removeAction(self.actionParametres) + + def enleverSupprimer(self): + self.toolBar.removeAction(self.actionSupprimer) + + def enlevernewInclude(self): + self.actionNouvel_Include.setVisible(False) + + def enleverRechercherDsCatalogue(self): + self.actionRechercherDsCatalogue.setVisible(False) + + def connectRechercherDsCatalogue(self): + if hasattr(self,'rechercherDejaLa') : return + self.rechercherDejaLa=True + self.actionRechercherDsCatalogue.triggered.connect(self.handleRechercherDsCatalogue) + + def ajoutSortieComplete(self): + if hasattr(self,'actionSortieComplete') : return + self.actionSortieComplete = QAction(self) + self.actionSortieComplete.setText(tr("Sortie Complete")) + self.menuFichier.insertAction(self.actionEnregistrer_sous,self.actionSortieComplete) + self.actionSortieComplete.triggered.connect(self.handleSortieComplete) + + + def MT(self): + self.enlevernewInclude() + self.toolBar.addSeparator() + + + def ZCRACKS(self): + self.enlevernewInclude() + self.toolBar.addSeparator() + self.ajoutExecution() + + self.menuOptions = self.menubar.addMenu("menuOptions") + self.menuOptions.addAction(self.actionParametres_Eficas) + self.menuOptions.setTitle(tr("Options")) + + def ADAO(self): + self.enleverActionsStructures() + self.enlevernewInclude() + + def ASTER(self) : + self.menuTraduction = self.menubar.addMenu("menuTraduction") + self.menuTraduction.addAction(self.actionTraduitV11V12) + self.menuTraduction.addAction(self.actionTraduitV10V11) + self.menuTraduction.addAction(self.actionTraduitV9V10) + self.menuTraduction.setTitle(tr("Traduction")) + + self.menuFichier.addAction(self.actionSauveLigne) + + self.menuOptions = self.menubar.addMenu("menuOptions") + self.menuOptions.addAction(self.actionParametres_Eficas) + self.menuOptions.addAction(self.actionLecteur_Pdf) + self.menuOptions.setTitle(tr("Options")) + + def CARMEL3D(self): + #if self.salome == 0 : return + self.enlevernewInclude() + self.menuMesh = self.menubar.addMenu(tr("Gestion Maillage")) + self.menuMesh.setObjectName("Mesh") + self.menuMesh.addAction(self.actionChercheGrpMaille) + #self.griserActionsStructures() + + def CARMELCND(self): + self.enlevernewInclude() + self.enleverRechercherDsCatalogue() + self.ajoutExecution() + self.ajoutSauveExecution() + self.griserActionsStructures() + + def MAP(self): + self.enlevernewInclude() + self.toolBar.addSeparator() + self.ajoutExecution() + self.ajoutSauveExecution() + self.menuOptions = self.menubar.addMenu("menuOptions") + self.menuOptions.addAction(self.actionParametres_Eficas) + self.menuOptions.setTitle(tr("Options")) + + def MAPIDENTIFICATION(self): + self.enlevernewInclude() + self.enleverSupprimer() + #self.ajoutExecution() + self.enleverRechercherDsCatalogue() + self.enleverActionsStructures() + self.enleverParametres() + + def PSEN(self): + try : self.action_Nouveau.triggered.disconnect(self.fileNew) + except : pass + try : self.action_Nouveau.triggered.disconnect(self.newPSEN) + except : pass + + self.action_Nouveau.triggered.connect(self.newPSEN) + self.enleverActionsStructures() + self.enleverParametres() + self.enleverRechercherDsCatalogue() + self.enlevernewInclude() + self.ajoutExecution() + self.ajoutN1() + self.ajoutHelpPSEN() + self.ajoutIcones() + + def PSEN_N1(self): + self.enleverActionsStructures() + self.enleverParametres() + self.enleverRechercherDsCatalogue() + self.enlevernewInclude() + self.ajoutExecution() + self.ajoutIcones() + + def TELEMAC(self): + self.enleverActionsStructures() + self.enlevernewInclude() + self.connectRechercherDsCatalogue() + self.ajoutSortieComplete() + + def lookSuiteTelemac(self): + self.enleverActionsStructures() + self.enlevernewInclude() + self.enleverParametres() + self.enleverSupprimer() + self.enleverRechercherDsCatalogue() + + def ajoutHelpPSEN(self): + self.actionParametres_Eficas.setText('Help PSEN') + self.actionParametres_Eficas.triggered.connect(self.aidePSEN) + + + + def ChercheGrpMesh(self): + Msg,listeGroup=self.ChercheGrpMeshInSalome() + if Msg == None : + self.viewmanager.handleAjoutGroup(listeGroup) + else : + print ("il faut gerer les erreurs") + + def ChercheGrpMaille(self): + # Normalement la variable self.salome permet de savoir si on est ou non dans Salome + try: + Msg,listeGroup=self.ChercheGrpMailleInSalome() # recherche dans Salome + #Msg = None; listeGroup = None # recherche manuelle, i.e., sans Salome si ligne precedente commentee + except: + raise ValueError('Salome non ouvert') + if Msg == None : + self.viewmanager.handleAjoutGroup(listeGroup) + else : + print ("il faut gerer les erreurs") + + + def ChercheGrp(self): + #Msg,listeGroup=self.ChercheGrpMailleInSalome() + #if Msg == None : + # self.viewmanager.handleAjoutGroup(listeGroup) + #else : + #print "il faut gerer " + pass + + + def ajoutIcones(self) : + # Pour pallier les soucis de repertoire d icone + #print self.repIcon + icon = QIcon(self.repIcon+"/new_file.png") + self.action_Nouveau.setIcon(icon) + icon1 = QIcon(self.repIcon+"/ouvrir.png") + self.actionOuvrir.setIcon(icon1) + icon2 = QIcon(self.repIcon+"/save.png") + self.actionEnregistrer.setIcon(icon2) + icon6 = QIcon(self.repIcon+"/delete.png") + self.actionSupprimer.setIcon(icon6) + icon7 = QIcon(self.repIcon+"/roue.png") + self.actionExecution.setIcon(icon7) + + + + + def connecterSignauxQT4(self) : + self.connect(self.recentMenu,SIGNAL('aboutToShow()'),self.handleShowRecentMenu) + + self.connect(self.action_Nouveau,SIGNAL("triggered()"),self.fileNew) + self.connect(self.actionNouvel_Include,SIGNAL("triggered()"),self.newInclude) + self.connect(self.actionOuvrir,SIGNAL("triggered()"),self.fileOpen) + self.connect(self.actionEnregistrer,SIGNAL("triggered()"),self.fileSave) + self.connect(self.actionEnregistrer_sous,SIGNAL("triggered()"),self.fileSaveAs) + self.connect(self.actionFermer,SIGNAL("triggered()"),self.fileClose) + self.connect(self.actionFermer_tout,SIGNAL("triggered()"),self.fileCloseAll) + self.connect(self.actionQuitter,SIGNAL("triggered()"),self.fileExit) + + self.connect(self.actionEficas,SIGNAL("triggered()"),self.aidePPal) + self.connect(self.actionVersion,SIGNAL("triggered()"),self.version) + self.connect(self.actionParametres,SIGNAL("triggered()"),self.gestionParam) + + self.connect(self.actionCouper,SIGNAL("triggered()"),self.editCut) + self.connect(self.actionCopier,SIGNAL("triggered()"),self.editCopy) + self.connect(self.actionColler,SIGNAL("triggered()"),self.editPaste) + self.connect(self.actionSupprimer,SIGNAL("triggered()"),self.supprimer) + self.connect(self.actionRechercher,SIGNAL("triggered()"),self.rechercher) + self.connect(self.actionDeplier_replier,SIGNAL("triggered()"),self.handleDeplier) + + self.connect(self.actionRapport_de_Validation,SIGNAL("triggered()"),self.jdcRapport) + self.connect(self.actionRegles_du_JdC,SIGNAL("triggered()"),self.jdcRegles) + self.connect(self.actionFichier_Source,SIGNAL("triggered()"),self.jdcFichierSource) + self.connect(self.actionFichier_Resultat,SIGNAL("triggered()"),self.visuJdcPy) + + + + + # Pour Aster + self.actionTraduitV9V10 = QAction(self) + self.actionTraduitV9V10.setObjectName("actionTraduitV9V10") + self.actionTraduitV9V10.setText(tr("TraduitV9V10")) + self.actionTraduitV10V11 = QAction(self) + self.actionTraduitV10V11.setObjectName("actionTraduitV10V11") + self.actionTraduitV10V11.setText(tr("TraduitV10V11")) + self.actionTraduitV11V12 = QAction(self) + self.actionTraduitV11V12.setObjectName("actionTraduitV11V12") + self.actionTraduitV11V12.setText(tr("TraduitV11V12")) + self.actionSauveLigne = QAction(self) + self.actionSauveLigne.setText(tr("Sauve Format Ligne")) + + #self.connect(self.actionParametres_Eficas,SIGNAL("triggered()"),self.optionEditeur) + self.connect(self.actionLecteur_Pdf,SIGNAL("triggered()"),self.optionPdf) + self.connect(self.actionTraduitV9V10,SIGNAL("triggered()"),self.traductionV9V10) + self.connect(self.actionTraduitV10V11,SIGNAL("triggered()"),self.traductionV10V11) + self.connect(self.actionTraduitV11V12,SIGNAL("triggered()"),self.traductionV11V12) + self.connect(self.actionSauveLigne,SIGNAL("triggered()"),self.sauveLigne) + + + # Pour Carmel + self.actionChercheGrpMaille = QAction(self) + self.actionChercheGrpMaille.setText(tr("Acquiert groupe mailles")) + self.connect(self.actionChercheGrpMaille,SIGNAL("triggered()"),self.ChercheGrpMaille) + + # Pour CarmelCND + self.actionChercheGrp = QAction(self) + self.actionChercheGrp.setText(tr("Acquisition Groupe Maille")) + self.connect(self.actionChercheGrp,SIGNAL("triggered()"),self.ChercheGrp) + + # Pour Aide + self.actionCode = QAction(self) + self.actionCode.setText(tr("Specificites Maille")) + self.connect(self.actionCode,SIGNAL("triggered()"),self.aideCode) + + def connecterSignaux(self) : + + self.recentMenu.aboutToShow.connect(self.handleShowRecentMenu) + self.action_Nouveau.triggered.connect(self.fileNew) + self.actionNouvel_Include.triggered.connect(self.newInclude) + self.actionOuvrir.triggered.connect(self.fileOpen) + self.actionEnregistrer.triggered.connect(self.fileSave) + self.actionEnregistrer_sous.triggered.connect(self.fileSaveAs) + self.actionFermer.triggered.connect(self.fileClose) + self.actionFermer_tout.triggered.connect(self.fileCloseAll) + self.actionQuitter.triggered.connect(self.fileExit) + + self.actionEficas.triggered.connect(self.aidePPal) + self.actionVersion.triggered.connect(self.version) + self.actionParametres.triggered.connect(self.gestionParam) + self.actionCommentaire.triggered.connect(self.ajoutCommentaire) + + self.actionCouper.triggered.connect(self.editCut) + self.actionCopier.triggered.connect(self.editCopy) + self.actionColler.triggered.connect(self.editPaste) + self.actionSupprimer.triggered.connect(self.supprimer) + self.actionRechercher.triggered.connect(self.rechercher) + self.actionDeplier_replier.triggered.connect(self.handleDeplier) + + self.actionRapport_de_Validation.triggered.connect(self.jdcRapport) + self.actionRegles_du_JdC.triggered.connect(self.jdcRegles) + self.actionFichier_Source.triggered.connect(self.jdcFichierSource) + self.actionFichier_Resultat.triggered.connect(self.visuJdcPy) + self.actionAfficher_l_Arbre.triggered.connect(self.ouvreArbre) + self.actionCacher_l_Arbre.triggered.connect(self.fermeArbre) + + + # Pour Aster + self.actionTraduitV9V10 = QAction(self) + self.actionTraduitV9V10.setObjectName("actionTraduitV9V10") + self.actionTraduitV9V10.setText(tr("TraduitV9V10")) + self.actionTraduitV10V11 = QAction(self) + self.actionTraduitV10V11.setObjectName("actionTraduitV10V11") + self.actionTraduitV10V11.setText(tr("TraduitV10V11")) + self.actionTraduitV11V12 = QAction(self) + self.actionTraduitV11V12.setObjectName("actionTraduitV11V12") + self.actionTraduitV11V12.setText(tr("TraduitV11V12")) + self.actionSauveLigne = QAction(self) + self.actionSauveLigne.setText(tr("Sauve Format Ligne")) + + #self.actionParametres_Eficas.triggered.connect(self.optionEditeur) + self.actionTraduitV9V10.triggered.connect(self.traductionV9V10) + self.actionTraduitV10V11.triggered.connect(self.traductionV10V11) + self.actionTraduitV11V12.triggered.connect(self.traductionV11V12) + self.actionSauveLigne.triggered.connect(self.sauveLigne) + + # Pour Carmel + self.actionChercheGrpMaille = QAction(self) + self.actionChercheGrpMaille.setText(tr("Acquiert Groupe Maille")) + + # Pour CarmelCND + self.actionChercheGrp = QAction(self) + self.actionChercheGrp.setText(tr("Accquisition Groupe Maille")) + self.actionChercheGrp.triggered.connect(self.ChercheGrp) + + # Pour Aide + self.actionCode = QAction(self) + self.actionCode.setText(tr("Specificites Maille")) + self.actionCode.triggered.connect(self.aideCode) + + + def handleDeplier(self): + self.viewmanager.handleDeplier() + + def ajoutCommentaire(self): + self.viewmanager.ajoutCommentaire() + + def ouvreFichiers(self) : + # Ouverture des fichiers de commandes donnes sur la ligne de commande + cwd=os.getcwd() + self.dir=cwd + for study in session.d_env.studies: + os.chdir(cwd) + d=session.getUnit(study,self) + self.viewmanager.handleOpen(fichier=study["comm"],units=d) + + + def getSource(self,file): + # appele par Editeur/session.py + import convert + p=convert.plugins['python']() + p.readfile(file) + texte=p.convert('execnoparseur') + return texte + + def initPatrons(self) : + # Mise a jour du menu des fichiers recemment ouverts + from Editeur import listePatrons + if not(self.code in listePatrons.sous_menus) : + if hasattr(self,"menuPatrons"): + self.menuPatrons.setAttribute(Qt.WA_DeleteOnClose) + self.menuPatrons.close() + delattr(self,"menuPatrons") + return + if (not hasattr(self,"menuPatrons")): + self.menuPatrons = QMenu(self.menubar) + self.menuPatrons.setObjectName("menuPatrons") + self.menubar.addAction(self.menuPatrons.menuAction()) + self.menuPatrons.setTitle(tr("Patrons")) + else : + self.menuPatrons.clear() + self.listePatrons = listePatrons.listePatrons(self.code) + idx = 0 + for nomSsMenu in self.listePatrons.liste: + ssmenu=self.menuPatrons.addMenu(nomSsMenu) + for fichier in self.listePatrons.liste[nomSsMenu]: + id = ssmenu.addAction(fichier) + self.ficPatrons[id]=fichier + self.id.triggered.connect(self.handleOpenPatrons) + # self.Patrons.setItemParameter(id,idx) + idx=idx+1 + + def initRecents(self): + self.recent = [] + try : + #if sys.platform[0:5]=="linux" : + #rep=os.path.join(os.environ['HOME'],'.config/Eficas',self.code) + rep=os.path.join(os.path.expanduser("~"),'.config/Eficas',self.code) + #else : + # rep=os.path.join('C:/','.config/Eficas',self.code) + monFichier=rep+"/listefichiers_"+self.code + index=0 + f=open(monFichier) + while ( index < 9) : + ligne=f.readline() + if ligne != "" : + l=(ligne.split("\n"))[0] + self.recent.append(l) + index=index+1 + except : + pass + + try : f.close() + except : pass + + def addToRecentList(self, fn): + while fn in self.recent: self.recent.remove(fn) + self.recent.insert(0,fn) + if len(self.recent) > 9: + self.recent = self.recent[:9] + + + def addToRecentListQT4(self, fn): + """ + Public slot to add a filename to the list of recently opened files. + + @param fn name of the file to be added + """ + self.recent.removeAll(fn) + self.recent.prepend(fn) + if len(self.recent) > 9: + self.recent = self.recent[:9] + index=0 + self.sauveRecents() + + def sauveRecents(self) : + try : + rep=self.maConfiguration.rep_user + monFichier=rep+"/listefichiers_"+self.code + except : + return + try : + f=open(monFichier,'w') + if len(self.recent) == 0 : return + index=0 + while ( index < len(self.recent)): + ligne=str(self.recent[index])+"\n" + f.write(ligne) + index=index+1 + except : pass - try : - os.listdir(MaDir) - flog=MaDir+"/convert.log" - except : - flog='/tmp/convert.log' - - hdlr=logging.FileHandler(flog,'w') - formatter = logging.Formatter('%(levelname)s: %(message)s') - hdlr.setFormatter(formatter) - logger.addHandler(hdlr) - logger.setLevel(logging.INFO) - return hdlr - - -def ferme (hdlr) : - logger.removeHandler(hdlr) + try : + f.close() + except : + pass + + + + def traductionV11V12(self): + from .gereTraduction import traduction + traduction(self.maConfiguration.repIni,self.viewmanager,"V11V12") + + def traductionV10V11(self): + from .gereTraduction import traduction + traduction(self.maConfiguration.repIni,self.viewmanager,"V10V11") + + def traductionV9V10(self): + from .gereTraduction import traduction + traduction(self.maConfiguration.repIni,self.viewmanager,"V9V10") + + def version(self) : + from .monVisu import DVisu + titre = tr("version ") + monVisuDialg=DVisu(parent=self,fl=0) + monVisuDialg.setWindowTitle(titre) + if self.code != None : monVisuDialg.TB.setText(self.VERSION_EFICAS +tr(" pour ") + self.code) + else : monVisuDialg.TB.setText(self.VERSION_EFICAS ) + monVisuDialg.adjustSize() + monVisuDialg.show() + + def aidePPal(self) : + repAide=os.path.dirname(os.path.abspath(__file__)) + maD=os.path.join( repAide,'..','Doc') + try : + indexAide=os.path.join(maD,'index.html') + if sys.platform[0:5]=="linux" : cmd="xdg-open "+indexAide + else : cmd="start "+indexAide + os.system(cmd) + except: + QMessageBox.warning( self,tr( "Aide Indisponible"),tr( "l'aide n est pas installee ")) + + def aidePSEN(self) : + repAide=os.path.dirname(os.path.abspath(__file__)) + maD=os.path.join( repAide,'..','Doc') + try : + indexAide=os.path.join(maD,'index.html') + if sys.platform[0:5]=="linux" : cmd="xdg-open "+indexAide + else : cmd="start "+indexAide + os.system(cmd) + except: + QMessageBox.warning( self,tr( "Aide Indisponible"),tr( "l'aide n est pas installee ")) + + def aideCode(self) : + if self.code==None : return + try : + #if 1 : + if sys.platform[0:5]=="linux" : cmd="xdg-open "+self.fileDoc + else : cmd="start "+self.fileDoc + os.system(cmd) + except: + #else: + QMessageBox.warning( self,tr( "Aide Indisponible"),tr( "l'aide n est pas installee ")) + + + def optionEditeur(self) : + try : + name='monOptions_'+self.code + except : + QMessageBox.critical( self,tr( "Parametrage"),tr( "Veuillez d abord choisir un code")) + return + try : + #if 1: + optionCode=__import__(name) + except : + #else : + QMessageBox.critical( self, tr("Parametrage"), tr("Pas de possibilite de personnalisation de la configuration ")) + return + monOption=optionCode.Options(parent=self,modal = 0 ,configuration=self.maConfiguration) + monOption.show() + + def optionPdf(self) : + from monOptionsPdf import OptionPdf + monOption=OptionPdf(parent=self,modal = 0 ,configuration=self.maConfiguration) + monOption.show() + + def handleSortieComplete(self): + return self.viewmanager.saveCompleteCurrentEditor() + + def handleShowRecentMenu(self): + """ + Private method to set up recent files menu. + """ + self.recentMenu.clear() + + for rp in self.recent: + id = self.recentMenu.addAction(rp) + self.ficRecents[id]=rp + id.triggered.connect(self.handleOpenRecent) + self.recentMenu.addSeparator() + self.recentMenu.addAction(tr('&Effacer'), self.handleClearRecent) + + def handleOpenPatrons(self): + idx=self.sender() + fichier=self.repIni+"/../Editeur/Patrons/"+self.code+"/"+self.ficPatrons[idx] + self.viewmanager.handleOpen(fichier=fichier, patron = 1) + + def handleOpenRecent(self): + idx=self.sender() + fichier=self.ficRecents[idx] + self.viewmanager.handleOpen(fichier=fichier, patron =0 ) + + def handleClearRecent(self): + self.recent = QStringList() + self.sauveRecents() + + def handleRechercherDsCatalogue(self): + if not self.viewmanager : return + self.viewmanager.handleRechercherDsCatalogue() + + def fileNew(self): + try: + self.viewmanager.newEditor() + except EficasException as exc: + msg = str(exc) + if msg != "": QMessageBox.warning(self, tr(u"Erreur"), msg) + + def openProcess(self): + ssCode=None + code="PSEN_N1" + self.cleanPath() + dirCode=os.path.abspath(os.path.join(os.path.abspath(__file__),'../..',"ProcessOutputs_Eficas")) + sys.path.insert(0,dirCode) + self.code=code + self.definitCode(code,ssCode) + self.multi=True + self.demande=False + self.initRecents() + self.fileOpen() + + + def fileOpen(self): + try: + self.viewmanager.handleOpen() + except EficasException as exc: + msg = str(exc) + if msg != "": + QMessageBox.warning(self, tr(u"Erreur"), msg) + + def sauveLigne(self): + return self.viewmanager.sauveLigneCurrentEditor() + + def fileSave(self): + return self.viewmanager.saveCurrentEditor() + + def fileSaveAs(self): + return self.viewmanager.saveAsCurrentEditor() + + def fileClose(self): + self.viewmanager.handleClose(texte='&Fermer') + + def fileCloseAll(self): + self.viewmanager.handleCloseAll(texte='&Fermer') + + def fileExit(self): + # On peut sortir sur Abort + res=self.viewmanager.handleCloseAll() + if (res != 2) : + self.close() + return res + + def editCopy(self): + self.viewmanager.handleEditCopy() + + def editCut(self): + self.viewmanager.handleEditCut() + + def editPaste(self): + self.viewmanager.handleEditPaste() + + def rechercher(self): + self.viewmanager.handleRechercher() + + def run(self): + self.viewmanager.run() + + def saveRun(self): + self.viewmanager.saveRun() + + + def supprimer(self): + self.viewmanager.handleSupprimer() + + def jdcFichierSource(self): + self.viewmanager.handleViewJdcFichierSource() + + def jdcRapport(self): + self.viewmanager.handleViewJdcRapport() + + def jdcRegles(self): + self.viewmanager.handleViewJdcRegles() + + def gestionParam(self): + self.viewmanager.handleGestionParam() + + def visuJdcPy(self): + self.viewmanager.handleViewJdcPy() + + def ouvreArbre(self): + self.viewmanager.ouvreArbre() + + def fermeArbre(self): + self.viewmanager.fermeArbre() + + def newInclude(self): + self.viewmanager.newIncludeEditor() + + def cleanPath(self): + for pathCode in self.ListePathCode: + try: + aEnlever=os.path.abspath(os.path.join(os.path.dirname(__file__),'..',pathCode)) + sys.path.remove(aEnlever) + except : + pass + for pathCode in self.listeAEnlever: + try: + sys.path.remove(aEnlever) + except : + pass + + + def closeEvent(self,event): + res=self.fileExit() + if res==2 : event.ignore() + + + def remplitIconesCommandes(self): + if self.maConfiguration.boutonDsMenuBar == False : return + if not hasattr(self, 'readercata') : return + from monLayoutBouton import MonLayoutBouton + if hasattr(self,'monLayoutBoutonRempli') : return + self.monLayoutBoutonRempli=MonLayoutBouton(self) + + def handleAjoutEtape(self,nomEtape): + self.viewmanager.handleAjoutEtape(nomEtape) + + def metMenuAJourUtilisateurs(self): + self.lesFonctionsUtilisateurs={} + if self.code not in self.mesScripts : return + if not hasattr(self.mesScripts[self.code],'dict_menu') : return + for monMenu in iter(self.mesScripts[self.code].dict_menu.items()) : + titre,lesFonctions= monMenu + self.menuOptions = self.menubar.addMenu("menuOptions") + self.menuOptions.setTitle(tr(titre)) + for elt in lesFonctions : + laFonctionUtilisateur, label, lesArguments = elt + action = QAction(self) + action.setText(label) + #action.triggered.connect(self.appelleFonctionUtilisateur) + self.menuOptions.addAction(action) + self.lesFonctionsUtilisateurs[action]=(laFonctionUtilisateur, lesArguments) + self.menuOptions.triggered.connect(self.handleFonctionUtilisateur) + + + def handleFonctionUtilisateur(self,action) : + (laFonctionUtilisateur, lesArguments)=self.lesFonctionsUtilisateurs[action] + self.viewmanager.handleFonctionUtilisateur(laFonctionUtilisateur, lesArguments) + +if __name__=='__main__': + + # Modules Eficas + rep=os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__),'..','Adao'))) + sys.path.append(rep) + from Adao import prefs + from Adao import prefs_Adao + + from Editeur import import_code + from Editeur import session + + # Analyse des arguments de la ligne de commande + options=session.parse(sys.argv) + code=options.code + + + app = QApplication(sys.argv) + #app.setMainWidget(mw) (qt3) + Eficas=Appli() + Eficas.show() + + #mw.ouvreFichiers() + #mw.show() + + res=app.exec_() + sys.exit(res) diff --git a/InterfaceQT4/qtEficasSsIhm.py b/InterfaceQT4/qtEficasSsIhm.py index d7896621..f2fb2245 100755 --- a/InterfaceQT4/qtEficasSsIhm.py +++ b/InterfaceQT4/qtEficasSsIhm.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/qtEficas_with_log.py b/InterfaceQT4/qtEficas_with_log.py index 2eb78021..f52e7e35 100644 --- a/InterfaceQT4/qtEficas_with_log.py +++ b/InterfaceQT4/qtEficas_with_log.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/qtSaisie.py b/InterfaceQT4/qtSaisie.py index f6f227a7..16cfd6e7 100644 --- a/InterfaceQT4/qtSaisie.py +++ b/InterfaceQT4/qtSaisie.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/readercata.py b/InterfaceQT4/readercata.py index 2d6a8718..c4faa8fb 100644 --- a/InterfaceQT4/readercata.py +++ b/InterfaceQT4/readercata.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/readercataXML.py b/InterfaceQT4/readercataXML.py index 9282b622..a3ab5c34 100644 --- a/InterfaceQT4/readercataXML.py +++ b/InterfaceQT4/readercataXML.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/ssIhm.py b/InterfaceQT4/ssIhm.py index 7f55db0b..1d0cbafc 100644 --- a/InterfaceQT4/ssIhm.py +++ b/InterfaceQT4/ssIhm.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/typeNode.py b/InterfaceQT4/typeNode.py index f9e2e944..9068a0aa 100644 --- a/InterfaceQT4/typeNode.py +++ b/InterfaceQT4/typeNode.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/viewManager.py b/InterfaceQT4/viewManager.py index 78955b0a..f415a757 100644 --- a/InterfaceQT4/viewManager.py +++ b/InterfaceQT4/viewManager.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/InterfaceQT4/viewManagerSsIhm.py b/InterfaceQT4/viewManagerSsIhm.py index a588c792..916ccdfa 100644 --- a/InterfaceQT4/viewManagerSsIhm.py +++ b/InterfaceQT4/viewManagerSsIhm.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/MAP/configuration_MAP.py b/MAP/configuration_MAP.py index 6c997677..7a28aefc 100644 --- a/MAP/configuration_MAP.py +++ b/MAP/configuration_MAP.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/MAP/prefs.py b/MAP/prefs.py index 549c9696..f1df4a02 100644 --- a/MAP/prefs.py +++ b/MAP/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/MAP/prefs_MAP.py b/MAP/prefs_MAP.py index f134bd1d..ef62c204 100644 --- a/MAP/prefs_MAP.py +++ b/MAP/prefs_MAP.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/MAP/qtEficas_map.py b/MAP/qtEficas_map.py index e02b8c74..aa4bb0ec 100755 --- a/MAP/qtEficas_map.py +++ b/MAP/qtEficas_map.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/MAP/style.py b/MAP/style.py index d5961788..36b4b200 100644 --- a/MAP/style.py +++ b/MAP/style.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/MT/prefs.py b/MT/prefs.py index 7f8d8fa1..14b8c020 100644 --- a/MT/prefs.py +++ b/MT/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/MT/qtEficasMT.py b/MT/qtEficasMT.py index 3fa63c87..4576464e 100755 --- a/MT/qtEficasMT.py +++ b/MT/qtEficasMT.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Med/Cata_MED_FAM.xml b/Med/Cata_MED_FAM.xml new file mode 100755 index 00000000..75acb49a --- /dev/null +++ b/Med/Cata_MED_FAM.xml @@ -0,0 +1,28 @@ + + + + + + TXM + + + TXM + TXM + + I + TXM + I + I + + + I + TXM + + + + + + diff --git a/Med/Cata_MED_FAM.xml.mini b/Med/Cata_MED_FAM.xml.mini new file mode 100755 index 00000000..75acb49a --- /dev/null +++ b/Med/Cata_MED_FAM.xml.mini @@ -0,0 +1,28 @@ + + + + + + TXM + + + TXM + TXM + + I + TXM + I + I + + + I + TXM + + + + + + diff --git a/Med/Cata_MED_FAM.xml.origin b/Med/Cata_MED_FAM.xml.origin new file mode 100755 index 00000000..75acb49a --- /dev/null +++ b/Med/Cata_MED_FAM.xml.origin @@ -0,0 +1,28 @@ + + + + + + TXM + + + TXM + TXM + + I + TXM + I + I + + + I + TXM + + + + + + diff --git a/Med/README.txt b/Med/README.txt new file mode 100644 index 00000000..a167a899 --- /dev/null +++ b/Med/README.txt @@ -0,0 +1 @@ +pyxbgen -u model.xsd -m efficas --write-for-customization diff --git a/Med/aide1 b/Med/aide1 new file mode 100644 index 00000000..96187efc --- /dev/null +++ b/Med/aide1 @@ -0,0 +1,256 @@ +Factory + +OPER + +PROC + +_Abstract + +_AddElement + +_AlternativeConstructor + +_AttributeMap + +_AttributeWildcard + +_Automaton + +_CT_ELEMENT_ONLY + +_CT_EMPTY + +_CT_MIXED + +_CT_SIMPLE + +_CompatibleValue + +_ContentTypeTag + +_DynamicCreate + +_DynamicCreate_mixin__AlternativeConstructorAttribute + +_DynamicCreate_mixin__SupersedingClassAttribute + +_ElementBindingDeclForName + +_ElementMap + +_ExpandedName + +_GetValidationConfig + +_HasWildcardElement + +_IsMixed + +_IsSimpleTypeContent + +_IsUrType + +_Locatable_mixin__location + +_Name + +_PerformValidation + +_PreFactory_vx + +_PyXBFactoryKeywords + +_RequireXSIType + +_ReservedSymbols + +_SetAlternativeConstructor + +_SetSupersedingClass + +_SetValidationConfig + +_SupersedingClass + +_T_commandes__OPER + +_T_commandes__PROC + +_TypeBinding_mixin__AttributesFromDOM + +_TypeBinding_mixin__WarnedUnassociatedElement + +_TypeBinding_mixin__checkNilCtor + +_TypeBinding_mixin__constructedWithValue + +_TypeBinding_mixin__element + +_TypeBinding_mixin__getValidationConfig + +_TypeBinding_mixin__namespaceContext + +_TypeBinding_mixin__xsiNil + +_TypeDefinition + +_UseForTag + +_XSDLocation + +__class__ + +__delattr__ + +__dict__ + +__doc__ + +__format__ + +__getattribute__ + +__hash__ + +__httpchercheurs_edf_comlogicielsefficas_T_commandes_httpchercheurs_edf_comlogicielsefficasOPER + +__httpchercheurs_edf_comlogicielsefficas_T_commandes_httpchercheurs_edf_comlogicielsefficasPROC + +__init__ + +__module__ + +__new__ + +__reduce__ + +__reduce_ex__ + +__repr__ + +__setattr__ + +__sizeof__ + +__str__ + +__subclasshook__ + +__weakref__ + +_addContent + +_appendWildcardElement + +_automatonConfiguration + +_complexTypeDefinition__NeedWarnOnContent + +_complexTypeDefinition__WarnOnContent + +_complexTypeDefinition__automatonConfiguration + +_complexTypeDefinition__childrenForDOM + +_complexTypeDefinition__content + +_complexTypeDefinition__setContent + +_complexTypeDefinition__wildcardAttributeMap + +_complexTypeDefinition__wildcardElements + +_constructedWithValue + +_description + +_diagnosticName + +_element + +_finalizeContentModel + +_isNil + +_location + +_namespaceContext + +_performValidation + +_postDOMValidate + +_postFactory_vx + +_resetAutomaton + +_resetContent + +_setAttribute + +_setAttributesFromKeywordsAndDOM + +_setDOMFromAttributes + +_setElement + +_setIsNil + +_setLocation + +_setNamespaceContext + +_setValidationConfig + +_substitutesFor + +_symbolSet + +_toDOM_csc + +_validateAttributes + +_validateBinding_vx + +_validatedChildren + +_validationConfig + +_validationConfig_ + +append + +content + +extend + +orderedContent + +reset + +toDOM + +toxml + +validateBinding + +value + +wildcardAttributeMap + +wildcardElements + +xsdConstraintsOK + +_______________________ +je passe ds CreerAccas +PlageValeur +ValeurDef +doc +portee +statut +o +typeAttendu +TXM +validators +_______________________ diff --git a/Med/efficas.py b/Med/efficas.py new file mode 100644 index 00000000..3304e8af --- /dev/null +++ b/Med/efficas.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from raw.efficas import * diff --git a/Med/model.xsd b/Med/model.xsd new file mode 100755 index 00000000..53fe25af --- /dev/null +++ b/Med/model.xsd @@ -0,0 +1,595 @@ + + + + + + + + + + + + + + + + + + SIMP devrait être selectionné que si .//SIMP[portee='Global'] + + + + + + + + + + + SIMP devrait être selectionné que si .//SIMP[portee='Global'] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + La valuer -1 equivaut à oo + + + + + + + + + + + + + + + + + + + + + + + + + + La portée pouurait devenir un attribut de SIMP. Une autre solution consisterait a créer un SIMPG pour distinguer les @nom uniques des SIMP a portée globale des autres. + + + + + + + + + + + + + + La valuer -1 equivaut à oo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Référence une position dans un fichier maître contenant une liste de références à des pages de documentations + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Med/raw/__init__.py b/Med/raw/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/Med/raw/efficas.py b/Med/raw/efficas.py new file mode 100644 index 00000000..de150a9a --- /dev/null +++ b/Med/raw/efficas.py @@ -0,0 +1,2685 @@ +# ./raw/efficas.py +# -*- coding: utf-8 -*- +# PyXB bindings for NM:759f40938b7670cd6d5941e706557eb2115fb17f +# Generated 2016-11-23 16:51:37.568270 by PyXB version 1.2.3 +# Namespace http://chercheurs.edf.com/logiciels/efficas + +import pyxb +import pyxb.binding +import pyxb.binding.saxer +import io +import pyxb.utils.utility +import pyxb.utils.domutils +import sys + +# Unique identifier for bindings created at the same time +_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:b79c3f70-b194-11e6-bb0f-b05adafd94d6') + +# Version of PyXB used to generate the bindings +_PyXBVersion = '1.2.3' +# Generated bindings are not compatible across PyXB versions +if pyxb.__version__ != _PyXBVersion: + raise pyxb.PyXBVersionError(_PyXBVersion) + +# Import bindings for namespaces imported into schema +import pyxb.binding.datatypes + +# NOTE: All namespace declarations are reserved within the binding +Namespace = pyxb.namespace.NamespaceForURI(u'http://chercheurs.edf.com/logiciels/efficas', create_if_missing=True) +Namespace.configureCategories(['typeBinding', 'elementBinding']) + +def CreateFromDocument (xml_text, default_namespace=None, location_base=None): + """Parse the given XML and use the document element to create a + Python instance. + + @param xml_text An XML document. This should be data (Python 2 + str or Python 3 bytes), or a text (Python 2 unicode or Python 3 + str) in the L{pyxb._InputEncoding} encoding. + + @keyword default_namespace The L{pyxb.Namespace} instance to use as the + default namespace where there is no default namespace in scope. + If unspecified or C{None}, the namespace of the module containing + this function will be used. + + @keyword location_base: An object to be recorded as the base of all + L{pyxb.utils.utility.Location} instances associated with events and + objects handled by the parser. You might pass the URI from which + the document was obtained. + """ + + if pyxb.XMLStyle_saxer != pyxb._XMLStyle: + dom = pyxb.utils.domutils.StringToDOM(xml_text) + return CreateFromDOM(dom.documentElement) + if default_namespace is None: + default_namespace = Namespace.fallbackNamespace() + saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) + handler = saxer.getContentHandler() + xmld = xml_text + if isinstance(xmld, unicode): + xmld = xmld.encode(pyxb._InputEncoding) + saxer.parse(io.BytesIO(xmld)) + instance = handler.rootObject() + return instance + +def CreateFromDOM (node, default_namespace=None): + """Create a Python instance from the given DOM node. + The node tag must correspond to an element declaration in this module. + + @deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" + if default_namespace is None: + default_namespace = Namespace.fallbackNamespace() + return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) + + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_fonction_python +class T_fonction_python (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_fonction_python') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 154, 1) + _Documentation = None +T_fonction_python._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_fonction_python', T_fonction_python) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_statut +class AT_statut (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_statut') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 190, 1) + _Documentation = None +AT_statut._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=AT_statut, enum_prefix=None) +AT_statut.f = AT_statut._CF_enumeration.addEnumeration(unicode_value=u'f', tag=u'f') +AT_statut.o = AT_statut._CF_enumeration.addEnumeration(unicode_value=u'o', tag=u'o') +AT_statut._InitializeFacetMap(AT_statut._CF_enumeration) +Namespace.addCategoryObject('typeBinding', u'AT_statut', AT_statut) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_portee +class T_portee (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_portee') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 202, 1) + _Documentation = None +T_portee._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_portee, enum_prefix=None) +T_portee.None_ = T_portee._CF_enumeration.addEnumeration(unicode_value=u'None', tag=u'None_') +T_portee.Global = T_portee._CF_enumeration.addEnumeration(unicode_value=u'Global', tag=u'Global') +T_portee._InitializeFacetMap(T_portee._CF_enumeration) +Namespace.addCategoryObject('typeBinding', u'T_portee', T_portee) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_max_occurs +class AT_max_occurs (pyxb.binding.datatypes.long): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_max_occurs') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 208, 1) + _Documentation = None +AT_max_occurs._CF_minInclusive = pyxb.binding.facets.CF_minInclusive(value_datatype=AT_max_occurs, value=pyxb.binding.datatypes.long(-1L)) +AT_max_occurs._InitializeFacetMap(AT_max_occurs._CF_minInclusive) +Namespace.addCategoryObject('typeBinding', u'AT_max_occurs', AT_max_occurs) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_min_occurs +class AT_min_occurs (pyxb.binding.datatypes.long): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_min_occurs') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 213, 1) + _Documentation = None +AT_min_occurs._CF_minExclusive = pyxb.binding.facets.CF_minExclusive(value_datatype=pyxb.binding.datatypes.long, value=pyxb.binding.datatypes.integer(0L)) +AT_min_occurs._InitializeFacetMap(AT_min_occurs._CF_minExclusive) +Namespace.addCategoryObject('typeBinding', u'AT_min_occurs', AT_min_occurs) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_ag +class AT_ag (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_ag') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 226, 1) + _Documentation = None +AT_ag._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=AT_ag, enum_prefix=None) +AT_ag.No_comment = AT_ag._CF_enumeration.addEnumeration(unicode_value=u'No comment', tag=u'No_comment') +AT_ag._InitializeFacetMap(AT_ag._CF_enumeration) +Namespace.addCategoryObject('typeBinding', u'AT_ag', AT_ag) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_docu +class AT_docu (pyxb.binding.datatypes.string): + + """Référence une position dans un fichier maître contenant une liste de références à des pages de documentations""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_docu') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 231, 1) + _Documentation = u'R\xe9f\xe9rence une position dans un fichier ma\xeetre contenant une liste de r\xe9f\xe9rences \xe0 des pages de documentations' +AT_docu._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'AT_docu', AT_docu) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_valeur_sugg +class AT_valeur_sugg (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_valeur_sugg') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 237, 1) + _Documentation = None +AT_valeur_sugg._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'AT_valeur_sugg', AT_valeur_sugg) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_nom +class AT_nom (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_nom') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 241, 1) + _Documentation = None +AT_nom._CF_pattern = pyxb.binding.facets.CF_pattern() +AT_nom._CF_pattern.addPattern(pattern=u'([A-Z]|[a-z]|_)([A-Z]|[a-z]|_|[0-9])*') +AT_nom._InitializeFacetMap(AT_nom._CF_pattern) +Namespace.addCategoryObject('typeBinding', u'AT_nom', AT_nom) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_validators +class T_validators (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_validators') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 303, 1) + _Documentation = None +T_validators._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_validators, enum_prefix=None) +T_validators.NoRepeat = T_validators._CF_enumeration.addEnumeration(unicode_value=u'NoRepeat', tag=u'NoRepeat') +T_validators.OnlyStr = T_validators._CF_enumeration.addEnumeration(unicode_value=u'OnlyStr', tag=u'OnlyStr') +T_validators.VerifExiste = T_validators._CF_enumeration.addEnumeration(unicode_value=u'VerifExiste', tag=u'VerifExiste') +T_validators.VerifTypeTuple = T_validators._CF_enumeration.addEnumeration(unicode_value=u'VerifTypeTuple', tag=u'VerifTypeTuple') +T_validators._InitializeFacetMap(T_validators._CF_enumeration) +Namespace.addCategoryObject('typeBinding', u'T_validators', T_validators) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_Bool +class T_Bool (pyxb.binding.datatypes.boolean): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Bool') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 311, 1) + _Documentation = None +T_Bool._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_Bool', T_Bool) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_I +class T_I (pyxb.binding.datatypes.int): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_I') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 317, 1) + _Documentation = None +T_I._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_I', T_I) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_R +class T_R (pyxb.binding.datatypes.double): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_R') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 323, 1) + _Documentation = None +T_R._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_R', T_R) + +# List simple type: [anonymous] +# superclasses pyxb.binding.datatypes.anySimpleType +class STD_ANON (pyxb.binding.basis.STD_list): + + """Simple type that is a list of pyxb.binding.datatypes.double.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 338, 3) + _Documentation = None + + _ItemType = pyxb.binding.datatypes.double +STD_ANON._InitializeFacetMap() + +# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_list_C +# superclasses pyxb.binding.datatypes.anySimpleType +class T_list_C (pyxb.binding.basis.STD_list): + + """Simple type that is a list of pyxb.binding.datatypes.double.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_list_C') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 347, 1) + _Documentation = None + + _ItemType = pyxb.binding.datatypes.double +T_list_C._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_list_C', T_list_C) + +# Atomic simple type: [anonymous] +class STD_ANON_ (pyxb.binding.datatypes.string): + + """An atomic simple type.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 402, 3) + _Documentation = None +STD_ANON_._CF_whiteSpace = pyxb.binding.facets.CF_whiteSpace(value=pyxb.binding.facets._WhiteSpace_enum.preserve) +STD_ANON_._InitializeFacetMap(STD_ANON_._CF_whiteSpace) + +# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_list_double +# superclasses pyxb.binding.datatypes.anySimpleType +class T_list_double (pyxb.binding.basis.STD_list): + + """Simple type that is a list of pyxb.binding.datatypes.double.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_list_double') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 428, 1) + _Documentation = None + + _ItemType = pyxb.binding.datatypes.double +T_list_double._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_list_double', T_list_double) + +# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_predicat1 +# superclasses pyxb.binding.datatypes.anySimpleType +class T_predicat1 (pyxb.binding.basis.STD_list): + + """Simple type that is a list of AT_nom.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_predicat1') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 246, 1) + _Documentation = None + + _ItemType = AT_nom +T_predicat1._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_predicat1', T_predicat1) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}AT_subroutine +class AT_subroutine (AT_nom): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'AT_subroutine') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 300, 1) + _Documentation = None +AT_subroutine._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'AT_subroutine', AT_subroutine) + +# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_list_Bool +# superclasses pyxb.binding.datatypes.anySimpleType +class T_list_Bool (pyxb.binding.basis.STD_list): + + """Simple type that is a list of T_Bool.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_list_Bool') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 314, 1) + _Documentation = None + + _ItemType = T_Bool +T_list_Bool._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_list_Bool', T_list_Bool) + +# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_list_I +# superclasses pyxb.binding.datatypes.anySimpleType +class T_list_I (pyxb.binding.basis.STD_list): + + """Simple type that is a list of T_I.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_list_I') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 320, 1) + _Documentation = None + + _ItemType = T_I +T_list_I._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_list_I', T_list_I) + +# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_list_R +# superclasses pyxb.binding.datatypes.anySimpleType +class T_list_R (pyxb.binding.basis.STD_list): + + """Simple type that is a list of T_R.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_list_R') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 326, 1) + _Documentation = None + + _ItemType = T_R +T_list_R._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_list_R', T_list_R) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_TXM +class T_TXM (AT_nom): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_TXM') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 329, 1) + _Documentation = None +T_TXM._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_TXM', T_TXM) + +# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_C +# superclasses STD_ANON +class T_C (pyxb.binding.basis.STD_list): + + """Simple type that is a list of pyxb.binding.datatypes.double.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_C') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 336, 1) + _Documentation = None + + _ItemType = pyxb.binding.datatypes.double +T_C._CF_maxLength = pyxb.binding.facets.CF_maxLength(value=pyxb.binding.datatypes.nonNegativeInteger(2L)) +T_C._CF_minLength = pyxb.binding.facets.CF_minLength(value=pyxb.binding.datatypes.nonNegativeInteger(2L)) +T_C._InitializeFacetMap(T_C._CF_maxLength, + T_C._CF_minLength) +Namespace.addCategoryObject('typeBinding', u'T_C', T_C) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_name_base +class T_name_base (AT_nom): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_name_base') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 350, 1) + _Documentation = None +T_name_base._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_name_base', T_name_base) + +# Atomic simple type: [anonymous] +class STD_ANON_2 (AT_nom, pyxb.binding.basis.enumeration_mixin): + + """An atomic simple type.""" + + _ExpandedName = None + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 385, 3) + _Documentation = None +STD_ANON_2._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=STD_ANON_2, enum_prefix=None) +STD_ANON_2.T_Matrice_double = STD_ANON_2._CF_enumeration.addEnumeration(unicode_value=u'T_Matrice_double', tag=u'T_Matrice_double') +STD_ANON_2.T_Matrice_Symetrique_double = STD_ANON_2._CF_enumeration.addEnumeration(unicode_value=u'T_Matrice_Symetrique_double', tag=u'T_Matrice_Symetrique_double') +STD_ANON_2.T_tuple = STD_ANON_2._CF_enumeration.addEnumeration(unicode_value=u'T_tuple', tag=u'T_tuple') +STD_ANON_2.T_classe_utilisateur = STD_ANON_2._CF_enumeration.addEnumeration(unicode_value=u'T_classe_utilisateur', tag=u'T_classe_utilisateur') +STD_ANON_2._InitializeFacetMap(STD_ANON_2._CF_enumeration) + +# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_Repertoire +# superclasses pyxb.binding.datatypes.anySimpleType +class T_Repertoire (pyxb.binding.basis.STD_list): + + """Simple type that is a list of STD_ANON_.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Repertoire') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 400, 1) + _Documentation = None + + _ItemType = STD_ANON_ +T_Repertoire._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_Repertoire', T_Repertoire) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_classe_utilisateur +class T_classe_utilisateur (AT_nom): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_classe_utilisateur') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 461, 1) + _Documentation = None +T_classe_utilisateur._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_classe_utilisateur', T_classe_utilisateur) + +# List simple type: {http://chercheurs.edf.com/logiciels/efficas}T_list_TXM +# superclasses pyxb.binding.datatypes.anySimpleType +class T_list_TXM (pyxb.binding.basis.STD_list): + + """Simple type that is a list of T_TXM.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_list_TXM') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 332, 1) + _Documentation = None + + _ItemType = T_TXM +T_list_TXM._InitializeFacetMap() +Namespace.addCategoryObject('typeBinding', u'T_list_TXM', T_list_TXM) + +# Atomic simple type: {http://chercheurs.edf.com/logiciels/efficas}T_simple_name +class T_simple_name (T_name_base, pyxb.binding.basis.enumeration_mixin): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_simple_name') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 353, 1) + _Documentation = None +T_simple_name._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_simple_name, enum_prefix=None) +T_simple_name.Fichier = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'Fichier', tag=u'Fichier') +T_simple_name.Repertoire = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'Repertoire', tag=u'Repertoire') +T_simple_name.TXM = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'TXM', tag=u'TXM') +T_simple_name.I = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'I', tag=u'I') +T_simple_name.R = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'R', tag=u'R') +T_simple_name.C = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'C', tag=u'C') +T_simple_name.Bool = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'Bool', tag=u'Bool') +T_simple_name.grma = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'grma', tag=u'grma') +T_simple_name.grno = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'grno', tag=u'grno') +T_simple_name.SalomeEntry = T_simple_name._CF_enumeration.addEnumeration(unicode_value=u'SalomeEntry', tag=u'SalomeEntry') +T_simple_name._InitializeFacetMap(T_simple_name._CF_enumeration) +Namespace.addCategoryObject('typeBinding', u'T_simple_name', T_simple_name) + +# Union simple type: {http://chercheurs.edf.com/logiciels/efficas}T_name +# superclasses pyxb.binding.datatypes.anySimpleType +class T_name (pyxb.binding.basis.STD_union): + + """Simple type that is a union of T_simple_name, STD_ANON_2.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_name') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 383, 1) + _Documentation = None + + _MemberTypes = ( T_simple_name, STD_ANON_2, ) +T_name._CF_pattern = pyxb.binding.facets.CF_pattern() +T_name._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_name) +T_name.Fichier = u'Fichier' # originally T_simple_name.Fichier +T_name.Repertoire = u'Repertoire' # originally T_simple_name.Repertoire +T_name.TXM = u'TXM' # originally T_simple_name.TXM +T_name.I = u'I' # originally T_simple_name.I +T_name.R = u'R' # originally T_simple_name.R +T_name.C = u'C' # originally T_simple_name.C +T_name.Bool = u'Bool' # originally T_simple_name.Bool +T_name.grma = u'grma' # originally T_simple_name.grma +T_name.grno = u'grno' # originally T_simple_name.grno +T_name.SalomeEntry = u'SalomeEntry' # originally T_simple_name.SalomeEntry +T_name.T_Matrice_double = u'T_Matrice_double' # originally STD_ANON_2.T_Matrice_double +T_name.T_Matrice_Symetrique_double = u'T_Matrice_Symetrique_double'# originally STD_ANON_2.T_Matrice_Symetrique_double +T_name.T_tuple = u'T_tuple' # originally STD_ANON_2.T_tuple +T_name.T_classe_utilisateur = u'T_classe_utilisateur'# originally STD_ANON_2.T_classe_utilisateur +T_name._InitializeFacetMap(T_name._CF_pattern, + T_name._CF_enumeration) +Namespace.addCategoryObject('typeBinding', u'T_name', T_name) + +# Union simple type: {http://chercheurs.edf.com/logiciels/efficas}T_simple +# superclasses pyxb.binding.datatypes.anySimpleType +class T_simple (pyxb.binding.basis.STD_union): + + """Simple type that is a union of T_I, T_list_I, T_R, T_list_R, T_C, T_list_C, T_TXM, T_list_TXM, T_Bool, T_list_Bool, T_Repertoire.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_simple') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 409, 1) + _Documentation = None + + _MemberTypes = ( T_I, T_list_I, T_R, T_list_R, T_C, T_list_C, T_TXM, T_list_TXM, T_Bool, T_list_Bool, T_Repertoire, ) +T_simple._CF_pattern = pyxb.binding.facets.CF_pattern() +T_simple._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_simple) +T_simple._InitializeFacetMap(T_simple._CF_pattern, + T_simple._CF_enumeration) +Namespace.addCategoryObject('typeBinding', u'T_simple', T_simple) + +# Union simple type: {http://chercheurs.edf.com/logiciels/efficas}T_classe_utilisateur_name +# superclasses T_name, pyxb.binding.basis.enumeration_mixin +class T_classe_utilisateur_name (pyxb.binding.basis.STD_union): + + """Simple type that is a union of T_simple_name, STD_ANON_2.""" + + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_classe_utilisateur_name') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 371, 1) + _Documentation = None + + _MemberTypes = ( T_simple_name, STD_ANON_2, ) +T_classe_utilisateur_name._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_classe_utilisateur_name, enum_prefix=None) +T_classe_utilisateur_name.T_classe_utilisateur = T_classe_utilisateur_name._CF_enumeration.addEnumeration(unicode_value=u'T_classe_utilisateur', tag=u'T_classe_utilisateur') +T_classe_utilisateur_name._InitializeFacetMap(T_classe_utilisateur_name._CF_enumeration) +Namespace.addCategoryObject('typeBinding', u'T_classe_utilisateur_name', T_classe_utilisateur_name) + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_cata with content type ELEMENT_ONLY +class T_cata (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_cata with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_cata') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 66, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/efficas}commandes uses Python identifier commandes + __commandes = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'commandes'), 'commandes', '__httpchercheurs_edf_comlogicielsefficas_T_cata_httpchercheurs_edf_comlogicielsefficascommandes', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 11, 1), ) + + + commandes = property(__commandes.value, __commandes.set, None, None) + + _ElementMap.update({ + __commandes.name() : __commandes + }) + _AttributeMap.update({ + + }) +Namespace.addCategoryObject('typeBinding', u'T_cata', T_cata) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_commandes with content type ELEMENT_ONLY +class T_commandes (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_commandes with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_commandes') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 71, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/efficas}OPER uses Python identifier OPER + __OPER = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'OPER'), 'OPER', '__httpchercheurs_edf_comlogicielsefficas_T_commandes_httpchercheurs_edf_comlogicielsefficasOPER', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 99, 1), ) + + + OPER = property(__OPER.value, __OPER.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}PROC uses Python identifier PROC + __PROC = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'PROC'), 'PROC', '__httpchercheurs_edf_comlogicielsefficas_T_commandes_httpchercheurs_edf_comlogicielsefficasPROC', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 110, 1), ) + + + PROC = property(__PROC.value, __PROC.set, None, None) + + _ElementMap.update({ + __OPER.name() : __OPER, + __PROC.name() : __PROC + }) + _AttributeMap.update({ + + }) +Namespace.addCategoryObject('typeBinding', u'T_commandes', T_commandes) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Cardinalite with content type EMPTY +class T_Cardinalite (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Cardinalite with content type EMPTY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Cardinalite') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 77, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + _ElementMap.update({ + + }) + _AttributeMap.update({ + + }) +Namespace.addCategoryObject('typeBinding', u'T_Cardinalite', T_Cardinalite) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_PlageValeur with content type ELEMENT_ONLY +class T_PlageValeur (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_PlageValeur with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_PlageValeur') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 78, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/efficas}borne_sup uses Python identifier borne_sup + __borne_sup = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'borne_sup'), 'borne_sup', '__httpchercheurs_edf_comlogicielsefficas_T_PlageValeur_httpchercheurs_edf_comlogicielsefficasborne_sup', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 46, 1), ) + + + borne_sup = property(__borne_sup.value, __borne_sup.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}borne_inf uses Python identifier borne_inf + __borne_inf = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'borne_inf'), 'borne_inf', '__httpchercheurs_edf_comlogicielsefficas_T_PlageValeur_httpchercheurs_edf_comlogicielsefficasborne_inf', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 47, 1), ) + + + borne_inf = property(__borne_inf.value, __borne_inf.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}into uses Python identifier into + __into = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'into'), 'into', '__httpchercheurs_edf_comlogicielsefficas_T_PlageValeur_httpchercheurs_edf_comlogicielsefficasinto', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 49, 1), ) + + + into = property(__into.value, __into.set, None, None) + + _ElementMap.update({ + __borne_sup.name() : __borne_sup, + __borne_inf.name() : __borne_inf, + __into.name() : __into + }) + _AttributeMap.update({ + + }) +Namespace.addCategoryObject('typeBinding', u'T_PlageValeur', T_PlageValeur) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_predicat2 with content type ELEMENT_ONLY +class T_predicat2 (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_predicat2 with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_predicat2') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 250, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/efficas}p1 uses Python identifier p1 + __p1 = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'p1'), 'p1', '__httpchercheurs_edf_comlogicielsefficas_T_predicat2_httpchercheurs_edf_comlogicielsefficasp1', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 252, 3), ) + + + p1 = property(__p1.value, __p1.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}p2 uses Python identifier p2 + __p2 = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'p2'), 'p2', '__httpchercheurs_edf_comlogicielsefficas_T_predicat2_httpchercheurs_edf_comlogicielsefficasp2', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 253, 3), ) + + + p2 = property(__p2.value, __p2.set, None, None) + + _ElementMap.update({ + __p1.name() : __p1, + __p2.name() : __p2 + }) + _AttributeMap.update({ + + }) +Namespace.addCategoryObject('typeBinding', u'T_predicat2', T_predicat2) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_regles with content type ELEMENT_ONLY +class T_regles (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_regles with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_regles') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 291, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/efficas}A_CLASSER uses Python identifier A_CLASSER + __A_CLASSER = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'A_CLASSER'), 'A_CLASSER', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasA_CLASSER', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 257, 1), ) + + + A_CLASSER = property(__A_CLASSER.value, __A_CLASSER.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}AU_MOINS_UN uses Python identifier AU_MOINS_UN + __AU_MOINS_UN = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'AU_MOINS_UN'), 'AU_MOINS_UN', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasAU_MOINS_UN', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 258, 1), ) + + + AU_MOINS_UN = property(__AU_MOINS_UN.value, __AU_MOINS_UN.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}AU_PLUS_UN uses Python identifier AU_PLUS_UN + __AU_PLUS_UN = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'AU_PLUS_UN'), 'AU_PLUS_UN', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasAU_PLUS_UN', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 259, 1), ) + + + AU_PLUS_UN = property(__AU_PLUS_UN.value, __AU_PLUS_UN.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}ENSEMBLE uses Python identifier ENSEMBLE + __ENSEMBLE = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'ENSEMBLE'), 'ENSEMBLE', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasENSEMBLE', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 260, 1), ) + + + ENSEMBLE = property(__ENSEMBLE.value, __ENSEMBLE.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}EXCLUS uses Python identifier EXCLUS + __EXCLUS = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'EXCLUS'), 'EXCLUS', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasEXCLUS', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 261, 1), ) + + + EXCLUS = property(__EXCLUS.value, __EXCLUS.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}PRESENT_ABSENT uses Python identifier PRESENT_ABSENT + __PRESENT_ABSENT = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_ABSENT'), 'PRESENT_ABSENT', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasPRESENT_ABSENT', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 269, 1), ) + + + PRESENT_ABSENT = property(__PRESENT_ABSENT.value, __PRESENT_ABSENT.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}PRESENT_PRESENT uses Python identifier PRESENT_PRESENT + __PRESENT_PRESENT = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_PRESENT'), 'PRESENT_PRESENT', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasPRESENT_PRESENT', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 270, 1), ) + + + PRESENT_PRESENT = property(__PRESENT_PRESENT.value, __PRESENT_PRESENT.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}UN_PARMI uses Python identifier UN_PARMI + __UN_PARMI = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'UN_PARMI'), 'UN_PARMI', '__httpchercheurs_edf_comlogicielsefficas_T_regles_httpchercheurs_edf_comlogicielsefficasUN_PARMI', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 271, 1), ) + + + UN_PARMI = property(__UN_PARMI.value, __UN_PARMI.set, None, None) + + _ElementMap.update({ + __A_CLASSER.name() : __A_CLASSER, + __AU_MOINS_UN.name() : __AU_MOINS_UN, + __AU_PLUS_UN.name() : __AU_PLUS_UN, + __ENSEMBLE.name() : __ENSEMBLE, + __EXCLUS.name() : __EXCLUS, + __PRESENT_ABSENT.name() : __PRESENT_ABSENT, + __PRESENT_PRESENT.name() : __PRESENT_PRESENT, + __UN_PARMI.name() : __UN_PARMI + }) + _AttributeMap.update({ + + }) +Namespace.addCategoryObject('typeBinding', u'T_regles', T_regles) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_grma with content type EMPTY +class T_grma (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_grma with content type EMPTY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_grma') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 395, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + _ElementMap.update({ + + }) + _AttributeMap.update({ + + }) +Namespace.addCategoryObject('typeBinding', u'T_grma', T_grma) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_grno with content type EMPTY +class T_grno (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_grno with content type EMPTY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_grno') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 396, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + _ElementMap.update({ + + }) + _AttributeMap.update({ + + }) +Namespace.addCategoryObject('typeBinding', u'T_grno', T_grno) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_SalomeEntry with content type EMPTY +class T_SalomeEntry (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_SalomeEntry with content type EMPTY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_SalomeEntry') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 397, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + _ElementMap.update({ + + }) + _AttributeMap.update({ + + }) +Namespace.addCategoryObject('typeBinding', u'T_SalomeEntry', T_SalomeEntry) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Fichier with content type EMPTY +class T_Fichier (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Fichier with content type EMPTY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Fichier') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 398, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + _ElementMap.update({ + + }) + _AttributeMap.update({ + + }) +Namespace.addCategoryObject('typeBinding', u'T_Fichier', T_Fichier) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_tuple with content type SIMPLE +class T_tuple (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_tuple with content type SIMPLE""" + _TypeDefinition = pyxb.binding.datatypes.anySimpleType + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_SIMPLE + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_tuple') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 454, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anySimpleType + + # Attribute n uses Python identifier n + __n = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'n'), 'n', '__httpchercheurs_edf_comlogicielsefficas_T_tuple_n', pyxb.binding.datatypes.int, required=True) + __n._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 457, 4) + __n._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 457, 4) + + n = property(__n.value, __n.set, None, None) + + _ElementMap.update({ + + }) + _AttributeMap.update({ + __n.name() : __n + }) +Namespace.addCategoryObject('typeBinding', u'T_tuple', T_tuple) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_into with content type ELEMENT_ONLY +class T_into (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_into with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_into') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 501, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/efficas}fonction_utilisateur uses Python identifier fonction_utilisateur + __fonction_utilisateur = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'fonction_utilisateur'), 'fonction_utilisateur', '__httpchercheurs_edf_comlogicielsefficas_T_into_httpchercheurs_edf_comlogicielsefficasfonction_utilisateur', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 10, 1), ) + + + fonction_utilisateur = property(__fonction_utilisateur.value, __fonction_utilisateur.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}typesimple uses Python identifier typesimple + __typesimple = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'typesimple'), 'typesimple', '__httpchercheurs_edf_comlogicielsefficas_T_into_httpchercheurs_edf_comlogicielsefficastypesimple', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 464, 1), ) + + + typesimple = property(__typesimple.value, __typesimple.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}matrice_double uses Python identifier matrice_double + __matrice_double = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'matrice_double'), 'matrice_double', '__httpchercheurs_edf_comlogicielsefficas_T_into_httpchercheurs_edf_comlogicielsefficasmatrice_double', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 465, 1), ) + + + matrice_double = property(__matrice_double.value, __matrice_double.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}matrice_symetrique_double uses Python identifier matrice_symetrique_double + __matrice_symetrique_double = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'matrice_symetrique_double'), 'matrice_symetrique_double', '__httpchercheurs_edf_comlogicielsefficas_T_into_httpchercheurs_edf_comlogicielsefficasmatrice_symetrique_double', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 466, 1), ) + + + matrice_symetrique_double = property(__matrice_symetrique_double.value, __matrice_symetrique_double.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}tuple uses Python identifier tuple + __tuple = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'tuple'), 'tuple', '__httpchercheurs_edf_comlogicielsefficas_T_into_httpchercheurs_edf_comlogicielsefficastuple', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 467, 1), ) + + + tuple = property(__tuple.value, __tuple.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}classe_utilisateur uses Python identifier classe_utilisateur + __classe_utilisateur = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'classe_utilisateur'), 'classe_utilisateur', '__httpchercheurs_edf_comlogicielsefficas_T_into_httpchercheurs_edf_comlogicielsefficasclasse_utilisateur', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 468, 1), ) + + + classe_utilisateur = property(__classe_utilisateur.value, __classe_utilisateur.set, None, None) + + _ElementMap.update({ + __fonction_utilisateur.name() : __fonction_utilisateur, + __typesimple.name() : __typesimple, + __matrice_double.name() : __matrice_double, + __matrice_symetrique_double.name() : __matrice_symetrique_double, + __tuple.name() : __tuple, + __classe_utilisateur.name() : __classe_utilisateur + }) + _AttributeMap.update({ + + }) +Namespace.addCategoryObject('typeBinding', u'T_into', T_into) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_doc with content type EMPTY +class T_doc (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_doc with content type EMPTY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_doc') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 61, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}fr uses Python identifier fr + __fr = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'fr'), 'fr', '__httpchercheurs_edf_comlogicielsefficas_T_doc_httpchercheurs_edf_comlogicielsefficasfr', pyxb.binding.datatypes.string) + __fr._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 53, 1) + __fr._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 62, 2) + + fr = property(__fr.value, __fr.set, None, None) + + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}ang uses Python identifier ang + __ang = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'ang'), 'ang', '__httpchercheurs_edf_comlogicielsefficas_T_doc_httpchercheurs_edf_comlogicielsefficasang', pyxb.binding.datatypes.string) + __ang._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 54, 1) + __ang._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 63, 2) + + ang = property(__ang.value, __ang.set, None, None) + + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}docu uses Python identifier docu + __docu = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'docu'), 'docu', '__httpchercheurs_edf_comlogicielsefficas_T_doc_httpchercheurs_edf_comlogicielsefficasdocu', AT_docu) + __docu._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 55, 1) + __docu._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 64, 2) + + docu = property(__docu.value, __docu.set, None, None) + + _ElementMap.update({ + + }) + _AttributeMap.update({ + __fr.name() : __fr, + __ang.name() : __ang, + __docu.name() : __docu + }) +Namespace.addCategoryObject('typeBinding', u'T_doc', T_doc) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common with content type ELEMENT_ONLY +class T_Accas_Common (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Accas.Common') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 87, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/efficas}doc uses Python identifier doc + __doc = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'doc'), 'doc', '__httpchercheurs_edf_comlogicielsefficas_T_Accas_Common_httpchercheurs_edf_comlogicielsefficasdoc', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 4, 1), ) + + + doc = property(__doc.value, __doc.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}regles uses Python identifier regles + __regles = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'regles'), 'regles', '__httpchercheurs_edf_comlogicielsefficas_T_Accas_Common_httpchercheurs_edf_comlogicielsefficasregles', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 6, 1), ) + + + regles = property(__regles.value, __regles.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}SIMP uses Python identifier SIMP + __SIMP = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'SIMP'), 'SIMP', '__httpchercheurs_edf_comlogicielsefficas_T_Accas_Common_httpchercheurs_edf_comlogicielsefficasSIMP', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 43, 1), ) + + + SIMP = property(__SIMP.value, __SIMP.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}FACT uses Python identifier FACT + __FACT = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'FACT'), 'FACT', '__httpchercheurs_edf_comlogicielsefficas_T_Accas_Common_httpchercheurs_edf_comlogicielsefficasFACT', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 123, 1), ) + + + FACT = property(__FACT.value, __FACT.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}BLOC uses Python identifier BLOC + __BLOC = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'BLOC'), 'BLOC', '__httpchercheurs_edf_comlogicielsefficas_T_Accas_Common_httpchercheurs_edf_comlogicielsefficasBLOC', True, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 157, 1), ) + + + BLOC = property(__BLOC.value, __BLOC.set, None, None) + + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}nom uses Python identifier nom + __nom = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'nom'), 'nom', '__httpchercheurs_edf_comlogicielsefficas_T_Accas_Common_httpchercheurs_edf_comlogicielsefficasnom', AT_nom, required=True) + __nom._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 51, 1) + __nom._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 97, 2) + + nom = property(__nom.value, __nom.set, None, None) + + _ElementMap.update({ + __doc.name() : __doc, + __regles.name() : __regles, + __SIMP.name() : __SIMP, + __FACT.name() : __FACT, + __BLOC.name() : __BLOC + }) + _AttributeMap.update({ + __nom.name() : __nom + }) +Namespace.addCategoryObject('typeBinding', u'T_Accas.Common', T_Accas_Common) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_SIMP with content type ELEMENT_ONLY +class T_SIMP (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_SIMP with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_SIMP') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 167, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is pyxb.binding.datatypes.anyType + + # Element {http://chercheurs.edf.com/logiciels/efficas}doc uses Python identifier doc + __doc = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'doc'), 'doc', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasdoc', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 4, 1), ) + + + doc = property(__doc.value, __doc.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}ValeurDef uses Python identifier ValeurDef + __ValeurDef = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'ValeurDef'), 'ValeurDef', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasValeurDef', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 8, 1), ) + + + ValeurDef = property(__ValeurDef.value, __ValeurDef.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}ValeurSugg uses Python identifier ValeurSugg + __ValeurSugg = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'ValeurSugg'), 'ValeurSugg', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasValeurSugg', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 9, 1), ) + + + ValeurSugg = property(__ValeurSugg.value, __ValeurSugg.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}validators uses Python identifier validators + __validators = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'validators'), 'validators', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasvalidators', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 39, 1), ) + + + validators = property(__validators.value, __validators.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}PlageValeur uses Python identifier PlageValeur + __PlageValeur = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'PlageValeur'), 'PlageValeur', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasPlageValeur', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 40, 1), ) + + + PlageValeur = property(__PlageValeur.value, __PlageValeur.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}typeAttendu uses Python identifier typeAttendu + __typeAttendu = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'typeAttendu'), 'typeAttendu', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficastypeAttendu', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 41, 1), ) + + + typeAttendu = property(__typeAttendu.value, __typeAttendu.set, None, None) + + + # Element {http://chercheurs.edf.com/logiciels/efficas}portee uses Python identifier portee + __portee = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'portee'), 'portee', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasportee', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 44, 1), ) + + + portee = property(__portee.value, __portee.set, None, None) + + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}nom uses Python identifier nom + __nom = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'nom'), 'nom', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasnom', AT_nom, required=True) + __nom._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 51, 1) + __nom._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 181, 2) + + nom = property(__nom.value, __nom.set, None, None) + + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}statut uses Python identifier statut + __statut = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'statut'), 'statut', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasstatut', AT_statut, unicode_default=u'o') + __statut._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 57, 1) + __statut._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 182, 2) + + statut = property(__statut.value, __statut.set, None, None) + + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}max_occurs uses Python identifier max_occurs + __max_occurs = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'max_occurs'), 'max_occurs', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasmax_occurs', AT_max_occurs, unicode_default=u'1') + __max_occurs._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 58, 1) + __max_occurs._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 184, 2) + + max_occurs = property(__max_occurs.value, __max_occurs.set, None, None) + + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}min_occurs uses Python identifier min_occurs + __min_occurs = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'min_occurs'), 'min_occurs', '__httpchercheurs_edf_comlogicielsefficas_T_SIMP_httpchercheurs_edf_comlogicielsefficasmin_occurs', AT_min_occurs, unicode_default=u'1') + __min_occurs._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 59, 1) + __min_occurs._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 183, 2) + + min_occurs = property(__min_occurs.value, __min_occurs.set, None, None) + + _ElementMap.update({ + __doc.name() : __doc, + __ValeurDef.name() : __ValeurDef, + __ValeurSugg.name() : __ValeurSugg, + __validators.name() : __validators, + __PlageValeur.name() : __PlageValeur, + __typeAttendu.name() : __typeAttendu, + __portee.name() : __portee + }) + _AttributeMap.update({ + __nom.name() : __nom, + __statut.name() : __statut, + __max_occurs.name() : __max_occurs, + __min_occurs.name() : __min_occurs + }) +Namespace.addCategoryObject('typeBinding', u'T_SIMP', T_SIMP) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Matrice_double with content type SIMPLE +class T_Matrice_double (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Matrice_double with content type SIMPLE""" + _TypeDefinition = T_list_double + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_SIMPLE + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Matrice_double') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 432, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is T_list_double + + # Attribute n uses Python identifier n + __n = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'n'), 'n', '__httpchercheurs_edf_comlogicielsefficas_T_Matrice_double_n', pyxb.binding.datatypes.integer, required=True) + __n._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 435, 4) + __n._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 435, 4) + + n = property(__n.value, __n.set, None, None) + + + # Attribute m uses Python identifier m + __m = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'm'), 'm', '__httpchercheurs_edf_comlogicielsefficas_T_Matrice_double_m', pyxb.binding.datatypes.integer, required=True) + __m._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 436, 4) + __m._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 436, 4) + + m = property(__m.value, __m.set, None, None) + + _ElementMap.update({ + + }) + _AttributeMap.update({ + __n.name() : __n, + __m.name() : __m + }) +Namespace.addCategoryObject('typeBinding', u'T_Matrice_double', T_Matrice_double) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Matrice_Symetrique_double with content type SIMPLE +class T_Matrice_Symetrique_double (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_Matrice_Symetrique_double with content type SIMPLE""" + _TypeDefinition = T_list_double + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_SIMPLE + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_Matrice_Symetrique_double') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 441, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is T_list_double + + # Attribute n uses Python identifier n + __n = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'n'), 'n', '__httpchercheurs_edf_comlogicielsefficas_T_Matrice_Symetrique_double_n', pyxb.binding.datatypes.int, required=True) + __n._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 444, 4) + __n._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 444, 4) + + n = property(__n.value, __n.set, None, None) + + _ElementMap.update({ + + }) + _AttributeMap.update({ + __n.name() : __n + }) +Namespace.addCategoryObject('typeBinding', u'T_Matrice_Symetrique_double', T_Matrice_Symetrique_double) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_typeAttendu with content type ELEMENT_ONLY +class T_typeAttendu (T_into): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_typeAttendu with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_typeAttendu') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 512, 1) + _ElementMap = T_into._ElementMap.copy() + _AttributeMap = T_into._AttributeMap.copy() + # Base type is T_into + + # Element typesimple ({http://chercheurs.edf.com/logiciels/efficas}typesimple) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_into + + # Element matrice_double ({http://chercheurs.edf.com/logiciels/efficas}matrice_double) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_into + + # Element matrice_symetrique_double ({http://chercheurs.edf.com/logiciels/efficas}matrice_symetrique_double) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_into + + # Element tuple ({http://chercheurs.edf.com/logiciels/efficas}tuple) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_into + + # Element classe_utilisateur ({http://chercheurs.edf.com/logiciels/efficas}classe_utilisateur) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_into + _ElementMap.update({ + + }) + _AttributeMap.update({ + + }) +Namespace.addCategoryObject('typeBinding', u'T_typeAttendu', T_typeAttendu) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_OPER with content type ELEMENT_ONLY +class T_OPER (T_Accas_Common): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_OPER with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_OPER') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 100, 1) + _ElementMap = T_Accas_Common._ElementMap.copy() + _AttributeMap = T_Accas_Common._AttributeMap.copy() + # Base type is T_Accas_Common + + # Element doc ({http://chercheurs.edf.com/logiciels/efficas}doc) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element regles ({http://chercheurs.edf.com/logiciels/efficas}regles) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element {http://chercheurs.edf.com/logiciels/efficas}typeCree uses Python identifier typeCree + __typeCree = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'typeCree'), 'typeCree', '__httpchercheurs_edf_comlogicielsefficas_T_OPER_httpchercheurs_edf_comlogicielsefficastypeCree', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 7, 1), ) + + + typeCree = property(__typeCree.value, __typeCree.set, None, None) + + + # Element SIMP ({http://chercheurs.edf.com/logiciels/efficas}SIMP) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element FACT ({http://chercheurs.edf.com/logiciels/efficas}FACT) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element BLOC ({http://chercheurs.edf.com/logiciels/efficas}BLOC) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Attribute nom inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}subroutine uses Python identifier subroutine + __subroutine = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'subroutine'), 'subroutine', '__httpchercheurs_edf_comlogicielsefficas_T_OPER_httpchercheurs_edf_comlogicielsefficassubroutine', AT_subroutine, unicode_default=u'None') + __subroutine._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 60, 1) + __subroutine._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 106, 4) + + subroutine = property(__subroutine.value, __subroutine.set, None, None) + + _ElementMap.update({ + __typeCree.name() : __typeCree + }) + _AttributeMap.update({ + __subroutine.name() : __subroutine + }) +Namespace.addCategoryObject('typeBinding', u'T_OPER', T_OPER) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_PROC with content type ELEMENT_ONLY +class T_PROC (T_Accas_Common): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_PROC with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_PROC') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 116, 1) + _ElementMap = T_Accas_Common._ElementMap.copy() + _AttributeMap = T_Accas_Common._AttributeMap.copy() + # Base type is T_Accas_Common + + # Element doc ({http://chercheurs.edf.com/logiciels/efficas}doc) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element regles ({http://chercheurs.edf.com/logiciels/efficas}regles) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element SIMP ({http://chercheurs.edf.com/logiciels/efficas}SIMP) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element FACT ({http://chercheurs.edf.com/logiciels/efficas}FACT) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element BLOC ({http://chercheurs.edf.com/logiciels/efficas}BLOC) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Attribute nom inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}subroutine uses Python identifier subroutine + __subroutine = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'subroutine'), 'subroutine', '__httpchercheurs_edf_comlogicielsefficas_T_PROC_httpchercheurs_edf_comlogicielsefficassubroutine', AT_subroutine, unicode_default=u'None') + __subroutine._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 60, 1) + __subroutine._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 119, 4) + + subroutine = property(__subroutine.value, __subroutine.set, None, None) + + _ElementMap.update({ + + }) + _AttributeMap.update({ + __subroutine.name() : __subroutine + }) +Namespace.addCategoryObject('typeBinding', u'T_PROC', T_PROC) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_FACT with content type ELEMENT_ONLY +class T_FACT (T_Accas_Common): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_FACT with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_FACT') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 139, 1) + _ElementMap = T_Accas_Common._ElementMap.copy() + _AttributeMap = T_Accas_Common._AttributeMap.copy() + # Base type is T_Accas_Common + + # Element doc ({http://chercheurs.edf.com/logiciels/efficas}doc) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element regles ({http://chercheurs.edf.com/logiciels/efficas}regles) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element SIMP ({http://chercheurs.edf.com/logiciels/efficas}SIMP) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element FACT ({http://chercheurs.edf.com/logiciels/efficas}FACT) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element BLOC ({http://chercheurs.edf.com/logiciels/efficas}BLOC) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Attribute nom inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}statut uses Python identifier statut + __statut = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'statut'), 'statut', '__httpchercheurs_edf_comlogicielsefficas_T_FACT_httpchercheurs_edf_comlogicielsefficasstatut', AT_statut, unicode_default=u'o') + __statut._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 57, 1) + __statut._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 142, 4) + + statut = property(__statut.value, __statut.set, None, None) + + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}max_occurs uses Python identifier max_occurs + __max_occurs = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'max_occurs'), 'max_occurs', '__httpchercheurs_edf_comlogicielsefficas_T_FACT_httpchercheurs_edf_comlogicielsefficasmax_occurs', AT_max_occurs, unicode_default=u'1') + __max_occurs._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 58, 1) + __max_occurs._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 144, 4) + + max_occurs = property(__max_occurs.value, __max_occurs.set, None, None) + + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}min_occurs uses Python identifier min_occurs + __min_occurs = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'min_occurs'), 'min_occurs', '__httpchercheurs_edf_comlogicielsefficas_T_FACT_httpchercheurs_edf_comlogicielsefficasmin_occurs', AT_min_occurs, unicode_default=u'1') + __min_occurs._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 59, 1) + __min_occurs._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 143, 4) + + min_occurs = property(__min_occurs.value, __min_occurs.set, None, None) + + _ElementMap.update({ + + }) + _AttributeMap.update({ + __statut.name() : __statut, + __max_occurs.name() : __max_occurs, + __min_occurs.name() : __min_occurs + }) +Namespace.addCategoryObject('typeBinding', u'T_FACT', T_FACT) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_BLOC with content type ELEMENT_ONLY +class T_BLOC (T_Accas_Common): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_BLOC with content type ELEMENT_ONLY""" + _TypeDefinition = None + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_BLOC') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 158, 1) + _ElementMap = T_Accas_Common._ElementMap.copy() + _AttributeMap = T_Accas_Common._AttributeMap.copy() + # Base type is T_Accas_Common + + # Element doc ({http://chercheurs.edf.com/logiciels/efficas}doc) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element regles ({http://chercheurs.edf.com/logiciels/efficas}regles) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element SIMP ({http://chercheurs.edf.com/logiciels/efficas}SIMP) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element {http://chercheurs.edf.com/logiciels/efficas}condition uses Python identifier condition + __condition = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'condition'), 'condition', '__httpchercheurs_edf_comlogicielsefficas_T_BLOC_httpchercheurs_edf_comlogicielsefficascondition', False, pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 45, 1), ) + + + condition = property(__condition.value, __condition.set, None, None) + + + # Element FACT ({http://chercheurs.edf.com/logiciels/efficas}FACT) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Element BLOC ({http://chercheurs.edf.com/logiciels/efficas}BLOC) inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + + # Attribute nom inherited from {http://chercheurs.edf.com/logiciels/efficas}T_Accas.Common + _ElementMap.update({ + __condition.name() : __condition + }) + _AttributeMap.update({ + + }) +Namespace.addCategoryObject('typeBinding', u'T_BLOC', T_BLOC) + + +# Complex type {http://chercheurs.edf.com/logiciels/efficas}T_classe_utilisateur_username with content type SIMPLE +class T_classe_utilisateur_username (pyxb.binding.basis.complexTypeDefinition): + """Complex type {http://chercheurs.edf.com/logiciels/efficas}T_classe_utilisateur_username with content type SIMPLE""" + _TypeDefinition = T_classe_utilisateur_name + _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_SIMPLE + _Abstract = False + _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'T_classe_utilisateur_username') + _XSDLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 376, 1) + _ElementMap = {} + _AttributeMap = {} + # Base type is T_classe_utilisateur_name + + # Attribute {http://chercheurs.edf.com/logiciels/efficas}nom uses Python identifier nom + __nom = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(Namespace, u'nom'), 'nom', '__httpchercheurs_edf_comlogicielsefficas_T_classe_utilisateur_username_httpchercheurs_edf_comlogicielsefficasnom', AT_nom, required=True) + __nom._DeclarationLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 51, 1) + __nom._UseLocation = pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 379, 4) + + nom = property(__nom.value, __nom.set, None, None) + + _ElementMap.update({ + + }) + _AttributeMap.update({ + __nom.name() : __nom + }) +Namespace.addCategoryObject('typeBinding', u'T_classe_utilisateur_username', T_classe_utilisateur_username) + + +cata = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'cata'), T_cata, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 5, 1)) +Namespace.addCategoryObject('elementBinding', cata.name().localName(), cata) + +regles = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'regles'), T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 6, 1)) +Namespace.addCategoryObject('elementBinding', regles.name().localName(), regles) + +fonction_utilisateur = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'fonction_utilisateur'), T_fonction_python, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 10, 1)) +Namespace.addCategoryObject('elementBinding', fonction_utilisateur.name().localName(), fonction_utilisateur) + +commandes = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'commandes'), T_commandes, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 11, 1)) +Namespace.addCategoryObject('elementBinding', commandes.name().localName(), commandes) + +validators = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'validators'), T_validators, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 39, 1)) +Namespace.addCategoryObject('elementBinding', validators.name().localName(), validators) + +PlageValeur = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PlageValeur'), T_PlageValeur, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 40, 1)) +Namespace.addCategoryObject('elementBinding', PlageValeur.name().localName(), PlageValeur) + +portee = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'portee'), T_portee, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 44, 1), unicode_default=u'None') +Namespace.addCategoryObject('elementBinding', portee.name().localName(), portee) + +condition = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'condition'), T_fonction_python, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 45, 1)) +Namespace.addCategoryObject('elementBinding', condition.name().localName(), condition) + +into = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'into'), T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 49, 1)) +Namespace.addCategoryObject('elementBinding', into.name().localName(), into) + +A_CLASSER = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'A_CLASSER'), T_predicat2, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 257, 1)) +Namespace.addCategoryObject('elementBinding', A_CLASSER.name().localName(), A_CLASSER) + +tuple = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'tuple'), T_tuple, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 467, 1)) +Namespace.addCategoryObject('elementBinding', tuple.name().localName(), tuple) + +doc = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'doc'), T_doc, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 4, 1)) +Namespace.addCategoryObject('elementBinding', doc.name().localName(), doc) + +typeCree = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'typeCree'), T_classe_utilisateur, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 7, 1)) +Namespace.addCategoryObject('elementBinding', typeCree.name().localName(), typeCree) + +ValeurDef = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'ValeurDef'), T_typeAttendu, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 8, 1)) +Namespace.addCategoryObject('elementBinding', ValeurDef.name().localName(), ValeurDef) + +ValeurSugg = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'ValeurSugg'), T_typeAttendu, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 9, 1)) +Namespace.addCategoryObject('elementBinding', ValeurSugg.name().localName(), ValeurSugg) + +SIMP = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'SIMP'), T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 43, 1)) +Namespace.addCategoryObject('elementBinding', SIMP.name().localName(), SIMP) + +borne_sup = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'borne_sup'), T_typeAttendu, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 46, 1)) +Namespace.addCategoryObject('elementBinding', borne_sup.name().localName(), borne_sup) + +borne_inf = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'borne_inf'), T_typeAttendu, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 47, 1)) +Namespace.addCategoryObject('elementBinding', borne_inf.name().localName(), borne_inf) + +AU_MOINS_UN = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'AU_MOINS_UN'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 258, 1)) +Namespace.addCategoryObject('elementBinding', AU_MOINS_UN.name().localName(), AU_MOINS_UN) + +AU_PLUS_UN = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'AU_PLUS_UN'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 259, 1)) +Namespace.addCategoryObject('elementBinding', AU_PLUS_UN.name().localName(), AU_PLUS_UN) + +ENSEMBLE = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'ENSEMBLE'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 260, 1)) +Namespace.addCategoryObject('elementBinding', ENSEMBLE.name().localName(), ENSEMBLE) + +EXCLUS = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'EXCLUS'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 261, 1)) +Namespace.addCategoryObject('elementBinding', EXCLUS.name().localName(), EXCLUS) + +PRESENT_ABSENT = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_ABSENT'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 269, 1)) +Namespace.addCategoryObject('elementBinding', PRESENT_ABSENT.name().localName(), PRESENT_ABSENT) + +PRESENT_PRESENT = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_PRESENT'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 270, 1)) +Namespace.addCategoryObject('elementBinding', PRESENT_PRESENT.name().localName(), PRESENT_PRESENT) + +UN_PARMI = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'UN_PARMI'), T_predicat1, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 271, 1)) +Namespace.addCategoryObject('elementBinding', UN_PARMI.name().localName(), UN_PARMI) + +matrice_double = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'matrice_double'), T_Matrice_double, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 465, 1)) +Namespace.addCategoryObject('elementBinding', matrice_double.name().localName(), matrice_double) + +matrice_symetrique_double = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'matrice_symetrique_double'), T_Matrice_Symetrique_double, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 466, 1)) +Namespace.addCategoryObject('elementBinding', matrice_symetrique_double.name().localName(), matrice_symetrique_double) + +classe_utilisateur = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'classe_utilisateur'), T_classe_utilisateur, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 468, 1)) +Namespace.addCategoryObject('elementBinding', classe_utilisateur.name().localName(), classe_utilisateur) + +OPER = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'OPER'), T_OPER, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 99, 1)) +Namespace.addCategoryObject('elementBinding', OPER.name().localName(), OPER) + +PROC = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PROC'), T_PROC, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 110, 1)) +Namespace.addCategoryObject('elementBinding', PROC.name().localName(), PROC) + +FACT = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'FACT'), T_FACT, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 123, 1)) +Namespace.addCategoryObject('elementBinding', FACT.name().localName(), FACT) + +BLOC = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'BLOC'), T_BLOC, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 157, 1)) +Namespace.addCategoryObject('elementBinding', BLOC.name().localName(), BLOC) + +typeAttendu = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'typeAttendu'), T_name, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 41, 1)) +Namespace.addCategoryObject('elementBinding', typeAttendu.name().localName(), typeAttendu) + +typesimple = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'typesimple'), T_simple, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 464, 1)) +Namespace.addCategoryObject('elementBinding', typesimple.name().localName(), typesimple) + +classeUtilisateurName = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'classeUtilisateurName'), T_classe_utilisateur_username, abstract=pyxb.binding.datatypes.boolean(1), location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 42, 1)) +Namespace.addCategoryObject('elementBinding', classeUtilisateurName.name().localName(), classeUtilisateurName) + + + +T_cata._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'commandes'), T_commandes, scope=T_cata, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 11, 1))) + +def _BuildAutomaton (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton + del _BuildAutomaton + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 68, 3)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_cata._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'commandes')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 68, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_cata._Automaton = _BuildAutomaton() + + + + +T_commandes._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'OPER'), T_OPER, scope=T_commandes, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 99, 1))) + +T_commandes._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PROC'), T_PROC, scope=T_commandes, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 110, 1))) + +def _BuildAutomaton_ (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_ + del _BuildAutomaton_ + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 72, 2)) + counters.add(cc_0) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_commandes._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'OPER')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 73, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_commandes._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'PROC')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 74, 3)) + st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, True) ])) + st_1._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_commandes._Automaton = _BuildAutomaton_() + + + + +T_PlageValeur._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'borne_sup'), T_typeAttendu, scope=T_PlageValeur, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 46, 1))) + +T_PlageValeur._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'borne_inf'), T_typeAttendu, scope=T_PlageValeur, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 47, 1))) + +T_PlageValeur._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'into'), T_into, scope=T_PlageValeur, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 49, 1))) + +def _BuildAutomaton_2 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_2 + del _BuildAutomaton_2 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 81, 4)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 82, 4)) + counters.add(cc_1) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_PlageValeur._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'borne_sup')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 81, 4)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_1, False)) + symbol = pyxb.binding.content.ElementUse(T_PlageValeur._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'borne_inf')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 82, 4)) + st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_PlageValeur._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'into')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 84, 3)) + st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_2) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, False) ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_1, True) ])) + st_1._set_transitionSet(transitions) + transitions = [] + st_2._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_PlageValeur._Automaton = _BuildAutomaton_2() + + + + +T_predicat2._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'p1'), T_predicat1, scope=T_predicat2, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 252, 3))) + +T_predicat2._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'p2'), AT_nom, scope=T_predicat2, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 253, 3))) + +def _BuildAutomaton_3 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_3 + del _BuildAutomaton_3 + import pyxb.utils.fac as fac + + counters = set() + states = [] + final_update = None + symbol = pyxb.binding.content.ElementUse(T_predicat2._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'p1')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 252, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_predicat2._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'p2')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 253, 3)) + st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + transitions = [] + transitions.append(fac.Transition(st_1, [ + ])) + st_0._set_transitionSet(transitions) + transitions = [] + st_1._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_predicat2._Automaton = _BuildAutomaton_3() + + + + +T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'A_CLASSER'), T_predicat2, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 257, 1))) + +T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'AU_MOINS_UN'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 258, 1))) + +T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'AU_PLUS_UN'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 259, 1))) + +T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'ENSEMBLE'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 260, 1))) + +T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'EXCLUS'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 261, 1))) + +T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_ABSENT'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 269, 1))) + +T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_PRESENT'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 270, 1))) + +T_regles._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'UN_PARMI'), T_predicat1, scope=T_regles, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 271, 1))) + +def _BuildAutomaton_4 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_4 + del _BuildAutomaton_4 + import pyxb.utils.fac as fac + + counters = set() + states = [] + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'A_CLASSER')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 274, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'AU_MOINS_UN')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 275, 3)) + st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'AU_PLUS_UN')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 276, 3)) + st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_2) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'ENSEMBLE')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 277, 3)) + st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_3) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'EXCLUS')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 278, 3)) + st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_4) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_ABSENT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 286, 3)) + st_5 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_5) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'PRESENT_PRESENT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 287, 3)) + st_6 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_6) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_regles._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'UN_PARMI')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 288, 3)) + st_7 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_7) + transitions = [] + transitions.append(fac.Transition(st_0, [ + ])) + transitions.append(fac.Transition(st_1, [ + ])) + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + transitions.append(fac.Transition(st_6, [ + ])) + transitions.append(fac.Transition(st_7, [ + ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_0, [ + ])) + transitions.append(fac.Transition(st_1, [ + ])) + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + transitions.append(fac.Transition(st_6, [ + ])) + transitions.append(fac.Transition(st_7, [ + ])) + st_1._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_0, [ + ])) + transitions.append(fac.Transition(st_1, [ + ])) + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + transitions.append(fac.Transition(st_6, [ + ])) + transitions.append(fac.Transition(st_7, [ + ])) + st_2._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_0, [ + ])) + transitions.append(fac.Transition(st_1, [ + ])) + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + transitions.append(fac.Transition(st_6, [ + ])) + transitions.append(fac.Transition(st_7, [ + ])) + st_3._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_0, [ + ])) + transitions.append(fac.Transition(st_1, [ + ])) + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + transitions.append(fac.Transition(st_6, [ + ])) + transitions.append(fac.Transition(st_7, [ + ])) + st_4._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_0, [ + ])) + transitions.append(fac.Transition(st_1, [ + ])) + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + transitions.append(fac.Transition(st_6, [ + ])) + transitions.append(fac.Transition(st_7, [ + ])) + st_5._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_0, [ + ])) + transitions.append(fac.Transition(st_1, [ + ])) + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + transitions.append(fac.Transition(st_6, [ + ])) + transitions.append(fac.Transition(st_7, [ + ])) + st_6._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_0, [ + ])) + transitions.append(fac.Transition(st_1, [ + ])) + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + transitions.append(fac.Transition(st_6, [ + ])) + transitions.append(fac.Transition(st_7, [ + ])) + st_7._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_regles._Automaton = _BuildAutomaton_4() + + + + +T_into._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'fonction_utilisateur'), T_fonction_python, scope=T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 10, 1))) + +T_into._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'typesimple'), T_simple, scope=T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 464, 1))) + +T_into._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'matrice_double'), T_Matrice_double, scope=T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 465, 1))) + +T_into._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'matrice_symetrique_double'), T_Matrice_Symetrique_double, scope=T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 466, 1))) + +T_into._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'tuple'), T_tuple, scope=T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 467, 1))) + +T_into._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'classe_utilisateur'), T_classe_utilisateur, scope=T_into, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 468, 1))) + +def _BuildAutomaton_5 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_5 + del _BuildAutomaton_5 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 504, 3)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 505, 3)) + counters.add(cc_1) + cc_2 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 506, 3)) + counters.add(cc_2) + cc_3 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 507, 3)) + counters.add(cc_3) + cc_4 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 508, 3)) + counters.add(cc_4) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_into._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'typesimple')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 504, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_1, False)) + symbol = pyxb.binding.content.ElementUse(T_into._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'matrice_double')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 505, 3)) + st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_2, False)) + symbol = pyxb.binding.content.ElementUse(T_into._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'matrice_symetrique_double')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 506, 3)) + st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_2) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_3, False)) + symbol = pyxb.binding.content.ElementUse(T_into._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'tuple')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 507, 3)) + st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_3) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_4, False)) + symbol = pyxb.binding.content.ElementUse(T_into._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'classe_utilisateur')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 508, 3)) + st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_4) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_into._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'fonction_utilisateur')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 509, 3)) + st_5 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_5) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_1, True) ])) + st_1._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_2, True) ])) + st_2._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_3, True) ])) + st_3._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_4, True) ])) + st_4._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_5, [ + ])) + st_5._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_into._Automaton = _BuildAutomaton_5() + + + + +T_Accas_Common._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'doc'), T_doc, scope=T_Accas_Common, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 4, 1))) + +T_Accas_Common._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'regles'), T_regles, scope=T_Accas_Common, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 6, 1))) + +T_Accas_Common._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'SIMP'), T_SIMP, scope=T_Accas_Common, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 43, 1))) + +T_Accas_Common._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'FACT'), T_FACT, scope=T_Accas_Common, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 123, 1))) + +T_Accas_Common._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'BLOC'), T_BLOC, scope=T_Accas_Common, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 157, 1))) + +def _BuildAutomaton_6 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_6 + del _BuildAutomaton_6 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) + counters.add(cc_1) + states = [] + final_update = None + symbol = pyxb.binding.content.ElementUse(T_Accas_Common._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'regles')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_Accas_Common._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'doc')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) + st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_Accas_Common._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'BLOC')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 92, 4)) + st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_2) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_Accas_Common._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'FACT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 93, 4)) + st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_3) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_Accas_Common._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'SIMP')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 94, 4)) + st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_4) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_0, False) ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_1, True) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_1, False) ])) + st_1._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + st_2._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + st_3._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + st_4._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_Accas_Common._Automaton = _BuildAutomaton_6() + + + + +T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'doc'), T_doc, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 4, 1))) + +T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'ValeurDef'), T_typeAttendu, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 8, 1))) + +T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'ValeurSugg'), T_typeAttendu, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 9, 1))) + +T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'validators'), T_validators, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 39, 1))) + +T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'PlageValeur'), T_PlageValeur, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 40, 1))) + +T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'typeAttendu'), T_name, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 41, 1))) + +T_SIMP._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'portee'), T_portee, scope=T_SIMP, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 44, 1), unicode_default=u'None')) + +def _BuildAutomaton_7 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_7 + del _BuildAutomaton_7 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 169, 3)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 170, 3)) + counters.add(cc_1) + cc_2 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 175, 3)) + counters.add(cc_2) + cc_3 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 176, 3)) + counters.add(cc_3) + cc_4 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 177, 3)) + counters.add(cc_4) + cc_5 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 179, 3)) + counters.add(cc_5) + states = [] + final_update = None + symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'doc')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 169, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'portee')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 170, 3)) + st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'ValeurDef')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 175, 3)) + st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_2) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'ValeurSugg')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 176, 3)) + st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_3) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'PlageValeur')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 177, 3)) + st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_4) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'typeAttendu')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 178, 3)) + st_5 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_5) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_5, False)) + symbol = pyxb.binding.content.ElementUse(T_SIMP._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'validators')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 179, 3)) + st_6 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) + states.append(st_6) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_5, [ + fac.UpdateInstruction(cc_0, False) ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_1, True) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_5, [ + fac.UpdateInstruction(cc_1, False) ])) + st_1._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_2, True) ])) + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_2, False) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_2, False) ])) + transitions.append(fac.Transition(st_5, [ + fac.UpdateInstruction(cc_2, False) ])) + st_2._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_3, True) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_3, False) ])) + transitions.append(fac.Transition(st_5, [ + fac.UpdateInstruction(cc_3, False) ])) + st_3._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_4, True) ])) + transitions.append(fac.Transition(st_5, [ + fac.UpdateInstruction(cc_4, False) ])) + st_4._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_6, [ + ])) + st_5._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_6, [ + fac.UpdateInstruction(cc_5, True) ])) + st_6._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_SIMP._Automaton = _BuildAutomaton_7() + + + + +def _BuildAutomaton_8 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_8 + del _BuildAutomaton_8 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 516, 5)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 517, 5)) + counters.add(cc_1) + cc_2 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 518, 5)) + counters.add(cc_2) + cc_3 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 519, 5)) + counters.add(cc_3) + cc_4 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 520, 5)) + counters.add(cc_4) + states = [] + final_update = set() + final_update.add(fac.UpdateInstruction(cc_0, False)) + symbol = pyxb.binding.content.ElementUse(T_typeAttendu._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'typesimple')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 516, 5)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_1, False)) + symbol = pyxb.binding.content.ElementUse(T_typeAttendu._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'matrice_double')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 517, 5)) + st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_2, False)) + symbol = pyxb.binding.content.ElementUse(T_typeAttendu._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'matrice_symetrique_double')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 518, 5)) + st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_2) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_3, False)) + symbol = pyxb.binding.content.ElementUse(T_typeAttendu._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'tuple')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 519, 5)) + st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_3) + final_update = set() + final_update.add(fac.UpdateInstruction(cc_4, False)) + symbol = pyxb.binding.content.ElementUse(T_typeAttendu._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'classe_utilisateur')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 520, 5)) + st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_4) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_1, True) ])) + st_1._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_2, True) ])) + st_2._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_3, True) ])) + st_3._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_4, True) ])) + st_4._set_transitionSet(transitions) + return fac.Automaton(states, counters, True, containing_state=None) +T_typeAttendu._Automaton = _BuildAutomaton_8() + + + + +T_OPER._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'typeCree'), T_classe_utilisateur, scope=T_OPER, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 7, 1))) + +def _BuildAutomaton_9 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_9 + del _BuildAutomaton_9 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) + counters.add(cc_1) + states = [] + final_update = None + symbol = pyxb.binding.content.ElementUse(T_OPER._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'regles')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_OPER._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'doc')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) + st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_OPER._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'BLOC')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 92, 4)) + st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_2) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_OPER._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'FACT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 93, 4)) + st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_3) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_OPER._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'SIMP')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 94, 4)) + st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_4) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_OPER._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'typeCree')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 104, 5)) + st_5 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) + states.append(st_5) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_0, False) ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_1, True) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_1, False) ])) + st_1._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + st_2._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + st_3._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + st_4._set_transitionSet(transitions) + transitions = [] + st_5._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_OPER._Automaton = _BuildAutomaton_9() + + + + +def _BuildAutomaton_10 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_10 + del _BuildAutomaton_10 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) + counters.add(cc_1) + states = [] + final_update = None + symbol = pyxb.binding.content.ElementUse(T_PROC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'regles')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_PROC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'doc')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) + st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_PROC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'BLOC')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 92, 4)) + st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_2) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_PROC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'FACT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 93, 4)) + st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_3) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_PROC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'SIMP')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 94, 4)) + st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_4) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_0, False) ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_1, True) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_1, False) ])) + st_1._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + st_2._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + st_3._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + st_4._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_PROC._Automaton = _BuildAutomaton_10() + + + + +def _BuildAutomaton_11 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_11 + del _BuildAutomaton_11 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) + counters.add(cc_1) + states = [] + final_update = None + symbol = pyxb.binding.content.ElementUse(T_FACT._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'regles')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_FACT._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'doc')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) + st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_FACT._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'BLOC')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 92, 4)) + st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_2) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_FACT._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'FACT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 93, 4)) + st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_3) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_FACT._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'SIMP')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 94, 4)) + st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_4) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_0, False) ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_1, True) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_1, False) ])) + st_1._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + st_2._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + st_3._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + st_4._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_FACT._Automaton = _BuildAutomaton_11() + + + + +T_BLOC._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'condition'), T_fonction_python, scope=T_BLOC, location=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 45, 1))) + +def _BuildAutomaton_12 (): + # Remove this helper function from the namespace after it is invoked + global _BuildAutomaton_12 + del _BuildAutomaton_12 + import pyxb.utils.fac as fac + + counters = set() + cc_0 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) + counters.add(cc_0) + cc_1 = fac.CounterCondition(min=0L, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) + counters.add(cc_1) + states = [] + final_update = None + symbol = pyxb.binding.content.ElementUse(T_BLOC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'regles')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 89, 3)) + st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_0) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_BLOC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'doc')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 90, 3)) + st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_1) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_BLOC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'BLOC')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 92, 4)) + st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_2) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_BLOC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'FACT')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 93, 4)) + st_3 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_3) + final_update = None + symbol = pyxb.binding.content.ElementUse(T_BLOC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'SIMP')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 94, 4)) + st_4 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) + states.append(st_4) + final_update = set() + symbol = pyxb.binding.content.ElementUse(T_BLOC._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'condition')), pyxb.utils.utility.Location('/home/A96028/EchangesEric/EssaiExt/model.xsd', 162, 5)) + st_5 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) + states.append(st_5) + transitions = [] + transitions.append(fac.Transition(st_0, [ + fac.UpdateInstruction(cc_0, True) ])) + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_0, False) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_0, False) ])) + st_0._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_1, [ + fac.UpdateInstruction(cc_1, True) ])) + transitions.append(fac.Transition(st_2, [ + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_3, [ + fac.UpdateInstruction(cc_1, False) ])) + transitions.append(fac.Transition(st_4, [ + fac.UpdateInstruction(cc_1, False) ])) + st_1._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + st_2._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + st_3._set_transitionSet(transitions) + transitions = [] + transitions.append(fac.Transition(st_2, [ + ])) + transitions.append(fac.Transition(st_3, [ + ])) + transitions.append(fac.Transition(st_4, [ + ])) + transitions.append(fac.Transition(st_5, [ + ])) + st_4._set_transitionSet(transitions) + transitions = [] + st_5._set_transitionSet(transitions) + return fac.Automaton(states, counters, False, containing_state=None) +T_BLOC._Automaton = _BuildAutomaton_12() + + +classeUtilisateurName._setSubstitutionGroup(typeAttendu) diff --git a/Med/readerEfficas.py b/Med/readerEfficas.py new file mode 100755 index 00000000..afd12497 --- /dev/null +++ b/Med/readerEfficas.py @@ -0,0 +1,129 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import sys,os +import raw.efficas as efficas +import types + +sys.path.insert(0,os.path.abspath(os.path.join(os.getcwd(),'..'))) +sys.path.insert(0,os.path.abspath(os.path.join(os.getcwd(),'..','UiQT5'))) + + +from Accas import * + + +# Attention pas d heritage possible (cf doc pyxbe) + +dictSIMPEficasXML= { 'typ' : 'typeAttendu', 'statut' : 'statut', + 'min_occurs': 'min' , 'max_occurs' : 'max', + 'homo' : 'homo' , 'position' : 'portee', + 'validators': 'validators' , 'sug' : 'valeur_sugg', + 'defaut' : 'ValeurDef' , 'into' : ('PlageValeur','into'), + 'val_min' : ('PlageValeur','borne_inf') , 'val_max' : ('PlageValeur','borne_sup'), + 'ang' : ('doc','ang') , 'fr' : ('doc','fr',) , + 'docu' : ('doc','docu'),} + +dictSIMPXMLEficas = {'doc' : {'fr' : 'fr' , 'ang' : 'ang' , 'docu' : 'docu' }, + 'PlageValeur' : {'borne_sup' : 'val_max' , 'into' : 'into' , 'borne_inf' : 'val_min' ,}, + 'statut' : 'statut' , 'validators' : 'validators' , 'homo' : 'homo' , + 'ValeurDef' : 'defaut' , 'min' : 'min_occurs' , + 'valeur_sugg' : 'sug' , 'portee' : 'position' , 'max' : 'max_occurs' , } + + +# ------------------------------ +class monSIMP (efficas.T_SIMP): +# ------------------------------ + + def explore(self): + print "je passe dans explore pour SIMP ", self.nom + self.dictArgsEficas={} + self.dictArgsEficas['typ']=self.typeAttendu + for nomXMLArg in dir(self) : + if nomXMLArg in dictSIMPXMLEficas.keys() : + nomEficasArg=dictSIMPXMLEficas[nomXMLArg] + argu=getattr(self,nomXMLArg) + if argu==None : continue + if type(nomEficasArg) == types.DictionaryType: + for nomXML in nomEficasArg.keys(): + arguDecoupe=getattr(argu,nomXML) + nomEficasDecoupe=nomEficasArg[nomXML] + self.dictArgsEficas[nomEficasDecoupe]=arguDecoupe + else : + self.dictArgsEficas[nomEficasArg] = argu + + #if argNew != None : print argNew + self.objAccas=A_SIMP.SIMP(**self.dictArgsEficas) + self.objAccas.nom=self.nom + + def getAccasEquivalent(self): + return self.nom, self.objAccas + +# ------------------------------ +class monPROC(efficas.T_PROC): +# ------------------------------ + def explore(self): + print "je passe dans explore pour PROC ", self.nom + self.dictConstruction={} + self.dictConstruction['nom']=self.nom + + for obj in self.content(): + if hasattr(obj,'explore') : obj.explore () + if hasattr(obj,'getAccasEquivalent') : + nom,objetAccas=obj.getAccasEquivalent() + self.dictConstruction[nom]=objetAccas + self.dictConstruction['op']=None + self.objAccas=A_PROC.PROC(**self.dictConstruction) + print dir(self.objAccas) + print self.objAccas.entites + + +# ------------------------------ +class monFACT(efficas.T_FACT): +# ------------------------------ + def explore(self): + #print "je passe dans explore pour FACT ", self.nom + self.dictConstruction={} + for obj in self.content(): + if hasattr(obj,'explore') : obj.explore + if hasattr(obj,'creeAccasEquivalent') : + nom,objetAccas=obj.creeAccasEquivalent() + self.dictConstruction[nom]=objetAccas + self.objAccas=A_FACT.FACT(**self.dictConstruction) + + def getAccasEquivalent(self): + return self.nom, self.objAccas + + +# ------------------------------ +class monCata(efficas.T_cata): +# ------------------------------ + def exploreCata(self): + # On positionne le contexte ACCAS + self.JdC = JDC_CATA (code = 'MED', execmodul = None,) + objAExplorer=self.commandes[0] + for obj in objAExplorer.content(): + if hasattr(obj,'explore') : obj.explore() + + + +efficas.T_SIMP._SetSupersedingClass(monSIMP) +efficas.T_FACT._SetSupersedingClass(monFACT) +efficas.T_PROC._SetSupersedingClass(monPROC) +efficas.T_cata._SetSupersedingClass(monCata) + +if __name__ == "__main__": +# print dir(efficas) +# print dir(efficas.T_SIMP) + + + xml = open('Cata_MED_FAM.xml').read() + SchemaMed = efficas.CreateFromDocument(xml) + SchemaMed.exploreCata() + + #print dir(efficas.T_SIMP) + #print dir(efficas.T_SIMP) + + #for maCommande in monCata.commandes : + # for monProc in maCommande.PROC: + # for monFact in monProc.FACT: + # for simp in monFact.SIMP: + # simp.creeAccasEquivalent() diff --git a/Noyau/N_ASSD.py b/Noyau/N_ASSD.py index 801df350..1ac832fc 100644 --- a/Noyau/N_ASSD.py +++ b/Noyau/N_ASSD.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -105,11 +105,6 @@ class ASSD(object): def setName(self, nom): """Positionne le nom de self """ - print ('uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu') - print ('uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu') - print ('uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu') - print ('uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu') - print ('uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu') self.nom = nom def isTypCO(self): @@ -238,10 +233,8 @@ class ASSD(object): aTraiter=(self.etape,) while len(listeAttributs) > 0 : attribut=listeAttributs.pop(0) - print ("attribut", attribut) nvListe=[] for mc in aTraiter : - print (mc) try : resultat=mc.getMocle(attribut) if isinstance(resultat,MCList): diff --git a/Noyau/N_BLOC.py b/Noyau/N_BLOC.py index 73d9835f..255b94fa 100644 --- a/Noyau/N_BLOC.py +++ b/Noyau/N_BLOC.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_CO.py b/Noyau/N_CO.py index 998922e6..4f189595 100644 --- a/Noyau/N_CO.py +++ b/Noyau/N_CO.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_CONVERT.py b/Noyau/N_CONVERT.py index b900ade1..2560cadc 100644 --- a/Noyau/N_CONVERT.py +++ b/Noyau/N_CONVERT.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_CR.py b/Noyau/N_CR.py index 95aa455a..858f29b4 100644 --- a/Noyau/N_CR.py +++ b/Noyau/N_CR.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_ETAPE.py b/Noyau/N_ETAPE.py index 3e2da2db..2e6e4db9 100644 --- a/Noyau/N_ETAPE.py +++ b/Noyau/N_ETAPE.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_FACT.py b/Noyau/N_FACT.py index 90753390..a6108272 100644 --- a/Noyau/N_FACT.py +++ b/Noyau/N_FACT.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_FONCTION.py b/Noyau/N_FONCTION.py index 2638cccd..72fe2969 100644 --- a/Noyau/N_FONCTION.py +++ b/Noyau/N_FONCTION.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_FORM.py b/Noyau/N_FORM.py index 0521db73..9ec437dc 100644 --- a/Noyau/N_FORM.py +++ b/Noyau/N_FORM.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_FORM_ETAPE.py b/Noyau/N_FORM_ETAPE.py index 4b6aad4f..ec62c461 100644 --- a/Noyau/N_FORM_ETAPE.py +++ b/Noyau/N_FORM_ETAPE.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_GEOM.py b/Noyau/N_GEOM.py index 816fd422..5f0cec66 100644 --- a/Noyau/N_GEOM.py +++ b/Noyau/N_GEOM.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_JDC.py b/Noyau/N_JDC.py index 22d565c0..b12f002b 100644 --- a/Noyau/N_JDC.py +++ b/Noyau/N_JDC.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_JDC_CATA.py b/Noyau/N_JDC_CATA.py index 9ff694e4..7f9368ab 100644 --- a/Noyau/N_JDC_CATA.py +++ b/Noyau/N_JDC_CATA.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_LASSD.py b/Noyau/N_LASSD.py index 31669567..a4840a51 100644 --- a/Noyau/N_LASSD.py +++ b/Noyau/N_LASSD.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_MACRO.py b/Noyau/N_MACRO.py index e7069e03..c15a70e6 100644 --- a/Noyau/N_MACRO.py +++ b/Noyau/N_MACRO.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_MACRO_ETAPE.py b/Noyau/N_MACRO_ETAPE.py index 4fda6801..619b9676 100644 --- a/Noyau/N_MACRO_ETAPE.py +++ b/Noyau/N_MACRO_ETAPE.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_MCBLOC.py b/Noyau/N_MCBLOC.py index a0305414..007eac77 100644 --- a/Noyau/N_MCBLOC.py +++ b/Noyau/N_MCBLOC.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_MCCOMPO.py b/Noyau/N_MCCOMPO.py index 15f27b9a..88ed885b 100644 --- a/Noyau/N_MCCOMPO.py +++ b/Noyau/N_MCCOMPO.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_MCFACT.py b/Noyau/N_MCFACT.py index 3974cdb6..1b2bcd94 100644 --- a/Noyau/N_MCFACT.py +++ b/Noyau/N_MCFACT.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_MCLIST.py b/Noyau/N_MCLIST.py index 5d693ed9..edf97d33 100644 --- a/Noyau/N_MCLIST.py +++ b/Noyau/N_MCLIST.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_MCSIMP.py b/Noyau/N_MCSIMP.py index 92d007eb..979bddae 100644 --- a/Noyau/N_MCSIMP.py +++ b/Noyau/N_MCSIMP.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_OBJECT.py b/Noyau/N_OBJECT.py index 45891db4..d7f829df 100644 --- a/Noyau/N_OBJECT.py +++ b/Noyau/N_OBJECT.py @@ -1,5 +1,5 @@ ## coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_OPER.py b/Noyau/N_OPER.py index 22263f3c..512b1218 100644 --- a/Noyau/N_OPER.py +++ b/Noyau/N_OPER.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_OPS.py b/Noyau/N_OPS.py index d835a6a4..9ff0efdd 100644 --- a/Noyau/N_OPS.py +++ b/Noyau/N_OPS.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_PROC.py b/Noyau/N_PROC.py index 97c120df..8e6a0993 100644 --- a/Noyau/N_PROC.py +++ b/Noyau/N_PROC.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_PROC_ETAPE.py b/Noyau/N_PROC_ETAPE.py index 7611d57b..fde2ac79 100644 --- a/Noyau/N_PROC_ETAPE.py +++ b/Noyau/N_PROC_ETAPE.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_REGLE.py b/Noyau/N_REGLE.py index 4f09b7f6..ff0fd8be 100644 --- a/Noyau/N_REGLE.py +++ b/Noyau/N_REGLE.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_SENSIBILITE.py b/Noyau/N_SENSIBILITE.py index bd6fbd5e..8ba50089 100644 --- a/Noyau/N_SENSIBILITE.py +++ b/Noyau/N_SENSIBILITE.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_SIMP.py b/Noyau/N_SIMP.py index 40b8452d..34e22b20 100644 --- a/Noyau/N_SIMP.py +++ b/Noyau/N_SIMP.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_UserASSD.py b/Noyau/N_UserASSD.py index 6ed18126..a20f046f 100644 --- a/Noyau/N_UserASSD.py +++ b/Noyau/N_UserASSD.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_VALIDATOR.py b/Noyau/N_VALIDATOR.py index df36f26b..b49decfc 100644 --- a/Noyau/N_VALIDATOR.py +++ b/Noyau/N_VALIDATOR.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N__F.py b/Noyau/N__F.py index 95527da7..122719d2 100644 --- a/Noyau/N__F.py +++ b/Noyau/N__F.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_types.py b/Noyau/N_types.py index fdc0af77..d6e889e3 100644 --- a/Noyau/N_types.py +++ b/Noyau/N_types.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/N_utils.py b/Noyau/N_utils.py index c5be200c..21e928fd 100644 --- a/Noyau/N_utils.py +++ b/Noyau/N_utils.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/nommage.py b/Noyau/nommage.py index 5966f9fd..a636018e 100644 --- a/Noyau/nommage.py +++ b/Noyau/nommage.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Noyau/strfunc.py b/Noyau/strfunc.py index 1cb1f51d..b4565567 100644 --- a/Noyau/strfunc.py +++ b/Noyau/strfunc.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Aster/__init__.py b/OldCodes/Aster/__init__.py index 8ed65e16..5b4f0e3b 100644 --- a/OldCodes/Aster/__init__.py +++ b/OldCodes/Aster/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Aster/configuration_ASTER.py b/OldCodes/Aster/configuration_ASTER.py index 4851738f..20e2f595 100644 --- a/OldCodes/Aster/configuration_ASTER.py +++ b/OldCodes/Aster/configuration_ASTER.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Aster/prefs.py b/OldCodes/Aster/prefs.py index b4663f8f..8210a6b0 100644 --- a/OldCodes/Aster/prefs.py +++ b/OldCodes/Aster/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Aster/prefs_ASTER.py b/OldCodes/Aster/prefs_ASTER.py index f9aa732c..8e5c51e4 100644 --- a/OldCodes/Aster/prefs_ASTER.py +++ b/OldCodes/Aster/prefs_ASTER.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Aster/properties.py b/OldCodes/Aster/properties.py index 3e8be170..fe6ffb0d 100644 --- a/OldCodes/Aster/properties.py +++ b/OldCodes/Aster/properties.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Aster/qtEficas_aster.py b/OldCodes/Aster/qtEficas_aster.py index f49b9bcb..336afdff 100755 --- a/OldCodes/Aster/qtEficas_aster.py +++ b/OldCodes/Aster/qtEficas_aster.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Aster/qtGroup.py b/OldCodes/Aster/qtGroup.py index 308eda6b..af68952c 100755 --- a/OldCodes/Aster/qtGroup.py +++ b/OldCodes/Aster/qtGroup.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Aster/style.py b/OldCodes/Aster/style.py index 7ee50545..316b4d1f 100644 --- a/OldCodes/Aster/style.py +++ b/OldCodes/Aster/style.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Carmel3D/CMakeLists.txt b/OldCodes/Carmel3D/CMakeLists.txt new file mode 100644 index 00000000..2f241464 --- /dev/null +++ b/OldCodes/Carmel3D/CMakeLists.txt @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + + +install ( FILES + qtEficas_Carmel3D.py prefs_CARMEL3D.py prefs.py configuration_CARMEL3D.py + Carmel3D_Cata_frequentiel_V0.py opsCarmel.py ajoutGroupe.py + DESTINATION ${CMAKE_INSTALL_PREFIX}/Carmel3D + ) + +add_subdirectory (materiaux) + +### Local Variables: +### mode: cmake +### End: diff --git a/OldCodes/Carmel3D/Carmel3D_Cata_V0.py b/OldCodes/Carmel3D/Carmel3D_Cata_V0.py new file mode 100644 index 00000000..4e05a02d --- /dev/null +++ b/OldCodes/Carmel3D/Carmel3D_Cata_V0.py @@ -0,0 +1,553 @@ +# -*- coding: utf-8 -*- +# -------------------------------------------------- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# -------------------------------------------------- + +import os +import sys +from Accas import * +import types +from decimal import Decimal +# repertoire ou sont stockés le catalogue carmel3d +# et les fichiers de donnees des materiaux de reference +from prefs_CARMEL3D import repIni + +#print "catalogue carmel" +#print "repIni = ", repIni + +# Version du catalogue +VERSION_CATA = "2.3.1 for harmonic problems" +# -------------------------------------------------- +# definition d une classe pour les materiaux +# definition d une classe pour les sources +# definition d une classe pour les groupes de mailles +# -------------------------------------------------- +class material ( ASSD ) : pass +class source ( ASSD ) : pass +class grmaille ( ASSD ) : pass + +#CONTEXT.debug = 1 +# -------------------------------------------------- +# déclaration du jeu de commandes : 1ere instruction du catalogue obligatoire +#--------------------------------------------------- + +JdC = JDC_CATA ( code = 'CARMEL3D', +# execmodul = None, + regles =( + AU_MOINS_UN ('MATERIAL','INCLUDE'), + ENSEMBLE ('SOURCE','MESHGROUP'), + ), + ) # Fin JDC_CATA +##========================================================= +# création d'une macro pour traiter les INCLUDE +# +#---------------------------------------------------------- + +import opsCarmel +INCLUDE = MACRO ( nom = "INCLUDE", + op = None, + UIinfo = { "groupes" : ( "Gestion du travail", ) }, + sd_prod = opsCarmel.INCLUDE, + op_init = opsCarmel.INCLUDE_context, + fichier_ini = 1, + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'comm Files (*.comm);;All Files (*)',), + fr = u"bibliothèque des matériaux", + ang = "material library file", + ), + + ) # Fin MACRO + +# -------------------------------------------------- +# definition de groupe de mailles +# il est associe a un materiau ou a une source +#--------------------------------------------------- + +MESHGROUP = OPER (nom = "MESHGROUP", + op = None, + repetable = 'n', + UIinfo= {"groupes":("Definition",)}, + fr= u"attribution d'un matériau ou d'une source à un groupe du maillage", + ang = "mesh group association to material or source", + sd_prod= grmaille, + regles =( + EXCLUS ('MATERIAL','SOURCE'), + ), + +# ---------------------------------------------------------- +# le mot cle SIMP doit etre facultatif sinon la recuperation +# des groupes de mailles sous SALOME ne fonctionne pas car +# le concept ne peut pas etre nomme car non valide +#----------------------------------------------------------- + MATERIAL = SIMP (statut="f", + typ=(material,), + ang="name of the linked material", + fr =u"nom du matériau associé", + ), + SOURCE = SIMP (statut="f", + typ=(source,), + ang="name of the linked source", + fr =u"nom de la source associée", + ), + ) + + +#====================================================================== +# le fichier .PHYS contient 3 blocs et jusqu'a 3 niveaux de sous-blocs +# +#====================================================================== +# 1er bloc : bloc VERSION +# ce bloc est volontairement cache dans l IHM +#=================================================== + +VERSION = PROC ( nom = "VERSION", + op = None, + repetable = 'n', + UIinfo= {"groupes":("CACHE",)}, + ang= "version block definition", + +#---------------------- +# Liste des parametres +#---------------------- + + NUM = SIMP (statut="o", + typ="I", + defaut=1, + ang="version number of the physical model", + into=( 1,), + ), + FILETYPE = SIMP (statut="o", + typ="TXM", + defaut="PHYS", + ang="file type", + into=( "PHYS",), + ), + +) # Fin PROC VERSION + +#=================================================================== +# 2eme bloc : bloc MATERIALS +#=================================================================== +# definition des matériaux utilisateurs +# a partir des materiaux de reference ou de materiaux generiques +#------------------------------------------------------------------- +# +MATERIAL = OPER (nom = "MATERIAL", + op = None, + repetable = 'n', + ang= "material block definition", + fr= u"définition d'un matériau", + sd_prod= material, + regles=EXCLUS('PERMITTIVITY','CONDUCTIVITY'), + +#--------------------------------------------------------------------- +# liste des matériaux de reference fournis par THEMIS et des +# materiaux generiques (les materiaux generiques peuvent etre utilises +# si aucun materiau de reference ne convient) +#--------------------------------------------------------------------- +# debut commentaire PN pour que le fichier materiaux soit valide +# TYPE = SIMP(statut='o', + MAT_REF = SIMP(statut='f', + typ='TXM', + into=( +# matériaux génériques + "DIELECTRIC", + "CONDUCTOR", + "ZINSULATOR","ZSURFACIC", + "NILMAT","EM_ISOTROPIC","EM_ANISOTROPIC", + ), + ang = "generic materials list", + fr = u"liste des matériaux génériques", + ), + +############################################################################## +# Remarque generale a tous les materiaux : +# pour conserver l'affichage scientifique le nombre derriere l'exposant doit +# etre strictement superieur au nombre de decimales +# + +##---------------------------------------------------------------------------------------------- +# Données de perméabilité, utilisée pour les diélectriques, conducteurs et impédances de surface +#----------------------------------------------------------------------------------------------- + #HAS_PERMEABILITY = BLOC(condition="TYPE in ('DIELECTRIC','CONDUCTOR','ZSURFACIC')", + +#------------------------------------------------ +# sous bloc niveau 2 : PERMEABILITY +#------------------------------------------------ +# + PERMEABILITY = FACT ( statut="f", + ang ="Permeability properties", + fr =u"propriétés de perméabilité du matériau", + HOMOGENEOUS = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is homogeneous or not", + fr = u"le matériau est homogène ou non", + ), + ISOTROPIC = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is isotropic or not", + fr = u"le matériau est isotrope ou non", + ), + HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", + TYPE_LAW = SIMP (statut="o", + typ="TXM", + defaut="LINEAR_REAL", + into = ("LINEAR_REAL","NONLINEAR"), + ang = "harmonic or time-domain linear or nonlinear law only for homogeneous and isotropic materials", + fr = u"loi linéaire (fréquentielle ou temporelle) ou non (homogène et isotrope seulement)", + ), + VALUE = SIMP (statut="o", + typ="C", + defaut=('RI',1,0), + ang = "Relative linear permeability value, also used at first nonlinear iteration", + fr = u"Valeur de la perméabilité relative à l'air utilisée pour une loi linéaire ou pour la première itération non-linéaire", + ), + NONLINEAR_LAW_PROPERTIES = BLOC (condition="LAW=='NONLINEAR'", + NATURE = SIMP (statut="o", + typ="TXM", + defaut="MARROCCO", + into = ("SPLINE","MARROCCO","MARROCCO+SATURATION"), + ang = "nature law", + fr = u"nature de la loi", + ), + SPLINE_LAW_PROPERTIES = BLOC (condition="NATURE=='SPLINE'", + FILENAME = SIMP (statut="o", + typ=("FichierNoAbs",'All Files (*)',), # l'existence du fichier n'est pas vérifiée + ang="data file name", + fr =u"nom du fichier contenant les mesures expérimentales B(H)", + ), + ), # Fin BLOC SPLINE_PROPERTIES + MARROCCO_LAW_PROPERTIES = BLOC (condition="NATURE in ('MARROCCO','MARROCCO+SATURATION')", + ALPHA = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="alpha parameter", + fr =u"paramètre alpha de la loi de Marrocco" , + ), + TAU = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="tau parameter", + fr =u"paramètre tau de la loi de Marrocco" , + ), + C = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="c parameter", + fr =u"paramètre c de la loi de Marrocco" , + ), + EPSILON = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="epsilon parameter", + fr =u"paramètre epsilon de la loi de Marrocco" , + ), + ), # Fin BLOC MARROCCO_LAW_PROPERTIES + SATURATION_LAW_PROPERTIES = BLOC (condition="NATURE=='MARROCCO+SATURATION'", + BMAX = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="intersection B", + fr = u"valeur de B marquant la fin de la loi de Marrocco et le début du raccord à la loi de saturation", + ), + HSAT = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="H value", + fr = u"valeur de H définissant la loi de saturation", + ), + BSAT = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="B value", + fr = u"valeur de B définissant la loi de saturation", + ), + JOIN = SIMP (statut="o", + typ="TXM", + defaut="SPLINE", + into= ("SPLINE","PARABOLIC","LINEAR"), + ang="type of join between laws", + fr =u"type de raccord entre la loi choisie et la loi de saturation" , + ), + ), # Fin BLOC SATURATION_LAW_PROPERTIES + APPLIEDTO = SIMP (statut="o", + typ="TXM", + into=("B(H)&H(B)","B(H)","H(B)"), + defaut="B(H)&H(B)", + ang="join applied to", + fr =u"Le raccord tel que défini est appliqué à la courbe B(H) seulement, à la courbe H(B) seulement ou aux deux courbes à la fois. Dans les deux premiers cas, le raccord de la courbe H(B) est inversé numériquement à partir du raccord défini pour la courbe B(H), et vice-versa.", + ), + ), # Fin BLOC NONLINEAR_LAW_PROPERTIES + ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES + ), # fin FACT PERMEABILITY + #), # Fin BLOC HAS_PERMEABILITY + +##------------------------------------------------------------------ +# Données de permittivité, utilisée pour les diélectriques seulement +#------------------------------------------------------------------- + #HAS_PERMITTIVITY = BLOC(condition="TYPE == 'DIELECTRIC'", + +#------------------------------------------------ +# sous bloc niveau 2 : PERMITTIVITY +#------------------------------------------------ + PERMITTIVITY = FACT ( statut="f", + ang ="Permittivity properties", + fr = u"propriétés de permittivité du matériau", + HOMOGENEOUS = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is homogeneous or not", + fr = u"le matériau est homogène ou non", + ), + ISOTROPIC = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is isotropic or not", + fr = u"le matériau est isotrope ou non", + ), + HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", + LAW = SIMP (statut="o", + typ="TXM", + defaut="LINEAR", + into = ("LINEAR",), + ang = "linear law", + fr = u"loi linéaire", + ), + VALUE = SIMP (statut="o", + typ="C", + defaut=('RI',1,0), + ang = "enter a complex relative value", + fr = u"saisir une valeur complexe relative", + ), + ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES + ), # fin FACT PERMITTIVITY + + #), # Fin BLOC HAS_PERMITTIVITY + +##---------------------------------------------------------------------------------------------- +# Données de conductivité, utilisée pour les conducteurs et impédances de surface +#----------------------------------------------------------------------------------------------- + #HAS_CONDUCTIVITY = BLOC(condition="TYPE in ('CONDUCTOR','ZSURFACIC')", +#------------------------------------------------ +# sous bloc niveau 2 : CONDUCTIVITY +#------------------------------------------------ + CONDUCTIVITY = FACT ( statut="f", + ang ="Permittivity properties", + fr = u"propriétés de permittivité du matériau", + HOMOGENEOUS = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is homogeneous or not", + fr = u"le matériau est homogène ou non", + ), + ISOTROPIC = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is isotropic or not", + fr = u"le matériau est isotrope ou non", + ), + HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", + LAW = SIMP (statut="o", + typ="TXM", + defaut="LINEAR", + into = ("LINEAR",), + ang = "linear law", + fr = u"loi linéaire", + ), + VALUE = SIMP (statut="o", + typ="C", + defaut=('RI',1,0), + ang = "enter a complex relative value", + fr = u"saisir une valeur complexe relative", + ), + ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES + ), # fin FACT CONDUCTIVITY + + #), # Fin BLOC HAS_CONDUCTICITY + +################################################################################################### +#--------------------------------------------- +# sous bloc niveau 1 +#--------------------------------------- +# matériau generique de type ZINSULATOR +#--------------------------------------- + +# aucun parametre a saisir pour ce materiau + + +################################################################################################### +#--------------------------------------------- +# sous bloc niveau 1 +#--------------------------------------------- +# matériau generique de type NILMAT (fictif) +#--------------------------------------------- + +# aucun parametre a saisir pour ce materiau + + +################################################################################################### +#---------------------------------------------------------- +# sous bloc niveau 1 : EM_ISOTROPIC_FILES +#------------------------------------------------- +# matériau isotropique non homogene generique +#------------------------------------------------- + EM_ISOTROPIC_properties=BLOC(condition="TYPE=='EM_ISOTROPIC'", + + CONDUCTIVITY_File = SIMP (statut="o", + typ=("FichierNoAbs",'MED Files (*.med)',), + ang="CONDUCTIVITY MED data file name", + fr = u"nom du fichier MED CONDUCTIVITY", + ), + PERMEABILITY_File = SIMP (statut="o", + typ=("FichierNoAbs",'MED Files (*.med)',), + ang="PERMEABILITY MED data file name", + fr = u"nom du fichier MED PERMEABILITY", + ), + ), # fin bloc EM_ISOTROPIC_properties + + +#--------------------------------------------------- +# matériau anisotropique non homogene generique +#--------------------------------------------------- + EM_ANISOTROPIC_properties=BLOC(condition="TYPE=='EM_ANISOTROPIC'", + + PERMEABILITY_File = SIMP (statut="o", + #typ=("Fichier",'.mater Files (*.mater)'), # le fichier doit exister dans le répertoire d'où on lancer Eficas si le fichier est défini par un nom relatif, ce qui est trop contraignant + #typ=("Fichier",'.mater Files (*.mater)','Sauvegarde'), # Le fichier peut ne pas exister, mais on propose de le sauvegarder et d'écraser un fichier existant : pas approprié + typ=("FichierNoAbs",'.mater Files (*.mater)'), # l'existence du fichier n'est pas vérifiée, mais on peut le sélectionner quand même via la navigateur. C'est suffisant et permet une bibliothèque de matériaux. + ang="PERMEABILITY .mater data file name", + fr ="nom du fichier .mater PERMEABILITY", + ), + CONDUCTIVITY_File = SIMP (statut="o", + typ=("FichierNoAbs",'.mater Files (*.mater)'), + ang="CONDUCTIVITY .mater data file name", + fr ="nom du fichier .mater CONDUCTIVITY", + ), + ), # fin bloc EM_ANISOTROPIC_properties + + +) # fin OPER MATERIAL + +#=================================================================== +# 3eme bloc : bloc SOURCES +#==================================================================== +# definition des differentes sources qui seront dans le bloc SOURCES +#------------------------------------------------------------------- +# + +SOURCE = OPER ( nom = "SOURCE", + op = None, + repetable = 'n', + ang = "source definition", + fr = u"définition d'une source", + sd_prod = source, + regles = (UN_PARMI('STRANDED_INDUCTOR','HPORT','EPORT'), # choix d'un type de source + UN_PARMI('WAVEFORM_CONSTANT','WAVEFORM_SINUS'), # choix d'une forme de source + ), + +#---------------------------------------------------------- +# sous bloc niveau 1 : stranded inductor source +##--------------------------------------------------------- + STRANDED_INDUCTOR = FACT(statut='f', + ang="Stranded inductor source", + fr=u"source de type inducteur bobiné", + NTURNS = SIMP (statut="o", + typ="I", + defaut=1, + ang="number of turns in the inductor", + fr= u"nombre de tours dans l'inducteur bobiné", + ), + TYPE = SIMP (statut="o", + typ="TXM", + defaut="CURRENT", + into=("CURRENT",), + fr= u"source de type courant", + ang="current source type", + ), + ), # FIN de FACT STRANDED_INDUCTOR + HPORT = FACT(statut='f', + ang="Magnetic port source", + fr=u"source de type port magnétique", + TYPE = SIMP (statut="o", + typ="TXM", + into=("VOLTAGE","CURRENT"), + fr= u"source de type tension ou courant", + ang="voltage or current source type", + ), + ), # FIN de FACT HPORT + EPORT = FACT(statut='f', + ang="Electric port source", + fr=u"source de type port électrique", + TYPE = SIMP (statut="o", + typ="TXM", + into=("VOLTAGE","CURRENT"), + fr= u"source de type tension ou courant", + ang="voltage or current source type", + ), + ), # FIN de FACT EPORT + WAVEFORM_CONSTANT = FACT(statut='f', + ang="constant source", + fr=u"source constante", + AMPLITUDE = SIMP (statut="o", + typ="R", + defaut=1, + ang = "enter the source magnitude value, in A or V units", + fr = u"saisir la valeur de l'amplitude de la source, en unités A ou V", + ), + ), # FIN de FACT WAVEFORM_CONSTANT + WAVEFORM_SINUS = FACT(statut='f', + ang="sinus variation source", + fr=u"source variant avec une forme sinusoïdale, définie par son amplitude, sa fréquence et sa phase", + AMPLITUDE = SIMP (statut="o", + typ="R", + defaut=1, + ang = "enter the source magnitude value, in A or V units", + fr = u"saisir la valeur de l'amplitude de la source, en unités A ou V", + ), + FREQUENCY = SIMP (statut="o", + typ="R", + defaut=50.0, + ang = "enter the source frequency value, in Hz units", + fr = u"saisir la valeur de la fréquence de la source, en Hz", + ), + PHASE = SIMP (statut="o", + typ="R", + defaut=0.0, + ang = "enter the source phase value, in degrees units", + fr = u"saisir la valeur de la phase de la source, en degrés", + ), + ), # FIN de FACT WAVEFORM_SINUS +) # Fin OPER SOURCE diff --git a/OldCodes/Carmel3D/Carmel3D_Cata_frequentiel_V0.py b/OldCodes/Carmel3D/Carmel3D_Cata_frequentiel_V0.py new file mode 100755 index 00000000..1a3c84c0 --- /dev/null +++ b/OldCodes/Carmel3D/Carmel3D_Cata_frequentiel_V0.py @@ -0,0 +1,552 @@ +# -*- coding: utf-8 -*- +# -------------------------------------------------- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# -------------------------------------------------- + +import os +import sys +from Accas import * +import types +from decimal import Decimal +# repertoire ou sont stockés le catalogue carmel3d +# et les fichiers de donnees des materiaux de reference +from prefs_CARMEL3D import repIni + +#print "catalogue carmel" +#print "repIni = ", repIni + +# Version du catalogue +VERSION_CATA = "2.3.1 for harmonic problems" +# -------------------------------------------------- +# definition d une classe pour les materiaux +# definition d une classe pour les sources +# definition d une classe pour les groupes de mailles +# -------------------------------------------------- +class material ( ASSD ) : pass +class source ( ASSD ) : pass +class grmaille ( ASSD ) : pass + +#CONTEXT.debug = 1 +# -------------------------------------------------- +# déclaration du jeu de commandes : 1ere instruction du catalogue obligatoire +#--------------------------------------------------- + +##========================================================= +JdC = JDC_CATA ( code = 'CARMEL3D', +# execmodul = None, + regles =( + AU_MOINS_UN ('MATERIAL','INCLUDE'), + AU_MOINS_UN ('SOURCE','INCLUDE'), + AU_MOINS_UN ('MESHGROUP'), + ), + ) # Fin JDC_CATA +##========================================================= +# création d'une macro pour traiter les INCLUDE +# +#---------------------------------------------------------- + +import opsCarmel +INCLUDE = MACRO ( nom = "INCLUDE", + op = None, + UIinfo = { "groupes" : ( "Gestion du travail", ) }, + sd_prod = opsCarmel.INCLUDE, + op_init = opsCarmel.INCLUDE_context, + fichier_ini = 1, + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'comm Files (*.comm);;All Files (*)',), + fr = u"bibliothèque des matériaux", + ang = "material library file", + ), + + ) # Fin MACRO +# -------------------------------------------------- +# definition de groupe de mailles +# il est associe a un materiau ou a une source +#--------------------------------------------------- + +MESHGROUP = OPER (nom = "MESHGROUP", + op = None, + repetable = 'n', + UIinfo= {"groupes":("Definition",)}, + fr= u"attribution d'un matériau ou d'une source à un groupe du maillage", + ang = "mesh group association to material or source", + sd_prod= grmaille, + regles =( + EXCLUS ('MATERIAL','SOURCE'), + ), + +# ---------------------------------------------------------- +# le mot cle SIMP doit etre facultatif sinon la recuperation +# des groupes de mailles sous SALOME ne fonctionne pas car +# le concept ne peut pas etre nomme car non valide +#----------------------------------------------------------- + MATERIAL = SIMP (statut="f", + typ=(material,), + ang="name of the linked material", + fr =u"nom du matériau associé", + ), + SOURCE = SIMP (statut="f", + typ=(source,), + ang="name of the linked source", + fr =u"nom de la source associée", + ), + ) + + +#====================================================================== +# le fichier .PHYS contient 3 blocs et jusqu'a 3 niveaux de sous-blocs +# +#====================================================================== +# 1er bloc : bloc VERSION +# ce bloc est volontairement cache dans l IHM +#=================================================== + +VERSION = PROC ( nom = "VERSION", + op = None, + repetable = 'n', + UIinfo= {"groupes":("CACHE",)}, + ang= "version block definition", + +#---------------------- +# Liste des parametres +#---------------------- + + NUM = SIMP (statut="o", + typ="I", + defaut=1, + ang="version number of the physical model", + into=( 1,), + ), + FILETYPE = SIMP (statut="o", + typ="TXM", + defaut="PHYS", + ang="file type", + into=( "PHYS",), + ), + +) # Fin PROC VERSION + +#=================================================================== +# 2eme bloc : bloc MATERIALS +#=================================================================== +# definition des matériaux utilisateurs +# a partir des materiaux de reference ou de materiaux generiques +#------------------------------------------------------------------- +# +MATERIAL = OPER (nom = "MATERIAL", + op = None, + repetable = 'n', + ang= "material block definition", + fr= u"définition d'un matériau", + sd_prod= material, + regles=EXCLUS('PERMITTIVITY','CONDUCTIVITY'), + +#--------------------------------------------------------------------- +# liste des matériaux de reference fournis par THEMIS et des +# materiaux generiques (les materiaux generiques peuvent etre utilises +# si aucun materiau de reference ne convient) +#--------------------------------------------------------------------- + TYPE = SIMP(statut='o', + typ='TXM', + into=( +# matériaux génériques + "DIELECTRIC", + "CONDUCTOR", + "ZINSULATOR","ZSURFACIC", + "NILMAT","EM_ISOTROPIC","EM_ANISOTROPIC", + ), + ang = "generic materials list", + fr = u"liste des matériaux génériques", + ), + +############################################################################## +# Remarque generale a tous les materiaux : +# pour conserver l'affichage scientifique le nombre derriere l'exposant doit +# etre strictement superieur au nombre de decimales +# + +##---------------------------------------------------------------------------------------------- +# Données de perméabilité, utilisée pour les diélectriques, conducteurs et impédances de surface +#----------------------------------------------------------------------------------------------- + #HAS_PERMEABILITY = BLOC(condition="TYPE in ('DIELECTRIC','CONDUCTOR','ZSURFACIC')", + +#------------------------------------------------ +# sous bloc niveau 2 : PERMEABILITY +#------------------------------------------------ +# + PERMEABILITY = FACT ( statut="f", + ang ="Permeability properties", + fr =u"propriétés de perméabilité du matériau", + HOMOGENEOUS = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is homogeneous or not", + fr = u"le matériau est homogène ou non", + ), + ISOTROPIC = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is isotropic or not", + fr = u"le matériau est isotrope ou non", + ), + HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", + LAW = SIMP (statut="o", + typ="TXM", + defaut="LINEAR", + into = ("LINEAR","NONLINEAR"), + ang = "harmonic or time-domain linear or nonlinear law only for homogeneous and isotropic materials", + fr = u"loi linéaire (fréquentielle ou temporelle) ou non (homogène et isotrope seulement)", + ), + VALUE = SIMP (statut="o", + typ="C", + defaut=('RI',1,0), + ang = "Relative linear permeability value, also used at first nonlinear iteration", + fr = u"Valeur de la perméabilité relative à l'air utilisée pour une loi linéaire ou pour la première itération non-linéaire", + ), + NONLINEAR_LAW_PROPERTIES = BLOC (condition="LAW=='NONLINEAR'", + NATURE = SIMP (statut="o", + typ="TXM", + defaut="MARROCCO", + into = ("SPLINE","MARROCCO","MARROCCO+SATURATION"), + ang = "nature law", + fr = u"nature de la loi", + ), + SPLINE_LAW_PROPERTIES = BLOC (condition="NATURE=='SPLINE'", + FILENAME = SIMP (statut="o", + typ=("FichierNoAbs",'All Files (*)',), # l'existence du fichier n'est pas vérifiée + ang="data file name", + fr =u"nom du fichier contenant les mesures expérimentales B(H)", + ), + ), # Fin BLOC SPLINE_PROPERTIES + MARROCCO_LAW_PROPERTIES = BLOC (condition="NATURE in ('MARROCCO','MARROCCO+SATURATION')", + ALPHA = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="alpha parameter", + fr =u"paramètre alpha de la loi de Marrocco" , + ), + TAU = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="tau parameter", + fr =u"paramètre tau de la loi de Marrocco" , + ), + C = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="c parameter", + fr =u"paramètre c de la loi de Marrocco" , + ), + EPSILON = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="epsilon parameter", + fr =u"paramètre epsilon de la loi de Marrocco" , + ), + ), # Fin BLOC MARROCCO_LAW_PROPERTIES + SATURATION_LAW_PROPERTIES = BLOC (condition="NATURE=='MARROCCO+SATURATION'", + BMAX = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="intersection B", + fr = u"valeur de B marquant la fin de la loi de Marrocco et le début du raccord à la loi de saturation", + ), + HSAT = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="H value", + fr = u"valeur de H définissant la loi de saturation", + ), + BSAT = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="B value", + fr = u"valeur de B définissant la loi de saturation", + ), + JOIN = SIMP (statut="o", + typ="TXM", + defaut="SPLINE", + into= ("SPLINE","PARABOLIC","LINEAR"), + ang="type of join between laws", + fr =u"type de raccord entre la loi choisie et la loi de saturation" , + ), + ), # Fin BLOC SATURATION_LAW_PROPERTIES + APPLIEDTO = SIMP (statut="o", + typ="TXM", + into=("B(H)&H(B)","B(H)","H(B)"), + defaut="B(H)&H(B)", + ang="join applied to", + fr =u"Le raccord tel que défini est appliqué à la courbe B(H) seulement, à la courbe H(B) seulement ou aux deux courbes à la fois. Dans les deux premiers cas, le raccord de la courbe H(B) est inversé numériquement à partir du raccord défini pour la courbe B(H), et vice-versa.", + ), + ), # Fin BLOC NONLINEAR_LAW_PROPERTIES + ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES + ), # fin FACT PERMEABILITY + #), # Fin BLOC HAS_PERMEABILITY + +##------------------------------------------------------------------ +# Données de permittivité, utilisée pour les diélectriques seulement +#------------------------------------------------------------------- + #HAS_PERMITTIVITY = BLOC(condition="TYPE == 'DIELECTRIC'", + +#------------------------------------------------ +# sous bloc niveau 2 : PERMITTIVITY +#------------------------------------------------ + PERMITTIVITY = FACT ( statut="f", + ang ="Permittivity properties", + fr = u"propriétés de permittivité du matériau", + HOMOGENEOUS = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is homogeneous or not", + fr = u"le matériau est homogène ou non", + ), + ISOTROPIC = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is isotropic or not", + fr = u"le matériau est isotrope ou non", + ), + HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", + LAW = SIMP (statut="o", + typ="TXM", + defaut="LINEAR", + into = ("LINEAR",), + ang = "linear law", + fr = u"loi linéaire", + ), + VALUE = SIMP (statut="o", + typ="C", + defaut=('RI',1,0), + ang = "enter a complex relative value", + fr = u"saisir une valeur complexe relative", + ), + ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES + ), # fin FACT PERMITTIVITY + + #), # Fin BLOC HAS_PERMITTIVITY + +##---------------------------------------------------------------------------------------------- +# Données de conductivité, utilisée pour les conducteurs et impédances de surface +#----------------------------------------------------------------------------------------------- + #HAS_CONDUCTIVITY = BLOC(condition="TYPE in ('CONDUCTOR','ZSURFACIC')", +#------------------------------------------------ +# sous bloc niveau 2 : CONDUCTIVITY +#------------------------------------------------ + CONDUCTIVITY = FACT ( statut="f", + ang ="Permittivity properties", + fr = u"propriétés de permittivité du matériau", + HOMOGENEOUS = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is homogeneous or not", + fr = u"le matériau est homogène ou non", + ), + ISOTROPIC = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is isotropic or not", + fr = u"le matériau est isotrope ou non", + ), + HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", + LAW = SIMP (statut="o", + typ="TXM", + defaut="LINEAR", + into = ("LINEAR",), + ang = "linear law", + fr = u"loi linéaire", + ), + VALUE = SIMP (statut="o", + typ="C", + defaut=('RI',1,0), + ang = "enter a complex relative value", + fr = u"saisir une valeur complexe relative", + ), + ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES + ), # fin FACT CONDUCTIVITY + + #), # Fin BLOC HAS_CONDUCTICITY + +################################################################################################### +#--------------------------------------------- +# sous bloc niveau 1 +#--------------------------------------- +# matériau generique de type ZINSULATOR +#--------------------------------------- + +# aucun parametre a saisir pour ce materiau + + +################################################################################################### +#--------------------------------------------- +# sous bloc niveau 1 +#--------------------------------------------- +# matériau generique de type NILMAT (fictif) +#--------------------------------------------- + +# aucun parametre a saisir pour ce materiau + + +################################################################################################### +#---------------------------------------------------------- +# sous bloc niveau 1 : EM_ISOTROPIC_FILES +#------------------------------------------------- +# matériau isotropique non homogene generique +#------------------------------------------------- + EM_ISOTROPIC_properties=BLOC(condition="TYPE=='EM_ISOTROPIC'", + + CONDUCTIVITY_File = SIMP (statut="o", + typ=("FichierNoAbs",'MED Files (*.med)',), + ang="CONDUCTIVITY MED data file name", + fr = u"nom du fichier MED CONDUCTIVITY", + ), + PERMEABILITY_File = SIMP (statut="o", + typ=("FichierNoAbs",'MED Files (*.med)',), + ang="PERMEABILITY MED data file name", + fr = u"nom du fichier MED PERMEABILITY", + ), + ), # fin bloc EM_ISOTROPIC_properties + + +#--------------------------------------------------- +# matériau anisotropique non homogene generique +#--------------------------------------------------- + EM_ANISOTROPIC_properties=BLOC(condition="TYPE=='EM_ANISOTROPIC'", + + PERMEABILITY_File = SIMP (statut="o", + #typ=("Fichier",'.mater Files (*.mater)'), # le fichier doit exister dans le répertoire d'où on lancer Eficas si le fichier est défini par un nom relatif, ce qui est trop contraignant + #typ=("Fichier",'.mater Files (*.mater)','Sauvegarde'), # Le fichier peut ne pas exister, mais on propose de le sauvegarder et d'écraser un fichier existant : pas approprié + typ=("FichierNoAbs",'.mater Files (*.mater)'), # l'existence du fichier n'est pas vérifiée, mais on peut le sélectionner quand même via la navigateur. C'est suffisant et permet une bibliothèque de matériaux. + ang="PERMEABILITY .mater data file name", + fr ="nom du fichier .mater PERMEABILITY", + ), + CONDUCTIVITY_File = SIMP (statut="o", + typ=("FichierNoAbs",'.mater Files (*.mater)'), + ang="CONDUCTIVITY .mater data file name", + fr ="nom du fichier .mater CONDUCTIVITY", + ), + ), # fin bloc EM_ANISOTROPIC_properties + + +) # fin OPER MATERIAL + +#=================================================================== +# 3eme bloc : bloc SOURCES +#==================================================================== +# definition des differentes sources qui seront dans le bloc SOURCES +#------------------------------------------------------------------- +# + +SOURCE = OPER ( nom = "SOURCE", + op = None, + repetable = 'n', + ang = "source definition", + fr = u"définition d'une source", + sd_prod = source, + regles = (UN_PARMI('STRANDED_INDUCTOR','HPORT','EPORT'), # choix d'un type de source + UN_PARMI('WAVEFORM_CONSTANT','WAVEFORM_SINUS'), # choix d'une forme de source + ), + +#---------------------------------------------------------- +# sous bloc niveau 1 : stranded inductor source +##--------------------------------------------------------- + STRANDED_INDUCTOR = FACT(statut='f', + ang="Stranded inductor source", + fr=u"source de type inducteur bobiné", + NTURNS = SIMP (statut="o", + typ="I", + defaut=1, + ang="number of turns in the inductor", + fr= u"nombre de tours dans l'inducteur bobiné", + ), + TYPE = SIMP (statut="o", + typ="TXM", + defaut="CURRENT", + into=("CURRENT",), + fr= u"source de type courant", + ang="current source type", + ), + ), # FIN de FACT STRANDED_INDUCTOR + HPORT = FACT(statut='f', + ang="Magnetic port source", + fr=u"source de type port magnétique", + TYPE = SIMP (statut="o", + typ="TXM", + into=("VOLTAGE","CURRENT"), + fr= u"source de type tension ou courant", + ang="voltage or current source type", + ), + ), # FIN de FACT HPORT + EPORT = FACT(statut='f', + ang="Electric port source", + fr=u"source de type port électrique", + TYPE = SIMP (statut="o", + typ="TXM", + into=("VOLTAGE","CURRENT"), + fr= u"source de type tension ou courant", + ang="voltage or current source type", + ), + ), # FIN de FACT EPORT + WAVEFORM_CONSTANT = FACT(statut='f', + ang="constant source", + fr=u"source constante", + AMPLITUDE = SIMP (statut="o", + typ="R", + defaut=1, + ang = "enter the source magnitude value, in A or V units", + fr = u"saisir la valeur de l'amplitude de la source, en unités A ou V", + ), + ), # FIN de FACT WAVEFORM_CONSTANT + WAVEFORM_SINUS = FACT(statut='f', + ang="sinus variation source", + fr=u"source variant avec une forme sinusoïdale, définie par son amplitude, sa fréquence et sa phase", + AMPLITUDE = SIMP (statut="o", + typ="R", + defaut=1, + ang = "enter the source magnitude value, in A or V units", + fr = u"saisir la valeur de l'amplitude de la source, en unités A ou V", + ), + FREQUENCY = SIMP (statut="o", + typ="R", + defaut=50.0, + ang = "enter the source frequency value, in Hz units", + fr = u"saisir la valeur de la fréquence de la source, en Hz", + ), + PHASE = SIMP (statut="o", + typ="R", + defaut=0.0, + ang = "enter the source phase value, in degrees units", + fr = u"saisir la valeur de la phase de la source, en degrés", + ), + ), # FIN de FACT WAVEFORM_SINUS +) # Fin OPER SOURCE diff --git a/OldCodes/Carmel3D/Carmel3D_Cata_frequentiel_V1.py b/OldCodes/Carmel3D/Carmel3D_Cata_frequentiel_V1.py new file mode 100644 index 00000000..8edc6a82 --- /dev/null +++ b/OldCodes/Carmel3D/Carmel3D_Cata_frequentiel_V1.py @@ -0,0 +1,903 @@ +# -*- coding: utf-8 -*- +# -------------------------------------------------- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# -------------------------------------------------- + +import os +import sys +from Accas import * +import types +from decimal import Decimal +# repertoire ou sont stockés le catalogue carmel3d +# et les fichiers de donnees des materiaux de reference +from prefs_CARMEL3D import repIni + +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + if type(valeur) == types.StringType: + return None + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + + +#print "catalogue carmel" +#print "repIni = ", repIni + +# Version du catalogue +VERSION_CATA = "Code_Carmel3D 2.4.0 for harmonic problems" +# -------------------------------------------------- +# definition d une classe pour les materiaux +# definition d une classe pour les sources +# definition d une classe pour les groupes de mailles +# -------------------------------------------------- +class material ( ASSD ) : pass +class source ( ASSD ) : pass +class grmaille ( ASSD ) : pass +class stranded_inductor_geometry ( ASSD ) : pass +class macro_groupe ( ASSD ) : pass + +#CONTEXT.debug = 1 +# -------------------------------------------------- +# déclaration du jeu de commandes : 1ere instruction du catalogue obligatoire +#--------------------------------------------------- + +##========================================================= +JdC = JDC_CATA ( code = 'CARMEL3D', + execmodul = None, + regles =( + AU_MOINS_UN ('PARAMETERS'), + AU_PLUS_UN ('PARAMETERS'), + AU_MOINS_UN ('SOLVEUR'), + AU_PLUS_UN ('SOLVEUR'), + AU_MOINS_UN ('POST_COMMANDS'), + AU_PLUS_UN ('POST_COMMANDS'), + AU_MOINS_UN ('MATERIAL','INCLUDE'), + AU_MOINS_UN ('SOURCE','INCLUDE'), + AU_MOINS_UN ('MESHGROUP'), + ), + ) # Fin JDC_CATA + +import opsCarmel + +#====================================================================== +# 1er bloc : bloc VERSION +# ce bloc est volontairement cache dans l IHM +#=================================================== + +VERSION = PROC ( nom = "VERSION", + op = None, + repetable = 'n', + UIinfo= {"groupes":("CACHE",)}, + ang= "version block definition", + +#---------------------- +# Liste des parametres +#---------------------- + + NUM = SIMP (statut="o", + typ="I", + defaut=1, + ang="version number of the physical model", + into=( 1,), + ), + FILETYPE = SIMP (statut="o", + typ="TXM", + defaut="PHYS", + ang="file type", + into=( "PHYS",), + ), + +) # Fin PROC VERSION + +PARAMETERS= PROC ( nom = "PARAMETERS", + op = None, + repetable = 'n', + UIinfo = { "groupes" : ( "1) Parametres", ) }, + ang= "General parameters for this study", + fr= u"Paramètres généraux de l'étude", +#---------------------- +# Liste des parametres +#---------------------- + RepCarmel=SIMP(typ='Repertoire', statut='o', + ang= "Code_Carmel3D executables directory", + fr= u"Répertoire contenant les programmes de Code_Carmel3D", + ), + Fichier_maillage = SIMP (statut="o", typ=("FichierNoAbs",'All Files (*)',), # l'existence du fichier n'est pas vérifiée + ang="Mesh file path (relative, aka file name, or absolute path).", + fr =u"Emplacement du fichier contenant le maillage (relatif, i.e., nom du fichier, ou absolu, i.e., chemin complet).", + ), + + Echelle_du_maillage = SIMP (statut='o', typ="TXM", defaut= "Millimetre", into = ("Metre", "Millimetre"), + ang="Mesh geometry units.", + fr =u"Unités géométriques du maillage.", + ), + + Formulation=SIMP(statut='o', typ='TXM', into=("TOMEGA","APHI"), + ang="Problem formulation.", + fr =u"Formulation du problème.", + ), + + FREQUENCY = SIMP (statut="o", + typ="R", + defaut=50.0, + ang = "enter the source frequency value, in Hz units", + fr = u"saisir la valeur de la fréquence de la source, en Hz", + val_min=0.0, + ), + + Realiser_topologie_gendof = SIMP (statut='o', typ="TXM", defaut="TRUE", into=("TRUE", "FALSE"), + ang="Build topology (.car file) using gendof.exe.", + fr =u"Construction de la topologie (fichier .car) en éxécutant gendof.exe.", + ), + Resoudre_probleme = SIMP (statut='o', typ="TXM", defaut="TRUE", into=("TRUE", "FALSE"), + ang="Solve the problem using fcarmel.exe.", + fr =u"Résolution du problème en éxécutant fcarmel.exe.", + ), + + Realiser_post_traitement_aposteriori = SIMP (statut='o', typ="TXM", defaut="TRUE", into=("TRUE", "FALSE"), + ang="Make post-processing using postprocess.exe.", + fr =u"Réalisation du post-traitement en éxécutant postprocess.exe.", + ), +) # Fin PROC PARAMETERS + +SOLVEUR = PROC ( nom ="SOLVEUR", + op=None, + repetable = 'n', + UIinfo= {"groupes":("1) Parametres",)}, + ang= "Solver parameters for this study", + fr= u"Paramètres liés au solveur de l'étude", + + Type= SIMP (statut="o", + typ="TXM", + into=("Solveur_lineaire"), + defaut='Solveur_lineaire', + ang="Linear solver only for harmonic problems.", + fr =u"Solveur linéaire seulement pour les problèmes fréquentiels.", + ), + + Solveur_lineaire=BLOC(condition="Type=='Solveur_lineaire'", + ang="This block contains whole linear solver properties.", + fr =u"Ce bloc contient toutes les propriétés du solveur linéaire.", + Methode_lineaire=SIMP(statut='o', typ='TXM', into=("Methode iterative BICGCR", "Methode directe MUMPS"), + ang="Algorithm used for this linear solver.", + fr =u"Méthode (algorithme) utilisée par ce solveur linéaire.", + ), + + Parametres_methode_iterative_BICGCR=BLOC(condition="Methode_lineaire=='Methode iterative BICGCR'", + ang="This block contains whole BICGCR algorithm properties used for the linear solver.", + fr =u"Ce bloc contient toutes les propriétés de la méthode BICGCR utilisée par le solveur linéaire.", + Precision=SIMP(statut='o', typ='R', defaut=1e-9, + ang="Accuracy on linear computations.", + fr =u"Précision du calcul linéaire.", + ), + Nombre_iterations_max=SIMP(statut='o', typ='I',defaut=10000, + ang="Maximal number of iterations.", + fr =u"Nombre maximal d'itérations.", + ), + Preconditionneur=SIMP(statut='f', typ='TXM', into=("Jacobi"), defaut='Jacobi', + ang="Preconditioner choice. Jacobi only.", + fr =u"Choix du préconditioneur. Jacobi disponible seulement.", + ), + ), + + Parametres_methode_directe_MUMPS=BLOC(condition="Methode_lineaire=='Methode directe MUMPS'", + ang="This block contains whole MUMPS properties used for the linear solver.", + fr =u"Ce bloc contient toutes les propriétés de la méthode MUMPS utilisée par le solveur linéaire.", + Type_de_matrice=SIMP(statut='o', typ='I', defaut=2, + ang="Matrix type (symetry). 2: symetric. Please refer to MUMPS documentation.", + fr =u"Type de matrice (symétrie). Choisir 2 pour une matrice symétrique. Expliqué dans la documentation MUMPS.", + ), + ICNTL_Control_Parameters=SIMP(statut='o', typ='I', defaut=7, + ang="ICNTL control parameter. Please refer to MUMPS documentation.", + fr =u"Paramètre de contrôle ICNTL. Expliqué dans la documentation MUMPS.", + ), + CNTL_Control_Parameters=SIMP(statut='o', typ='I', defaut=5, + ang="CNTL control parameter. Please refer to MUMPS documentation.", + fr =u"Paramètre de contrôle CNTL. Expliqué dans la documentation MUMPS.", + ), + ), + ), + ) + +POST_COMMANDS = PROC ( nom = "POST_COMMANDS", + op = None, + repetable = 'n', + UIinfo = { "groupes" : ( "1) Parametres", ) }, + ang= "post-processing commands .cmd or .post file", + fr= u"fichiers .cmd ou .post de commandes de post-traitement", + # Sous-parties, moins indentées pour améliorer la lisibilité + # Grandeurs globales + GLOBAL = FACT ( statut="f", + ang ="Post-processing of global quantities", + fr =u"Post-traitement des grandeurs globales", + ), + # Carte de tous les champs possibles + VISU = FACT ( statut="f", + ang ="Post-processing of field maps", + fr =u"Post-traitement des cartes de champ", + VISU_Format=SIMP(statut='o', typ='TXM', into=("MED", "VTK"), defaut="MED"), + VISU_Type=SIMP(statut='o', typ='TXM', into=("ELEMENT", "NOEUD"), defaut="ELEMENT"), + ), + # Ligne de coupe + CUTLINE = FACT ( statut="f", + ang = "Post-processing of one cutline", + fr = u"Post-traitement d'une ligne de coupe", + first_point = SIMP(statut='o', + typ = Tuple(3),validators = VerifTypeTuple(('R','R','R')), + ang="First point of the cutline (cartesian coordinates).", + fr=u"Point de départ (premier point) de la ligne de coupe (coordonnées cartésiennes).", + ), + + last_point = SIMP(statut='o', typ='R', min=3, max=3, + ang="Last point of the cutline (cartesian coordinates).", + fr=u"Point d'arrivée (dernier point) de la ligne de coupe (coordonnées cartésiennes)." + ), + number_of_points = SIMP(statut='o', typ='I', + ang="Number of points of the cutline.", + fr=u"Nombre de points de la ligne de coupe." + ), + name = SIMP(statut='o', typ='TXM', + ang="Name of the cutline, used in the output filename.", + fr=u"Nom de la ligne de coupe, utilisé dans le nom du fichier de sortie." + ), + field = SIMP(statut='o', typ='TXM', into=("H", "B", "J", "E"), + ang="Field on which the cutline is applied.", + fr=u"Champ pour lequel la ligne de coupe est définie." + ), + ), + # Plan de coupe + CUTPLANE = FACT ( statut="f", + ang = "Post-processing of one cutplane", + fr = u"Post-traitement d'un plan de coupe", + normal_vector = SIMP(statut='o', typ='TXM', into=("Ox", "Oy", "Oz"), + ang="Cutplane normal vector, i.e., perpendicular axis, 3 possible cartesian values: Ox, Oy, Oz.", + fr=u"Vecteur normal au plan de coupe, i.e., son axe perpendiculaire, parmi les 3 valeurs cartésiennes Ox, Oy et Oz." + ), + plane_position = SIMP(statut='o', typ='R', + ang="Cutplane position, i.e., its coordinate along the normal vector axis.", + fr=u"Position du plan de coupe, i.e., coordonnée le long de l'axe de vecteur normal." + ), + number_of_points = SIMP(statut='o', typ='I', min=2, max=2, + ang="Number of points on the cutplane, which define a cartesian grid along its canonical directions, e.g., Ox and Oy if plane normal to Oz.", + fr=u"Nombre de points sur le plan de coupe dans les deux directions (grille cartésienne), e.g., Ox et Oy si le plan est normal à Oz." + ), + name = SIMP(statut='o', typ='TXM', + ang="Name of the cutplane, used in the output filename.", + fr=u"Nom du plan de coupe, utilisé dans le nom du fichier de sortie." + ), + field = SIMP(statut='o', typ='TXM', into=("H", "B", "J", "E"), + ang="Field on which the cutplane is applied.", + fr=u"Champ pour lequel le plan de coupe est défini." + ), + ), + +) # Fin PROC POST_COMMANDS + + +#====================================================================== +# le fichier .PHYS contient 3 blocs et jusqu'a 3 niveaux de sous-blocs +# +#====================================================================== + +#=================================================================== +# 2eme bloc : bloc MATERIALS +#=================================================================== +# definition des matériaux utilisateurs +# a partir des materiaux de reference ou de materiaux generiques +#------------------------------------------------------------------- + +MATERIAL = OPER (nom = "MATERIAL", + op = None, + repetable = 'n', + UIinfo = { "groupes" : ( "2) Proprietes", ) }, + ang= "real material block definition", + fr= u"définition d'un matériau réel", + sd_prod= material, + # regles=EXCLUS('PERMITTIVITY','CONDUCTIVITY'), + +#--------------------------------------------------------------------- +# liste des matériaux de reference fournis par THEMIS et des +# materiaux generiques (les materiaux generiques peuvent etre utilises +# si aucun materiau de reference ne convient) +#--------------------------------------------------------------------- + TYPE = SIMP(statut='o', + typ='TXM', + into=( +# matériaux génériques + "DIELECTRIC", + "CONDUCTOR", + "ZINSULATOR","ZSURFACIC", + "NILMAT","EM_ISOTROPIC","EM_ANISOTROPIC", + ), + ang = "generic materials list", + fr = u"liste des matériaux génériques", + ), + +############################################################################## +# Remarque generale a tous les materiaux : +# pour conserver l'affichage scientifique le nombre derriere l'exposant doit +# etre strictement superieur au nombre de decimales +# + +##---------------------------------------------------------------------------------------------- +# Données de perméabilité, utilisée pour les diélectriques, conducteurs et impédances de surface +#----------------------------------------------------------------------------------------------- + #HAS_PERMEABILITY = BLOC(condition="TYPE in ('DIELECTRIC','CONDUCTOR','ZSURFACIC')", + +#------------------------------------------------ +# sous bloc niveau 2 : PERMEABILITY +#------------------------------------------------ +# + PERMEABILITY_properties = BLOC (condition="TYPE=='DIELECTRIC' or TYPE=='CONDUCTOR'", + PERMEABILITY = FACT ( statut="o", + ang ="Permeability properties", + fr =u"propriétés de perméabilité du matériau", + HOMOGENEOUS = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is homogeneous or not", + fr = u"le matériau est homogène ou non", + ), + ISOTROPIC = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is isotropic or not", + fr = u"le matériau est isotrope ou non", + ), + HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", + LAW = SIMP (statut="o", + typ="TXM", + defaut="LINEAR", + into = ("LINEAR","NONLINEAR"), + ang = "harmonic or time-domain linear or nonlinear law only for homogeneous and isotropic materials", + fr = u"loi linéaire (fréquentielle ou temporelle) ou non (homogène et isotrope seulement)", + ), + VALUE = SIMP (statut="o", + typ="C", + defaut=1, + ang = "Relative linear permeability value, also used at first nonlinear iteration", + fr = u"Valeur de la perméabilité relative à l'air utilisée pour une loi linéaire ou pour la première itération non-linéaire", + ), + + NONLINEAR_LAW_PROPERTIES = BLOC (condition="LAW=='NONLINEAR'", + NATURE = SIMP (statut="o", + typ="TXM", + defaut="MARROCCO", + into = ("SPLINE","MARROCCO","MARROCCO+SATURATION"), + ang = "nature law", + fr = u"nature de la loi", + ), + SPLINE_LAW_PROPERTIES = BLOC (condition="NATURE=='SPLINE'", + FILENAME = SIMP (statut="o", + typ=("FichierNoAbs",'All Files (*)',), # l'existence du fichier n'est pas vérifiée + ang="data file name", + fr =u"nom du fichier contenant les mesures expérimentales B(H)", + ), + ), # Fin BLOC SPLINE_PROPERTIES + MARROCCO_LAW_PROPERTIES = BLOC (condition="NATURE in ('MARROCCO','MARROCCO+SATURATION')", + ALPHA = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="alpha parameter", + fr =u"paramètre alpha de la loi de Marrocco" , + ), + TAU = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="tau parameter", + fr =u"paramètre tau de la loi de Marrocco" , + ), + C = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="c parameter", + fr =u"paramètre c de la loi de Marrocco" , + ), + EPSILON = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="epsilon parameter", + fr =u"paramètre epsilon de la loi de Marrocco" , + ), + ), # Fin BLOC MARROCCO_LAW_PROPERTIES + SATURATION_LAW_PROPERTIES = BLOC (condition="NATURE=='MARROCCO+SATURATION'", + BMAX = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="intersection B", + fr = u"valeur de B marquant la fin de la loi de Marrocco et le début du raccord à la loi de saturation", + ), + HSAT = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="H value", + fr = u"valeur de H définissant la loi de saturation", + ), + BSAT = SIMP (statut="o", + typ="R", + defaut=0, + val_min=0, + ang="B value", + fr = u"valeur de B définissant la loi de saturation", + ), + JOIN = SIMP (statut="o", + typ="TXM", + defaut="SPLINE", + into= ("SPLINE","PARABOLIC","LINEAR"), + ang="type of join between laws", + fr =u"type de raccord entre la loi choisie et la loi de saturation" , + ), + ), # Fin BLOC SATURATION_LAW_PROPERTIES + APPLIEDTO = SIMP (statut="o", + typ="TXM", + into=("B(H)&H(B)","B(H)","H(B)"), + defaut="B(H)&H(B)", + ang="join applied to", + fr =u"Le raccord tel que défini est appliqué à la courbe B(H) seulement, à la courbe H(B) seulement ou aux deux courbes à la fois. Dans les deux premiers cas, le raccord de la courbe H(B) est inversé numériquement à partir du raccord défini pour la courbe B(H), et vice-versa.", + ), + ), # Fin BLOC NONLINEAR_LAW_PROPERTIES + ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES + ), + ),# fin FACT PERMEABILITY + + +##---------------------------------------------------------------------------------------------- +# Données de conductivité, utilisée pour les conducteurs et impédances de surface +#----------------------------------------------------------------------------------------------- + #HAS_CONDUCTIVITY = BLOC(condition="TYPE in ('CONDUCTOR','ZSURFACIC')", +#------------------------------------------------ +# sous bloc niveau 2 : CONDUCTIVITY +#------------------------------------------------ + + CONDUCTIVITY_properties= BLOC (condition="TYPE=='CONDUCTOR'", + CONDUCTIVITY = FACT ( statut="o", + ang ="Permittivity properties", + fr = u"propriétés de permittivité du matériau", + HOMOGENEOUS = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is homogeneous or not", + fr = u"le matériau est homogène ou non", + ), + ISOTROPIC = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is isotropic or not", + fr = u"le matériau est isotrope ou non", + ), + HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", + LAW = SIMP (statut="o", + typ="TXM", + defaut="LINEAR", + into = ("LINEAR",), + ang = "linear law", + fr = u"loi linéaire", + ), + VALUE = SIMP (statut="o", + typ="C", + defaut=1, + ang = "enter a complex relative value", + fr = u"saisir une valeur complexe relative", + ), + ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES + ), + + ), + + + # fin FACT CONDUCTIVITY + + + +################################################################################################### +#--------------------------------------------- +# sous bloc niveau 1 +#--------------------------------------- +# matériau generique de type ZINSULATOR +#--------------------------------------- + +# aucun parametre a saisir pour ce materiau + + +################################################################################################### +#--------------------------------------------- +# sous bloc niveau 1 +#--------------------------------------------- +# matériau generique de type NILMAT (fictif) +#--------------------------------------------- + +# aucun parametre a saisir pour ce materiau + + +################################################################################################### +#---------------------------------------------------------- +# sous bloc niveau 1 : EM_ISOTROPIC_FILES +#------------------------------------------------- +# matériau isotropique non homogene generique +#------------------------------------------------- + EM_ISOTROPIC_properties=BLOC(condition="TYPE=='EM_ISOTROPIC'", + regles =( + AU_MOINS_UN ('CONDUCTIVITY_File','PERMEABILITY_File'), + ), + CONDUCTIVITY_File = SIMP (statut="f", + typ=("FichierNoAbs",'MED Files (*.med)',), + ang="CONDUCTIVITY MED data file name", + fr = u"nom du fichier MED CONDUCTIVITY", + ), + PERMEABILITY_File = SIMP (statut="f", + typ=("FichierNoAbs",'MED Files (*.med)',), + ang="PERMEABILITY MED data file name", + fr = u"nom du fichier MED PERMEABILITY", + ), + ), # fin bloc EM_ISOTROPIC_properties + + +#--------------------------------------------------- +# matériau anisotropique non homogene generique +#--------------------------------------------------- + EM_ANISOTROPIC_properties=BLOC(condition="TYPE=='EM_ANISOTROPIC'", + regles =( + AU_MOINS_UN ('CONDUCTIVITY_File','PERMEABILITY_File'), + ), + PERMEABILITY_File = SIMP (statut="f", + #typ=("Fichier",'.mater Files (*.mater)'), # le fichier doit exister dans le répertoire d'où on lancer Eficas si le fichier est défini par un nom relatif, ce qui est trop contraignant + #typ=("Fichier",'.mater Files (*.mater)','Sauvegarde'), # Le fichier peut ne pas exister, mais on propose de le sauvegarder et d'écraser un fichier existant : pas approprié + typ=("FichierNoAbs",'.mater Files (*.mater)'), # l'existence du fichier n'est pas vérifiée, mais on peut le sélectionner quand même via la navigateur. C'est suffisant et permet une bibliothèque de matériaux. + ang="PERMEABILITY .mater data file name", + fr ="nom du fichier .mater PERMEABILITY", + ), + CONDUCTIVITY_File = SIMP (statut="f", + typ=("FichierNoAbs",'.mater Files (*.mater)'), + ang="CONDUCTIVITY .mater data file name", + fr ="nom du fichier .mater CONDUCTIVITY", + ), + ), # fin bloc EM_ANISOTROPIC_properties + + +#------------------------------------------------------------------ +# Données de permittivité, utilisée pour les diélectriques seulement +#------------------------------------------------------------------- + #HAS_PERMITTIVITY = BLOC(condition="TYPE == 'DIELECTRIC'", + +#------------------------------------------------ +# sous bloc niveau 2 : PERMITTIVITY +#------------------------------------------------ + + Utiliser_la_permittivite = SIMP (statut='o', + typ='TXM', + into = ("OUI","NON"), + defaut="NON", + ang ="Optionnaly use permittivity or not (default)", + fr = u"Utilisation optionnelle de la permittivité du matériau. Pas d'utilisation par défaut.", + ), + PERMITTIVITY_properties = BLOC (condition="Utiliser_la_permittivite=='OUI'", + PERMITTIVITY = FACT ( statut="o", + ang ="Permittivity properties", + fr = u"propriétés de permittivité du matériau", + HOMOGENEOUS = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is homogeneous or not", + fr = u"le matériau est homogène ou non", + ), + ISOTROPIC = SIMP (statut="o", + typ="TXM", + defaut="TRUE", + into = ("TRUE","FALSE"), + ang = "the material is isotropic or not", + fr = u"le matériau est isotrope ou non", + ), + HOMOGENEOUS_ISOTROPIC_PROPERTIES = BLOC (condition="HOMOGENEOUS=='TRUE' and ISOTROPIC=='TRUE'", + LAW = SIMP (statut="o", + typ="TXM", + defaut="LINEAR", + into = ("LINEAR",), + ang = "linear law", + fr = u"loi linéaire", + ), + VALUE = SIMP (statut="o", + typ="C", + defaut=1, + ang = "enter a complex relative value", + fr = u"saisir une valeur complexe relative", + ), + ), # Fin BLOC HOMOGENEOUS_ISOTROPIC_PROPERTIES + ), + ),# fin FACT PERMITTIVITY + + ) # fin OPER MATERIAL + + + +############################################################################## +# Remarque generale a tous les materiaux : +# pour conserver l'affichage scientifique le nombre derriere l'exposant doit +# etre strictement superieur au nombre de decimales + + +#=================================================================== +# 3eme bloc : bloc SOURCES +#==================================================================== +# definition des differentes sources qui seront dans le bloc SOURCES +#------------------------------------------------------------------- + + + +SOURCE = OPER ( nom = "SOURCE", + op = None, + repetable = 'n', + UIinfo = { "groupes" : ( "2) Proprietes", ) }, + ang = "source definition", + fr = u"définition d'une source", + sd_prod = source, +# regles = (UN_PARMI('STRANDED_INDUCTOR','HPORT','EPORT'), # choix d'un type de source +# UN_PARMI('WAVEFORM_CONSTANT','WAVEFORM_SINUS'), # choix d'une forme de source + + +#---------------------------------------------------------- +# sous bloc niveau 1 : stranded inductor source +##--------------------------------------------------------- + Type=SIMP(statut='o', + typ='TXM', + into=("STRANDED_INDUCTOR", "HPORT", "EPORT"), + ang = "Source type", + fr = u"Type de source", + ), + + STRANDED_INDUCTOR_properties = BLOC (condition="Type=='STRANDED_INDUCTOR'", + STRANDED_INDUCTOR = FACT(statut='o', + ang="Stranded inductor source", + fr=u"source de type inducteur bobiné", + NTURNS = SIMP (statut="o", + typ="I", + defaut=1, + ang="number of turns in the inductor", + fr= u"nombre de tours dans l'inducteur bobiné", + ), + TYPE = SIMP (statut="o", + typ="TXM", + defaut="CURRENT", + into=("CURRENT",), + fr= u"source de type courant", + ang="current source type", + ), + ), + ),# FIN de FACT STRANDED_INDUCTOR + HPORT_properties = BLOC (condition="Type=='HPORT'", + HPORT = FACT(statut='o', + ang="Magnetic port source", + fr=u"source de type port magnétique", + TYPE = SIMP (statut="o", + typ="TXM", + into=("VOLTAGE","CURRENT"), + fr= u"source de type tension ou courant", + ang="voltage or current source type", + ), + ), + ),# FIN de FACT HPORT + EPORT_properties = BLOC (condition="Type=='EPORT'", + EPORT = FACT(statut='o', + ang="Electric port source", + fr=u"source de type port électrique", + TYPE = SIMP (statut="o", + typ="TXM", + into=("VOLTAGE","CURRENT"), + fr= u"source de type tension ou courant", + ang="voltage or current source type", + ), + ), + ),# FIN de FACT EPORT + + Signal=SIMP(statut='o', + typ='TXM', + into=("WAVEFORM_CONSTANT", "WAVEFORM_SINUS"), + ang = "Signal type, i.e., source evolution shape", + fr = u"Type de signal, i.e., forme de la source", + ), + WAVEFORM_CONSTANT_properties = BLOC (condition="Signal=='WAVEFORM_CONSTANT'", + WAVEFORM_CONSTANT = FACT(statut='o', + ang="constant source", + fr=u"source constante", + AMPLITUDE = SIMP (statut="o", + typ="R", + defaut=1, + ang = "enter the source magnitude value, in A or V units", + fr = u"saisir la valeur de l'amplitude de la source, en unités A ou V", + ), + ), + ),# FIN de FACT WAVEFORM_CONSTANT + + WAVEFORM_SINUS_properties = BLOC (condition="Signal=='WAVEFORM_SINUS'", + WAVEFORM_SINUS = FACT(statut='o', + ang="sinus variation source", + fr=u"source variant avec une forme sinusoïdale, définie par son amplitude, sa fréquence et sa phase", + AMPLITUDE = SIMP (statut="o", + typ="R", + defaut=1, + ang = "enter the source magnitude value, in A or V units", + fr = u"saisir la valeur de l'amplitude de la source, en unités A ou V", + ), + FREQUENCY = SIMP (statut="o", + typ="R", + defaut=0.0, + ang = "enter the source frequency value, in Hz units", + fr = u"saisir la valeur de la fréquence de la source, en Hz", + ), + PHASE = SIMP (statut="o", + typ="R", + defaut=0.0, + ang = "enter the source phase value, in degrees units", + fr = u"saisir la valeur de la phase de la source, en degrés", + ), + ), + ),# FIN de FACT WAVEFORM_SINUS + + +)# Fin OPER SOURCE + + +STRANDED_INDUCTOR_GEOMETRY=OPER(nom="STRANDED_INDUCTOR_GEOMETRY", + op=None, + repetable = 'n', + sd_prod=stranded_inductor_geometry, + UIinfo = { "groupes" : ( "2) Proprietes", ) }, + ang = "Geometry properties (shape, direction, etc.) for this stranded inductor", + fr = u"Propriétés géométriques de cet inducteur bobiné, e.g., forme, direction, sens", + + Forme=SIMP(statut='o', typ="TXM", into=("Droit", "Circulaire"), + ang = "Stranded inductor shape. Straight or circular.", + fr = u"Forme de l'inducteur bobiné (complet ou morceau) : droit ou circulaire.", + ), + Propriete= BLOC (condition="Forme=='Circulaire'", + Centre=SIMP(statut='o',typ='R',min=3,max=3, + ang = "Circular stranded inductor rotation center (cartesian coordinates).", + fr = u"Centre de rotation, en coordonnées cartésiennes, de l'inducteur bobiné (complet ou morceau) circulaire.", + ), + ), + Direction=SIMP(statut='o',typ='R',min=3,max=3, + ang = "Stranded inductor direction (or rotation) axis for the straight (circular) inductor (cartesian coordinates).", + fr = u"Axe indiquant la direction de l'inducteur bobiné droit, ou l'axe de rotation (support : Centre) de l'inducteur circulaire, en coordonnées cartésiennes.", + ), + Section=SIMP(statut='o', typ='R', + ang = "Stranded inductor section (m^2).", + fr = u"Section de l'inducteur bobiné, en m^2.", + ), +) + +#========================================================= +# création d'une macro pour traiter les INCLUDE +# +#---------------------------------------------------------- + +INCLUDE = MACRO ( nom = "INCLUDE", + op = None, + UIinfo = { "groupes" : ( "3) Bibliotheque", ) }, + sd_prod = opsCarmel.INCLUDE, + op_init = opsCarmel.INCLUDE_context, + fichier_ini = 1, + ang = "Used in order to add external material, source, etc. libraries to the study.", + fr = u"Permet d'utiliser des bibliothèques de matériaux, sources, etc., dans l'étude.", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'comm Files (*.comm);;All Files (*)',), + fr = u"Emplacement du fichier (chemin absolu ou relatif) contenant la bibliothèque des matériaux, etc.", + ang = "material library file (full or relative path)", + ), + + ) # Fin MACRO + +MESHGROUP = OPER (nom = "MESHGROUP", + op = None, + repetable = 'n', + UIinfo= {"groupes":("4) Maillage",)}, + fr= u"attribution d'un matériau ou d'une source à un groupe du maillage", + ang = "mesh group association to material or source", + sd_prod= grmaille, + regles =( + EXCLUS ('MATERIAL','SOURCE'), + ), + +# ---------------------------------------------------------- +# le mot cle SIMP doit etre facultatif sinon la recuperation +# des groupes de mailles sous SALOME ne fonctionne pas car +# le concept ne peut pas etre nomme car non valide +#----------------------------------------------------------- + Domaine = SIMP (statut="f", + typ=(grmaille, 'TXM'), + defaut="default", + ang="Domain used with stranded inductors or topological holes.", + fr =u"Domaine utilisé par les inducteurs bobinés ou les trous topologiques.", + ), + + MATERIAL = SIMP (statut="f", + typ=(material), + ang="name of the linked real or imaginary material", + fr =u"nom du matériau réel ou imaginaire associé", + ), + SOURCE = SIMP (statut="f", + typ=(source,), + ang="name of the linked source", + fr =u"nom de la source associée", + ), + STRANDED_INDUCTOR_GEOMETRY = SIMP ( statut="f", + typ=(stranded_inductor_geometry), + ang="name of the linked stranded inductor geometry", + fr =u"nom de la géométrie d'inducteur bobiné associée", + ) + ) + +# -------------------------------------------------- +# definition de macro-groupe de mailles +# il est associe a un materiau, source ou inducteur bobiné en morceaux +#--------------------------------------------------- + +MACRO_GROUPE = OPER (nom="MACRO_GROUPE", + op=None, + repetable='n', + sd_prod=macro_groupe, + UIinfo = { "groupes" : ( "4) Maillage", ) }, + fr=u"Macro-groupe = liste de groupes de maillage, e.g., inducteur bobiné en morceaux.", + ang=u"Macro-groupe = liste of mesh groups, e.g., stranded inductor defined as several parts.", + regles =( + EXCLUS ('MATERIAL','SOURCE'), + ), + Domaine = SIMP (statut='f', + typ=(grmaille, 'TXM'), + defaut="default", + ang="Domain used with stranded inductors or topological holes.", + fr =u"Domaine utilisé par les inducteurs bobinés ou les trous topologiques.", + ), + + MATERIAL = SIMP (statut="f", + typ=(material,), + ang="name of the linked real or imaginary material", + fr =u"nom du matériau réel ou imaginaire associé", + ), + SOURCE = SIMP (statut="f", + typ=(source,), + ang="name of the linked source", + fr =u"nom de la source associée", + ), + LISTE_MESHGROUP=SIMP(statut='f',# facultatif pour l'acquisition automatique des groupes du maillage + typ=(grmaille,), + min=1,max=100, + ang="Ordered list of associated mesh groups, e.g., stranded inductor parts or topological hole parts.", + fr =u"Liste ordonnée de groupes de maillage associés entre eux, e.g., morceaux d'un inducteur bobiné ou d'un trou topologique.", + ), +) # Fin OPER diff --git a/OldCodes/Carmel3D/E24 b/OldCodes/Carmel3D/E24 new file mode 100644 index 00000000..bc906b35 --- /dev/null +++ b/OldCodes/Carmel3D/E24 @@ -0,0 +1,13 @@ + 0. 0. + 1000.000 1.200000 + 1200.000 1.270000 + 1600.000 1.350000 + 3000.000 1.520000 + 6000.000 1.660000 + 10000.00 1.750000 + 20000.00 1.900000 + 30000.00 2.000000 + 49944.66 2.101082 + 80000.00 2.200000 + 132000.0 2.300000 + 250000.0 2.400000 diff --git a/OldCodes/Carmel3D/FEV1000 b/OldCodes/Carmel3D/FEV1000 new file mode 100644 index 00000000..7324073a --- /dev/null +++ b/OldCodes/Carmel3D/FEV1000 @@ -0,0 +1,31 @@ + 0.0000000 0.0000000 + 54.38605 0.5687161 + 125.0879 0.9107189 + 217.0004 1.133191 + 336.4865 1.285649 + 491.8185 1.394206 + 693.7501 1.474002 + 956.2611 1.534492 + 1297.525 1.581962 + 1741.169 1.620847 + 2317.906 1.654481 + 3067.663 1.685556 + 4042.348 1.716430 + 5309.438 1.749361 + 6956.655 1.786698 + 9098.037 1.831067 + 11881.83 1.882414 + 15500.77 1.931322 + 20205.39 1.976478 + 26321.39 2.017967 + 34272.19 2.056381 + 44608.23 2.092746 + 58045.08 2.128448 + 75512.98 2.165203 + 98221.27 2.205061 + 127742.0 2.250466 + 166119.0 2.304362 + 216009.1 2.370358 + 280866.3 2.452947 + 308952.9 2.488242 + diff --git a/OldCodes/Carmel3D/FEV470 b/OldCodes/Carmel3D/FEV470 new file mode 100644 index 00000000..d3281a2f --- /dev/null +++ b/OldCodes/Carmel3D/FEV470 @@ -0,0 +1,31 @@ + 0. 0. + 40.28202 0.3233068 + 80.56404 0.6466137 + 133.2969 0.8959763 + 196.5763 1.092960 + 272.5116 1.235844 + 363.6339 1.322937 + 472.9807 1.364753 + 604.1969 1.403417 + 761.6563 1.442002 + 950.6076 1.479882 + 1177.349 1.516478 + 1449.439 1.551293 + 1775.947 1.583937 + 2167.756 1.614135 + 2637.928 1.641730 + 3202.133 1.666674 + 3879.180 1.689014 + 4691.636 1.708866 + 5666.584 1.726406 + 6836.521 1.741841 + 8240.445 1.755403 + 9925.154 1.767332 + 11946.81 1.777868 + 14372.79 1.787249 + 17283.96 1.795704 + 20777.38 1.803454 + 24969.48 1.810715 + 30000.00 1.817699 + 33000.00 1.821469 + diff --git a/OldCodes/Carmel3D/FEV600 b/OldCodes/Carmel3D/FEV600 new file mode 100644 index 00000000..5281d05d --- /dev/null +++ b/OldCodes/Carmel3D/FEV600 @@ -0,0 +1,31 @@ + 0. 0. + 40.28202 0.5217850 + 80.56404 1.043570 + 133.2969 1.219489 + 196.5763 1.330541 + 272.5116 1.406615 + 363.6339 1.461884 + 472.9807 1.503975 + 604.1969 1.537396 + 761.6563 1.565024 + 950.6076 1.588824 + 1177.349 1.610226 + 1449.439 1.630343 + 1775.947 1.650098 + 2167.756 1.670444 + 2637.928 1.693085 + 3202.133 1.718405 + 3879.180 1.746379 + 4691.636 1.776860 + 5666.584 1.809549 + 6836.521 1.843973 + 8240.445 1.879470 + 9925.154 1.915191 + 11946.81 1.950107 + 14372.79 1.983036 + 17283.96 2.012676 + 20777.38 2.037636 + 24969.48 2.056473 + 30000.00 2.067699 + 33000.00 2.071469 + diff --git a/OldCodes/Carmel3D/FEV800 b/OldCodes/Carmel3D/FEV800 new file mode 100644 index 00000000..810c3ab6 --- /dev/null +++ b/OldCodes/Carmel3D/FEV800 @@ -0,0 +1,30 @@ + 0. 0. + 40.28202 0.3324555 + 80.56404 0.6649110 + 133.2969 0.9138392 + 196.5763 1.111536 + 272.5116 1.260901 + 363.6339 1.364212 + 472.9807 1.422949 + 604.1969 1.451498 + 761.6563 1.480342 + 950.6076 1.510200 + 1177.349 1.540614 + 1449.439 1.571091 + 1775.947 1.601134 + 2167.756 1.630277 + 2637.928 1.658111 + 3202.133 1.684309 + 3879.180 1.708632 + 4691.636 1.730937 + 5666.584 1.751169 + 6836.521 1.769348 + 8240.445 1.785560 + 9925.154 1.799934 + 11946.81 1.812635 + 14372.79 1.823846 + 17283.96 1.833761 + 20777.38 1.842578 + 24969.48 1.850493 + 30000.00 1.857699 + 33000.00 1.861469 diff --git a/OldCodes/Carmel3D/HA600 b/OldCodes/Carmel3D/HA600 new file mode 100644 index 00000000..4c4a877c --- /dev/null +++ b/OldCodes/Carmel3D/HA600 @@ -0,0 +1,30 @@ + 0. 0. + 40.28202 0.3951843 + 80.56404 0.7903686 + 133.2969 0.9716319 + 196.5763 1.095780 + 272.5116 1.185383 + 363.6339 1.252692 + 472.9807 1.304966 + 604.1969 1.346809 + 761.6563 1.381319 + 950.6076 1.410688 + 1177.349 1.436551 + 1449.439 1.460186 + 1775.947 1.483959 + 2167.756 1.510788 + 2637.928 1.540831 + 3202.133 1.574084 + 3879.180 1.610407 + 4691.636 1.649490 + 5666.584 1.690835 + 6836.521 1.733738 + 8240.445 1.777294 + 9925.154 1.820413 + 11946.81 1.861850 + 14372.79 1.900252 + 17283.96 1.934193 + 20777.38 1.962221 + 24969.48 1.982877 + 30000.00 1.994699 + 33000.00 1.998469 diff --git a/OldCodes/Carmel3D/M600_65 b/OldCodes/Carmel3D/M600_65 new file mode 100644 index 00000000..cfc3f3ba --- /dev/null +++ b/OldCodes/Carmel3D/M600_65 @@ -0,0 +1,30 @@ + 0. 0. + 0.1676396E-03 0.2082807E-05 + 0.3352792E-03 0.4165609E-05 + 0.7823178E-03 0.9719718E-05 + 0.1676395E-02 0.2082782E-04 + 0.3464548E-02 0.4304356E-04 + 0.7040854E-02 0.8747321E-04 + 0.1419346E-01 0.1763252E-03 + 0.2849867E-01 0.3540000E-03 + 0.5710909E-01 0.7092333E-03 + 0.1143299 0.1419235E-02 + 0.2287715 0.2837381E-02 + 0.4576545 0.5666269E-02 + 0.9154205 0.1129461E-01 + 1.830952 0.2243500E-01 + 3.662015 0.4426165E-01 + 7.324139 0.8618276E-01 + 14.64838 0.1637067 + 29.29687 0.2975280 + 58.59383 0.5032464 + 117.1877 0.7693985 + 234.3755 1.046909 + 468.7509 1.279960 + 937.5016 1.447085 + 1875.003 1.563602 + 3750.004 1.671697 + 7500.005 1.775926 + 15000.00 1.854134 + 30000.00 1.897699 + 33000.00 1.901469 diff --git a/OldCodes/Carmel3D/M6X2ISO1 b/OldCodes/Carmel3D/M6X2ISO1 new file mode 100644 index 00000000..e6facc82 --- /dev/null +++ b/OldCodes/Carmel3D/M6X2ISO1 @@ -0,0 +1,16 @@ + 0. 0. + 477.0000 1.100000 + 922.9141 1.633186 + 1337.513 1.756419 + 4292.604 1.852735 + 6366.000 1.880000 + 7958.000 1.900000 + 15915.00 1.980000 + 23873.00 2.020000 + 31830.00 2.045000 + 47746.00 2.080000 + 64329.63 2.111715 + 86767.84 2.145308 + 148638.1 2.239294 + 238700.0 2.355000 + 318300.0 2.420000 diff --git a/OldCodes/Carmel3D/M6X_epsilon.mater b/OldCodes/Carmel3D/M6X_epsilon.mater new file mode 100644 index 00000000..c1c50ef0 --- /dev/null +++ b/OldCodes/Carmel3D/M6X_epsilon.mater @@ -0,0 +1 @@ + 1.0 diff --git a/OldCodes/Carmel3D/M6X_homog_mu.mater b/OldCodes/Carmel3D/M6X_homog_mu.mater new file mode 100644 index 00000000..57d6c245 --- /dev/null +++ b/OldCodes/Carmel3D/M6X_homog_mu.mater @@ -0,0 +1 @@ + 1.5331206E4-j.1.6906576E4 1.9440262E3-j.2.6880635E1 1.6315E1 diff --git a/OldCodes/Carmel3D/M6X_homog_sigma.mater b/OldCodes/Carmel3D/M6X_homog_sigma.mater new file mode 100644 index 00000000..6597c154 --- /dev/null +++ b/OldCodes/Carmel3D/M6X_homog_sigma.mater @@ -0,0 +1 @@ + 0.0 diff --git a/OldCodes/Carmel3D/M6X_lineaire_mu.mater b/OldCodes/Carmel3D/M6X_lineaire_mu.mater new file mode 100644 index 00000000..8698c6b7 --- /dev/null +++ b/OldCodes/Carmel3D/M6X_lineaire_mu.mater @@ -0,0 +1 @@ + 1.60000E4 2.0000E3 3.0000E1 diff --git a/OldCodes/Carmel3D/M6X_lineaire_sigma.mater b/OldCodes/Carmel3D/M6X_lineaire_sigma.mater new file mode 100644 index 00000000..a4cfcedc --- /dev/null +++ b/OldCodes/Carmel3D/M6X_lineaire_sigma.mater @@ -0,0 +1 @@ + 1.492537313E6. diff --git a/OldCodes/Carmel3D/M6X_mu.mater b/OldCodes/Carmel3D/M6X_mu.mater new file mode 100644 index 00000000..fa1141c2 --- /dev/null +++ b/OldCodes/Carmel3D/M6X_mu.mater @@ -0,0 +1,22 @@ + 0. 0. 0. 0. + 625.9739 1.572659 477.0000 0.7020000 + 796.0000 1.665000 796.0000 1.170000 + 1719.099 1.786521 1591.000 1.310000 + 3183.000 1.810000 3183.000 1.430000 + 3979.000 1.830000 3979.000 1.475000 + 4775.000 1.850000 4775.000 1.510000 + 5570.000 1.865000 5570.000 1.540000 + 6366.000 1.880000 6366.000 1.570000 + 7958.000 1.900000 7958.000 1.620000 + 11937.00 1.950000 11937.00 1.695000 + 15915.00 1.980000 15915.00 1.760000 + 19098.00 2.000000 19098.00 1.810000 + 31830.00 2.045000 31830.00 1.930000 + 47746.00 2.080000 47746.00 2.010000 + 63662.00 2.110000 63662.00 2.070000 + 79577.00 2.145000 79577.00 2.120000 + 111041.0 2.200000 111041.0 2.190000 + 143200.0 2.240000 143200.0 2.255000 + 198900.0 2.310000 198900.0 2.325000 + 238700.0 2.355000 238700.0 2.360000 + 318300.0 2.420000 318300.0 2.420000 diff --git a/OldCodes/Carmel3D/__init__.py b/OldCodes/Carmel3D/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/OldCodes/Carmel3D/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/OldCodes/Carmel3D/ajoutGroupe.py b/OldCodes/Carmel3D/ajoutGroupe.py new file mode 100644 index 00000000..7179c9e3 --- /dev/null +++ b/OldCodes/Carmel3D/ajoutGroupe.py @@ -0,0 +1,203 @@ +# -*- coding: iso-8859-1 -*- + +import re # module interne utilisé pour vérifier la validité du nom du maillage + +concept_re=re.compile(r'[a-zA-Z_]\w*$') # nom de maillage valide s'il correspond à un identifiant (variable) Python possible. Basé sur Ihm/I_Etape.py:nomme_sd, qui fait foi + +def handleAjoutGroupSansFiltre(editor,listeGroup): + """code_Carmel temporel : obtention des groupes de maille du maillage selectionne dans Salome + Les groupes de mailles ne sont pas filtrés. + La creation du MESH_GROUPE n'est donc pas typé. + ATTENTION! Le nom devenant un concept, i.e. une variable Python, certains signes sont interdits dans le nom du groupe, + e.g. les signes moins (-), plus (+), etc. Une erreur est retournee en ce cas. + """ + # retourne le dernier element du JdC, ou None si le JdC est vide, afin de savoir a quelle place ajouter les MESH_GROUPE (en dernier) + debug = True + try: + dernier=editor.tree.racine.children[-1] + except: + dernier=None + for groupe in listeGroup: # parcours de la liste de tous les groupes de maille trouves (volumiques et les autres), puis ecriture du MESHGROUP systématique sans analyse de nom multiple + if debug: print 'groupe=', groupe + if not concept_re.match(groupe): # Le nom du groupe de maillage doit etre un identificateur Python + raise ValueError, "Ce nom de groupe ("+groupe+") ne peut pas etre utilise car il ne peut pas servir de concept a cause de caracteres interdits, e.g. signes moins (-), plus (+), etc." + try: # test de conformite du nom pour un concept, i.e. une variable Python + #exec(groupe+'=None') # le test consiste a tenter de creer une variable, initialisee a None, a partir du nom, e.g. toto=None est bon mais toto-foo=None ne fonctionne pas. + # creation du groupe MESH_GROUPE + if dernier != None: + new_node = dernier.append_brother("MESHGROUP",'after') + else: + new_node=editor.tree.racine.append_child("MESHGROUP",pos='first') + test,mess = new_node.item.nomme_sd(groupe) # precision du nom (de concept) du groupe + if debug: print u"ce nom de groupe ("+groupe+") est utilise..." + dernier=new_node # mise a jour du dernier noeud du JdC, afin de rajouter les autres MESH_GROUPE eventuels a sa suite + except: + raise ValueError, "Ce nom de groupe ("+groupe+") pose un probleme inconnu" + +def handleAjoutGroupAvecFiltre(editor,listeGroup): + """CARMEL3D : obtention des groupes de maille du maillage selectionne dans Salome + Les groupes de mailles sont filtres en utilisant une liste des prefixes autorises pour code Code_Carmel3D, + i.e. un nom de groupe de mailles est DIEL_toto_foo par exemple, qui deviendra toto_foo. + La creation du MESH_GROUPE est type (materiau ou source), d'après le prefixe. + ATTENTION! Le nom devenant un concept, i.e. une variable Python, certains signes sont interdits dans le nom du groupe, + e.g. les signes moins (-), plus (+), etc. Une erreur est retournee en ce cas. + """ + from string import join + debug = False #True + listePrefixesMateriaux = ('DIEL', 'NOCOND','COND', 'ZS', 'ZJ', 'NILMAT') # liste des prefixes pour les materiaux + listePrefixesSourcesHorsInducteur = ('EPORT', 'HPORT') # liste des prefixes pour les sources + listePrefixesInducteurBobine = ('CURRENT', ) # listes des prefixes autorises pour definir la geometrie d'un inducteur bobiné complet ou en morceaux + listePrefixesTrous = ('TOPO', ) # listes des prefixes autorises pour definir la geometrie d'un trou complet ou en morceaux + listePrefixesBBK = ('BBK', ) # listes des prefixes autorises pour definir le groupe d'éléments servant de boîte englobante dans laquelle est calculée K (inducteur bobiné ou topo). + listePrefixes = listePrefixesMateriaux + listePrefixesSourcesHorsInducteur +listePrefixesInducteurBobine + listePrefixesTrous + listePrefixesBBK # liste de tous les prefixes autorises + listePrefixesGroupesMultiples = ('CURRENT', 'TOPO' ) # listes des prefixes autorises pour groupes multiples, i.e. plusieurs groupes de mailles associes en une seule caracteistique materiau ou source + if debug: + print "listePrefixes=", listePrefixes + print "listePrefixesGroupesMultiples=", listePrefixesGroupesMultiples + sep = '_' # separateur entre le prefixe et le nom reel du groupe (qui peut lui aussi contenir ce separateur) + dictGroupesMultiples = {} # dictionnaire contenant les noms reels possibles de groupes multiples et leur occurence dans la liste, i.e. 1 par defaut et > 1 pour une groupe multiple, e.g. pour un inducteur bobine en plusieurs morceaux CURRENT_toto_1, CURRENT_toto_2, ce dictionnaire contiendra 'toto':2 + for groupe in listeGroup: + partiesGroupe = groupe.split(sep) # parties du nom, separees initialement par le separateur du prefixe, e.g. 'CURRENT_toto_foo' devient ['CURRENT','toto','foo'] et 'toto' devient ['toto'] + prefix = partiesGroupe[0] # prefixe possible de ce nom, ou nom lui-meme + if len(partiesGroupe) >= 3 and prefix in listePrefixesGroupesMultiples: # prefixe existant et autorise + nomGroupeMultiple = partiesGroupe[1] # nom possible d'un groupe multiple + if dictGroupesMultiples.has_key(nomGroupeMultiple): # comptage du nombre d'occurrences de ce nom de groupe multiple possible + dictGroupesMultiples[nomGroupeMultiple]['nombre'] += 1 + dictGroupesMultiples[nomGroupeMultiple]['membres'].append(join(partiesGroupe[1:], sep)) + else: + dictGroupesMultiples[nomGroupeMultiple] = {'type': prefix,'nombre':1, 'membres':[join(partiesGroupe[1:], sep)]} + for groupe in dictGroupesMultiples.keys(): # recherche de tous les groupes multiples. Boucle ignorée si aucun groupe multiple. + dictGroupesMultiples[groupe]['membres'].sort() # tri alphabétique des membres du groupe multiple, qui est l'ordre lu par gendof.exe/MED (ordre lexicographique). + dictGroupesMultiples[groupe]['membres'] = tuple(dictGroupesMultiples[groupe]['membres']) # transformation en tuple, qui est le format attendu par le catalogue (LISTE_MESHGROUP) + if debug: + print "dictGroupesMultiples=", dictGroupesMultiples + # retourne le dernier element du JdC, ou None si le JdC est vide, afin de savoir a quelle place ajouter les MESH_GROUPE (en dernier) + try: + dernier=editor.tree.racine.children[-1] + except: + dernier=None + for groupe in listeGroup: # parcours de la liste de tous les groupes de maille trouves (volumiques et les autres), puis ecriture du MESHGROUP systématique sans analyse de nom multiple + if debug: print 'groupe=', groupe + partiesGroupe = groupe.split(sep) # parties du nom, separees initialement par le separateur du prefixe, e.g. 'CURRENT_toto_foo' devient ['CURRENT','toto','foo'] et 'toto' devient ['toto'] + if len(partiesGroupe) == 1: # pas de prefixe + print u"ERREUR: ce nom de groupe ("+groupe+") ne peut pas etre utilise car il n'a pas de prefixe" + elif len(partiesGroupe) >= 2 and partiesGroupe[0] in listePrefixes: # prefixe existant et autorise + prefix = partiesGroupe[0] # prefixe possible de ce nom, ou nom lui-meme + nom = partiesGroupe[1] # nom du groupe ou du macro-groupe si défini. + nomReel = join(partiesGroupe[1:], sep) # reconstruction du nom reel, i.e. sans le prefixe, pour la plupart des groupes + if prefix in listePrefixesBBK: nomReel = groupe # pour la boite englobante, il faut le nom avec préfixe + if not concept_re.match(nomReel): # Le nom du groupe de maillage doit etre un identificateur Python + raise ValueError, "Ce nom de groupe ("+nomReel+") ne peut pas etre utilise car il ne peut pas servir de concept a cause de caracteres interdits, e.g. signes moins (-), plus (+), etc." + try: # test de conformite du nom pour un concept, i.e. une variable Python + #exec(nomReel+'=None') # le test consiste a tenter de creer une variable, initialisee a None, a partir du nom, e.g. toto=None est bon mais toto-foo=None ne fonctionne pas. + # creation du groupe MESH_GROUPE + if dernier != None: + new_node = dernier.append_brother("MESHGROUP",'after') + else: + new_node=editor.tree.racine.append_child("MESHGROUP",pos='first') + test,mess = new_node.item.nomme_sd(nomReel) # precision du nom (de concept) du groupe + if debug: print u"ce nom de groupe ("+nomReel+") est utilise..." + if prefix in listePrefixesMateriaux: # ce groupe est associe a un materiau + new_node.append_child('MATERIAL') # on rajoute la propriete de materiau, qu'il suffit d'associer ensuite a la liste des materiaux presents + if debug: print u" et c'est un materiau." + elif prefix in listePrefixesSourcesHorsInducteur: # ce groupe est associe a une source + new_node.append_child('SOURCE') # on rajoute la propriete de la source, qu'il suffit d'associer ensuite a la liste des sources presentes + if debug: print u" et c'est une source." + elif prefix in listePrefixesInducteurBobine: # ce groupe est associe a une source + new_node.append_child('STRANDED_INDUCTOR_GEOMETRY') # on rajoute la propriete de géométrie de l'inducteur bobiné + if debug: print u" et c'est un inducteur bobine dont on definit la geometrie." + if nom not in dictGroupesMultiples.keys(): # il ne fait pas partie d'un macro-groupe. La source est définie ici, ainsi que le domaine. + new_node.append_child('SOURCE') # on rajoute la propriete de la source, qu'il suffit d'associer ensuite a la liste des sources presentes + new_node.append_child('Domaine') # on rajoute la propriete du domaine (default automatique), qu'il suffit d'associer ensuite a la liste des domaines présents + if debug: print u" et c'est une source en un seul morceau." + else: # ce cas ne devrait pas se produire + pass + dernier=new_node # mise a jour du dernier noeud du JdC, afin de rajouter les autres MESH_GROUPE eventuels a sa suite + except: + raise ValueError, "Ce nom de groupe ("+nomReel+") pose un probleme inconnu" + #print u"ERREUR: ce nom de groupe ("+nomReel+") ne peut pas etre utilise car il ne peut pas servir de concept a cause de caractères interdits, e.g. signes moins (-), plus (+), etc." + else: # prefixe existant mais non autorise + print u"ERREUR: ce nom de groupe ("+groupe+") ne peut pas etre utilise car son prefixe ("+partiesGroupe[0]+") n'est pas dans la liste autorisee "+str(listePrefixes) + if len(dictGroupesMultiples) > 0: # on a des groupes à nom multiples, e.g., inducteur bobiné en morceaux. + for groupe, contenu in dictGroupesMultiples.iteritems(): # parcours de la liste de tous les groupes de maille trouves (volumiques et les autres), et sélection des groupes à nom multiple + if debug: print 'groupe, contenu=', groupe, contenu + nomReel = groupe + prefix = contenu['type'] + try: # test de conformite du nom pour un concept, i.e. une variable Python + exec(nomReel+'=None') # le test consiste a tenter de creer une variable, initialisee a None, a partir du nom, e.g. toto=None est bon mais toto-foo=None ne fonctionne pas. + # creation du groupe MACRO_GROUPE + if dernier != None: + new_node = dernier.append_brother("MACRO_GROUPE",'after') + else: + new_node=editor.tree.racine.append_child("MACRO_GROUPE",pos='first') + test,mess = new_node.item.nomme_sd(nomReel) # precision du nom (de concept) du groupe + if debug: print u"ce nom de groupe ("+nomReel+") est utilise..." + if debug: print u" et on ajoute la liste LISTE_MESHGROUP." + node_list=new_node.append_child('LISTE_MESHGROUP') # Ajout de la liste des membres du groupe multiple + if debug: + print 'Liste possible pour LISTE_MESHGROUP :' + print '_____________________' + print node_list.item.get_liste_possible(()) + print '_____________________' + print dir(node_list.item) + listeNom=node_list.item.get_sd_avant_du_bon_type() + listeObjet=[] + for nom in listeNom: + if nom in dictGroupesMultiples[groupe]['membres']: + #--> transformation du nom en objet + obj,valide=node_list.item.eval_valeur(nom) + listeObjet.append(obj) + node_list.item.set_valeur(listeObjet) + node_list.affichePanneau() + if prefix in listePrefixesMateriaux: # ce groupe est associe a un materiau + new_node.append_child('MATERIAL') # on rajoute la propriete de materiau, qu'il suffit d'associer ensuite a la liste des materiaux presents + if debug: print u" et c'est un materiau." + elif prefix in listePrefixesSourcesHorsInducteur: # ce groupe est associe a une source + new_node.append_child('SOURCE') # on rajoute la propriete de la source, qu'il suffit d'associer ensuite a la liste des sources presentes + if debug: print u" et c'est une source hors inducteur." + elif prefix in listePrefixesInducteurBobine: # ce groupe est associe a une source + new_node.append_child('SOURCE') # on rajoute la propriete de la source, qu'il suffit d'associer ensuite a la liste des sources presentes + new_node.append_child('Domaine') # on rajoute la propriete du domaine (default automatique), qu'il suffit d'associer ensuite a la liste des domaines présents + if debug: print u" et c'est une source inducteur." + elif prefix in listePrefixesTrous: # ce groupe est associe a un trou + new_node.append_child('Domaine') # on rajoute la propriete du domaine (default automatique), qu'il suffit d'associer ensuite a la liste des domaines présents + if debug: print u" et c'est un trou." + else: # ce cas ne devrait pas se produire + pass + dernier=new_node # mise a jour du dernier noeud du JdC, afin de rajouter les autres MESH_GROUPE eventuels a sa suite + except: + print u"ERREUR: ce nom de groupe ("+nomReel+") ne peut pas etre utilise car il ne peut pas servir de concept a cause de caractères interdits, e.g. signes moins (-), plus (+), etc." + +def handleAjoutGroupFiltre(editor,listeGroup): + """CARMEL3D : obtention des groupes de maille du maillage selectionne dans Salome + Les groupes de mailles sont filtres en utilisant une liste des prefixes autorises pour code Code_Carmel3D, + i.e. un nom de groupe de mailles est DIEL_toto_foo par exemple, qui deviendra toto_foo. + La creation du MESH_GROUPE est type (materiau ou source), d'après le prefixe. + ATTENTION! Le nom devenant un concept, i.e. une variable Python, certains signes sont interdits dans le nom du groupe, + e.g. les signes moins (-), plus (+), etc. Une erreur est retournee en ce cas. + """ + from string import join + debug = True + #print 'DEBUG listeGroup manuel' # Il faut aussi commenter la ligne Msg,listeGroup=self.ChercheGrpMailleInSalome() dans la routine ChercheGrpMaille de qtEficas.py + #listeGroup = ['DIEL_air', 'COND_plaque', 'CURRENT_bobine' ] # cas-test plaque Rodger avec DIEL_ + #listeGroup = ['NOCOND_air', 'COND_plaque', 'CURRENT_bobine' ] # cas-test plaque Rodger + #listeGroup = ['DIEL_air', 'COND_plaque', 'NOCOND_noyau', 'CURRENT_bobine_1', 'CURRENT_bobine_2', 'CURRENT_bobine_3' ] + #listeGroup = ['DIEL_air', 'COND_plaque', 'NOCOND_noyau', 'CURRENT_bobine' ] + #listeGroup = ['BBK_bobine', 'DIEL_air', 'COND_plaque', 'NOCOND_noyau', 'CURRENT_bobine' ] # avec BBK + #listeGroup = ['EPORT+_dom', 'EPORT-_dom', 'H', 'COND_cyl', 'EPORT_dom'] # cas-test CSS_Tempimpo + #listeGroup= ['BBK_spire', 'CURRENT_spire_4', 'NOCOND_air', 'CURRENT_spire_3', 'CURRENT_spire_1', 'CURRENT_spire_2'] # cas-test spire_dans l'air en 4 morceaux + #listeGroup= ['BBK_bobine', 'CURRENT_ind_2', 'DIEL_air', 'CURRENT_ind_8', 'CURRENT_ind_6', 'CURRENT_ind_1', 'CURRENT_ind_3', 'CURRENT_ind_7', 'CURRENT_ind_5', 'CURRENT_ind_4', 'BBK_topo', 'COND_plaque', 'TOPO_trou_1', 'TOPO_trou_3', 'TOPO_trou_2', 'TOPO_trou_8', 'TOPO_trou_4', 'TOPO_trou_7', 'TOPO_trou_5', 'TOPO_trou_6'] # cas-test T.E.A.M. Workshop 7 + if debug: + print "listeGroup=", listeGroup + version_catalogue = editor.CONFIGURATION.appli.readercata.version_code # détermination si le catalogue est fréquentiel ou temporel, d'après la deuxième entrée de la liste catalogues dans prefs_CARMEL3D.py + if debug: + print "Version catalogue=", version_catalogue + type_code = version_catalogue.split(' ')[0] # on garde le premier mot de la version du catalogue : 'frequentiel' ou 'temporel' + if debug: + print "Type de code=", type_code + if type_code not in ('frequentiel', 'temporel'): # test de cohérence du type de code + raise ValueError("Ce catalogue n'est ni frequentiel ni temporel") + if type_code == 'frequentiel': + handleAjoutGroupAvecFiltre(editor, listeGroup) + if type_code == 'temporel': + handleAjoutGroupSansFiltre(editor, listeGroup) diff --git a/OldCodes/Carmel3D/configuration_CARMEL3D.py b/OldCodes/Carmel3D/configuration_CARMEL3D.py new file mode 100644 index 00000000..9077185f --- /dev/null +++ b/OldCodes/Carmel3D/configuration_CARMEL3D.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert pour charger les paramètres de configuration d'EFICAS +""" +# Modules Python +import configuration +import os + + +class CONFIG(configuration.CONFIG_BASE): + + #----------------------------------- + def __init__(self,appli,repIni): + #----------------------------------- + + self.labels_user=['exec_acrobat', 'catalogues','savedir'] + self.labels_eficas=['path_doc','exec_acrobat','lang','rep_cata','catalogues'] + + self.INSTALLDIR =os.path.dirname(__file__) + configuration.CONFIG_BASE.__init__(self,appli,repIni) + + +def make_config(appli,rep): + return CONFIG(appli,rep) + diff --git a/OldCodes/Carmel3D/materiaux/ACIER_TEAM13 b/OldCodes/Carmel3D/materiaux/ACIER_TEAM13 new file mode 100644 index 00000000..27b9f3b3 --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/ACIER_TEAM13 @@ -0,0 +1,28 @@ +# B(H) curve from T.E.A.M. Workshop 13 +# New measures, last table from the notice (COMPEL 1995) +# Measures from B=0 to 1.8 T, saturation J_s=2.16T +# Hmod Bmod +0.0 0.0 +45.0 0.0250 +75.0 0.0500 +120.0 0.1000 +173.0 0.2000 +201.0 0.3000 +222.0 0.4000 +240.0 0.5000 +250.0 0.6000 +265.0 0.7000 +280.0 0.8000 +300.0 0.9000 +330.0 1.0000 +365.0 1.1000 +415.0 1.2000 +500.0 1.3000 +640.0 1.4000 +890.0 1.5000 +1150.0 1.5500 +1940.0 1.6000 +3100.0 1.6500 +4370.0 1.7000 +6347.0 1.7500 +8655.0 1.8000 diff --git a/OldCodes/Carmel3D/materiaux/CMakeLists.txt b/OldCodes/Carmel3D/materiaux/CMakeLists.txt new file mode 100644 index 00000000..f6163590 --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/CMakeLists.txt @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + + +install ( FILES + ACIER_TEAM13 E24 FEV470 FEV600 FEV800 FEV1000 HA600 M600_65 M6X2ISO1 + M6X_epsilon.mater M6X_mu.mater M6X_sigma.mater + M6X_homogene_mu.mater M6X_homogene_sigma.mater + M6X_lineaire_mu.mater M6X_lineaire_sigma.mater + materiaux.comm + DESTINATION ${CMAKE_INSTALL_PREFIX}/Carmel3D/materiaux + ) + + +### Local Variables: +### mode: cmake +### End: diff --git a/OldCodes/Carmel3D/materiaux/E24 b/OldCodes/Carmel3D/materiaux/E24 new file mode 100644 index 00000000..bc906b35 --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/E24 @@ -0,0 +1,13 @@ + 0. 0. + 1000.000 1.200000 + 1200.000 1.270000 + 1600.000 1.350000 + 3000.000 1.520000 + 6000.000 1.660000 + 10000.00 1.750000 + 20000.00 1.900000 + 30000.00 2.000000 + 49944.66 2.101082 + 80000.00 2.200000 + 132000.0 2.300000 + 250000.0 2.400000 diff --git a/OldCodes/Carmel3D/materiaux/FEV1000 b/OldCodes/Carmel3D/materiaux/FEV1000 new file mode 100644 index 00000000..7324073a --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/FEV1000 @@ -0,0 +1,31 @@ + 0.0000000 0.0000000 + 54.38605 0.5687161 + 125.0879 0.9107189 + 217.0004 1.133191 + 336.4865 1.285649 + 491.8185 1.394206 + 693.7501 1.474002 + 956.2611 1.534492 + 1297.525 1.581962 + 1741.169 1.620847 + 2317.906 1.654481 + 3067.663 1.685556 + 4042.348 1.716430 + 5309.438 1.749361 + 6956.655 1.786698 + 9098.037 1.831067 + 11881.83 1.882414 + 15500.77 1.931322 + 20205.39 1.976478 + 26321.39 2.017967 + 34272.19 2.056381 + 44608.23 2.092746 + 58045.08 2.128448 + 75512.98 2.165203 + 98221.27 2.205061 + 127742.0 2.250466 + 166119.0 2.304362 + 216009.1 2.370358 + 280866.3 2.452947 + 308952.9 2.488242 + diff --git a/OldCodes/Carmel3D/materiaux/FEV470 b/OldCodes/Carmel3D/materiaux/FEV470 new file mode 100644 index 00000000..d3281a2f --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/FEV470 @@ -0,0 +1,31 @@ + 0. 0. + 40.28202 0.3233068 + 80.56404 0.6466137 + 133.2969 0.8959763 + 196.5763 1.092960 + 272.5116 1.235844 + 363.6339 1.322937 + 472.9807 1.364753 + 604.1969 1.403417 + 761.6563 1.442002 + 950.6076 1.479882 + 1177.349 1.516478 + 1449.439 1.551293 + 1775.947 1.583937 + 2167.756 1.614135 + 2637.928 1.641730 + 3202.133 1.666674 + 3879.180 1.689014 + 4691.636 1.708866 + 5666.584 1.726406 + 6836.521 1.741841 + 8240.445 1.755403 + 9925.154 1.767332 + 11946.81 1.777868 + 14372.79 1.787249 + 17283.96 1.795704 + 20777.38 1.803454 + 24969.48 1.810715 + 30000.00 1.817699 + 33000.00 1.821469 + diff --git a/OldCodes/Carmel3D/materiaux/FEV600 b/OldCodes/Carmel3D/materiaux/FEV600 new file mode 100644 index 00000000..5281d05d --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/FEV600 @@ -0,0 +1,31 @@ + 0. 0. + 40.28202 0.5217850 + 80.56404 1.043570 + 133.2969 1.219489 + 196.5763 1.330541 + 272.5116 1.406615 + 363.6339 1.461884 + 472.9807 1.503975 + 604.1969 1.537396 + 761.6563 1.565024 + 950.6076 1.588824 + 1177.349 1.610226 + 1449.439 1.630343 + 1775.947 1.650098 + 2167.756 1.670444 + 2637.928 1.693085 + 3202.133 1.718405 + 3879.180 1.746379 + 4691.636 1.776860 + 5666.584 1.809549 + 6836.521 1.843973 + 8240.445 1.879470 + 9925.154 1.915191 + 11946.81 1.950107 + 14372.79 1.983036 + 17283.96 2.012676 + 20777.38 2.037636 + 24969.48 2.056473 + 30000.00 2.067699 + 33000.00 2.071469 + diff --git a/OldCodes/Carmel3D/materiaux/FEV800 b/OldCodes/Carmel3D/materiaux/FEV800 new file mode 100644 index 00000000..810c3ab6 --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/FEV800 @@ -0,0 +1,30 @@ + 0. 0. + 40.28202 0.3324555 + 80.56404 0.6649110 + 133.2969 0.9138392 + 196.5763 1.111536 + 272.5116 1.260901 + 363.6339 1.364212 + 472.9807 1.422949 + 604.1969 1.451498 + 761.6563 1.480342 + 950.6076 1.510200 + 1177.349 1.540614 + 1449.439 1.571091 + 1775.947 1.601134 + 2167.756 1.630277 + 2637.928 1.658111 + 3202.133 1.684309 + 3879.180 1.708632 + 4691.636 1.730937 + 5666.584 1.751169 + 6836.521 1.769348 + 8240.445 1.785560 + 9925.154 1.799934 + 11946.81 1.812635 + 14372.79 1.823846 + 17283.96 1.833761 + 20777.38 1.842578 + 24969.48 1.850493 + 30000.00 1.857699 + 33000.00 1.861469 diff --git a/OldCodes/Carmel3D/materiaux/HA600 b/OldCodes/Carmel3D/materiaux/HA600 new file mode 100644 index 00000000..4c4a877c --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/HA600 @@ -0,0 +1,30 @@ + 0. 0. + 40.28202 0.3951843 + 80.56404 0.7903686 + 133.2969 0.9716319 + 196.5763 1.095780 + 272.5116 1.185383 + 363.6339 1.252692 + 472.9807 1.304966 + 604.1969 1.346809 + 761.6563 1.381319 + 950.6076 1.410688 + 1177.349 1.436551 + 1449.439 1.460186 + 1775.947 1.483959 + 2167.756 1.510788 + 2637.928 1.540831 + 3202.133 1.574084 + 3879.180 1.610407 + 4691.636 1.649490 + 5666.584 1.690835 + 6836.521 1.733738 + 8240.445 1.777294 + 9925.154 1.820413 + 11946.81 1.861850 + 14372.79 1.900252 + 17283.96 1.934193 + 20777.38 1.962221 + 24969.48 1.982877 + 30000.00 1.994699 + 33000.00 1.998469 diff --git a/OldCodes/Carmel3D/materiaux/M600_65 b/OldCodes/Carmel3D/materiaux/M600_65 new file mode 100644 index 00000000..cfc3f3ba --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/M600_65 @@ -0,0 +1,30 @@ + 0. 0. + 0.1676396E-03 0.2082807E-05 + 0.3352792E-03 0.4165609E-05 + 0.7823178E-03 0.9719718E-05 + 0.1676395E-02 0.2082782E-04 + 0.3464548E-02 0.4304356E-04 + 0.7040854E-02 0.8747321E-04 + 0.1419346E-01 0.1763252E-03 + 0.2849867E-01 0.3540000E-03 + 0.5710909E-01 0.7092333E-03 + 0.1143299 0.1419235E-02 + 0.2287715 0.2837381E-02 + 0.4576545 0.5666269E-02 + 0.9154205 0.1129461E-01 + 1.830952 0.2243500E-01 + 3.662015 0.4426165E-01 + 7.324139 0.8618276E-01 + 14.64838 0.1637067 + 29.29687 0.2975280 + 58.59383 0.5032464 + 117.1877 0.7693985 + 234.3755 1.046909 + 468.7509 1.279960 + 937.5016 1.447085 + 1875.003 1.563602 + 3750.004 1.671697 + 7500.005 1.775926 + 15000.00 1.854134 + 30000.00 1.897699 + 33000.00 1.901469 diff --git a/OldCodes/Carmel3D/materiaux/M6X2ISO1 b/OldCodes/Carmel3D/materiaux/M6X2ISO1 new file mode 100644 index 00000000..e6facc82 --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/M6X2ISO1 @@ -0,0 +1,16 @@ + 0. 0. + 477.0000 1.100000 + 922.9141 1.633186 + 1337.513 1.756419 + 4292.604 1.852735 + 6366.000 1.880000 + 7958.000 1.900000 + 15915.00 1.980000 + 23873.00 2.020000 + 31830.00 2.045000 + 47746.00 2.080000 + 64329.63 2.111715 + 86767.84 2.145308 + 148638.1 2.239294 + 238700.0 2.355000 + 318300.0 2.420000 diff --git a/OldCodes/Carmel3D/materiaux/M6X_epsilon.mater b/OldCodes/Carmel3D/materiaux/M6X_epsilon.mater new file mode 100644 index 00000000..c1c50ef0 --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/M6X_epsilon.mater @@ -0,0 +1 @@ + 1.0 diff --git a/OldCodes/Carmel3D/materiaux/M6X_homogene_mu.mater b/OldCodes/Carmel3D/materiaux/M6X_homogene_mu.mater new file mode 100644 index 00000000..57d6c245 --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/M6X_homogene_mu.mater @@ -0,0 +1 @@ + 1.5331206E4-j.1.6906576E4 1.9440262E3-j.2.6880635E1 1.6315E1 diff --git a/OldCodes/Carmel3D/materiaux/M6X_homogene_sigma.mater b/OldCodes/Carmel3D/materiaux/M6X_homogene_sigma.mater new file mode 100644 index 00000000..6597c154 --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/M6X_homogene_sigma.mater @@ -0,0 +1 @@ + 0.0 diff --git a/OldCodes/Carmel3D/materiaux/M6X_lineaire_mu.mater b/OldCodes/Carmel3D/materiaux/M6X_lineaire_mu.mater new file mode 100644 index 00000000..8698c6b7 --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/M6X_lineaire_mu.mater @@ -0,0 +1 @@ + 1.60000E4 2.0000E3 3.0000E1 diff --git a/OldCodes/Carmel3D/materiaux/M6X_lineaire_sigma.mater b/OldCodes/Carmel3D/materiaux/M6X_lineaire_sigma.mater new file mode 100644 index 00000000..a4cfcedc --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/M6X_lineaire_sigma.mater @@ -0,0 +1 @@ + 1.492537313E6. diff --git a/OldCodes/Carmel3D/materiaux/M6X_mu.mater b/OldCodes/Carmel3D/materiaux/M6X_mu.mater new file mode 100644 index 00000000..fa1141c2 --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/M6X_mu.mater @@ -0,0 +1,22 @@ + 0. 0. 0. 0. + 625.9739 1.572659 477.0000 0.7020000 + 796.0000 1.665000 796.0000 1.170000 + 1719.099 1.786521 1591.000 1.310000 + 3183.000 1.810000 3183.000 1.430000 + 3979.000 1.830000 3979.000 1.475000 + 4775.000 1.850000 4775.000 1.510000 + 5570.000 1.865000 5570.000 1.540000 + 6366.000 1.880000 6366.000 1.570000 + 7958.000 1.900000 7958.000 1.620000 + 11937.00 1.950000 11937.00 1.695000 + 15915.00 1.980000 15915.00 1.760000 + 19098.00 2.000000 19098.00 1.810000 + 31830.00 2.045000 31830.00 1.930000 + 47746.00 2.080000 47746.00 2.010000 + 63662.00 2.110000 63662.00 2.070000 + 79577.00 2.145000 79577.00 2.120000 + 111041.0 2.200000 111041.0 2.190000 + 143200.0 2.240000 143200.0 2.255000 + 198900.0 2.310000 198900.0 2.325000 + 238700.0 2.355000 238700.0 2.360000 + 318300.0 2.420000 318300.0 2.420000 diff --git a/OldCodes/Carmel3D/materiaux/M6X_sigma.mater b/OldCodes/Carmel3D/materiaux/M6X_sigma.mater new file mode 100644 index 00000000..e69de29b diff --git a/OldCodes/Carmel3D/materiaux/materiaux.comm b/OldCodes/Carmel3D/materiaux/materiaux.comm new file mode 100644 index 00000000..3a5f08f8 --- /dev/null +++ b/OldCodes/Carmel3D/materiaux/materiaux.comm @@ -0,0 +1,270 @@ + +AIR=MATERIAL(TYPE='DIELECTRIC', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=1,), + PERMITTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=1,),); + +ALU=MATERIAL(TYPE='CONDUCTOR', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=1,), + CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('3.448E+7'),),); + +ACIER_NOIR=MATERIAL(TYPE='CONDUCTOR', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.0E+2'),), + CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('6.00000E+6'),),); + +ACIER_CIMBLOT=MATERIAL(TYPE='CONDUCTOR', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('50.0000'),), + CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('3.00000E+6'),),); + +ACIER_PE=MATERIAL(TYPE='CONDUCTOR', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('70'),), + CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.75000E+6'),),); + +ACIER_TEAM13_mesures=MATERIAL(TYPE='DIELECTRIC', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='NONLINEAR', + VALUE=2376, + NATURE='SPLINE', + FILENAME='ACIER_TEAM13', + APPLIEDTO='B(H)&H(B)',), + PERMITTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=('RI',1,0,),),); + +ACIER_TEAM13_Marrocco=MATERIAL(TYPE='DIELECTRIC', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='NONLINEAR', + VALUE=2376, + NATURE='MARROCCO+SATURATION', + ALPHA=9.98, + TAU=106000.0, + C=0.0119, + EPSILON=0.000467, + BMAX=1.85, + HSAT=47732.7, + BSAT=2.22, + JOIN='PARABOLIC', + APPLIEDTO='B(H)&H(B)',), + PERMITTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=('RI',1,0,),),); + +BRONZE=MATERIAL(TYPE='CONDUCTOR', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=3.0,), + CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.00000E+6'),),); + +CUIVRE=MATERIAL(TYPE='CONDUCTOR', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=1.0,), + CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('5.85E+7'),),); + +E24=MATERIAL(TYPE='DIELECTRIC', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='NONLINEAR', + VALUE=Decimal('1.0'), + NATURE='SPLINE', + FILENAME='E24', + APPLIEDTO='B(H)&H(B)',), + PERMITTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.0'),),); + +HA600=MATERIAL(TYPE='DIELECTRIC', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='NONLINEAR', + VALUE=Decimal('1.0'), + NATURE='SPLINE', + FILENAME='HA600', + APPLIEDTO='B(H)&H(B)',), + PERMITTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.0'),),); + +INCONEL600=MATERIAL(TYPE='CONDUCTOR', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=1.01,), + CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('9.7000E+5'),),); + +FERRITEB30=MATERIAL(TYPE='DIELECTRIC', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.10E+3'),), + PERMITTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=1.0,),); + +FERRITE_Ni_Zn=MATERIAL(TYPE='CONDUCTOR', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('15.0000'),), + CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('0.0000010000'),),); + +FERRITE_Mn_Zn=MATERIAL(TYPE='CONDUCTOR', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.25E+3'),), + CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('10'),),); + +FEV470=MATERIAL(TYPE='DIELECTRIC', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='NONLINEAR', + VALUE=Decimal('1.0'), + NATURE='SPLINE', + FILENAME='FEV470', + APPLIEDTO='B(H)&H(B)',), + PERMITTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.0'),),); + +FEV600=MATERIAL(TYPE='DIELECTRIC', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='NONLINEAR', + VALUE=Decimal('1.0'), + NATURE='SPLINE', + FILENAME='FEV600', + APPLIEDTO='B(H)&H(B)',), + PERMITTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.0'),),); + +FEV800=MATERIAL(TYPE='DIELECTRIC', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='NONLINEAR', + VALUE=Decimal('1.0'), + NATURE='SPLINE', + FILENAME='FEV800', + APPLIEDTO='B(H)&H(B)',), + PERMITTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.0'),),); + +FEV1000=MATERIAL(TYPE='DIELECTRIC', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='NONLINEAR', + VALUE=Decimal('1.0'), + NATURE='SPLINE', + FILENAME='FEV1000', + APPLIEDTO='B(H)&H(B)',), + PERMITTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.0'),),); + +M600_65=MATERIAL(TYPE='DIELECTRIC', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='NONLINEAR', + VALUE=Decimal('1.0'), + NATURE='SPLINE', + FILENAME='M600_65', + APPLIEDTO='B(H)&H(B)',), + PERMITTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.0'),),); + +#M6X=MATERIAL(TYPE='EM_ANISOTROPIC', +# PERMEABILITY_File='M6X_mu.mater', +# CONDUCTIVITY_File='M6X_sigma.mater',); + +M6X2ISO1=MATERIAL(TYPE='CONDUCTOR', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='NONLINEAR', + VALUE=Decimal('1.0'), + NATURE='SPLINE', + FILENAME='M6X2ISO1', + APPLIEDTO='B(H)&H(B)',), + CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.724E+6'),),); + +#M6X_LINEAIRE=MATERIAL(TYPE='EM_ANISOTROPIC', +# PERMEABILITY_File='M6X_lineaire_mu.mater', +# CONDUCTIVITY_File='M6X_lineaire_sigma.mater',); + +#M6X_HOMOGENE=MATERIAL(TYPE='EM_ANISOTROPIC', +# PERMEABILITY_File='M6X_homogene_mu.mater', +# CONDUCTIVITY_File='M6X_homogene_sigma.mater',); + +POTASSE=MATERIAL(TYPE='CONDUCTOR', + PERMEABILITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('1.0'),), + CONDUCTIVITY=_F(HOMOGENEOUS='TRUE', + ISOTROPIC='TRUE', + LAW='LINEAR', + VALUE=Decimal('71.43'),),); +#CHECKSUM:614994a51cd56f24959331e5ef1c7a98 -:FIN CHECKSUM diff --git a/OldCodes/Carmel3D/opsCarmel.py b/OldCodes/Carmel3D/opsCarmel.py new file mode 100644 index 00000000..82bbf1fd --- /dev/null +++ b/OldCodes/Carmel3D/opsCarmel.py @@ -0,0 +1,38 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +def INCLUDE(self,FileName,**args): + """ + Fonction sd_prod pour la macro INCLUDE + """ + if hasattr(self,'change_fichier'): + delattr(self,'change_fichier') + delattr(self,'fichier_ini') + + self.make_includeCarmel(fichier=FileName) + +def INCLUDE_context(self,d): + """ + Fonction op_init pour macro INCLUDE + """ + for k,v in self.g_context.items(): + d[k]=v + + diff --git a/OldCodes/Carmel3D/prefs.py b/OldCodes/Carmel3D/prefs.py new file mode 100644 index 00000000..720230dd --- /dev/null +++ b/OldCodes/Carmel3D/prefs.py @@ -0,0 +1,22 @@ +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +code="CARMEL3D" +import sys, os +if os.path.dirname(os.path.abspath(__file__)) not in sys.path : + sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/OldCodes/Carmel3D/prefs_CARMEL3D.py b/OldCodes/Carmel3D/prefs_CARMEL3D.py new file mode 100644 index 00000000..e61693e1 --- /dev/null +++ b/OldCodes/Carmel3D/prefs_CARMEL3D.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +import os + +# repIni sert a localiser le fichier editeur.ini +repIni=os.path.dirname(os.path.abspath(__file__)) + +# lang indique la langue utilisee pour les chaines d'aide : fr ou ang +lang='fr' + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +encoding='utf-8' + +# Choix des catalogues +# format du Tuple (code,version,catalogue,formatOut, finit par defaut Ăventuellement) +catalogues = ( + +# catalogue avec generation Phys et materiaux reels + ('CARMEL3D','temporel (dev)',os.path.join(repIni,'Carmel3D_Cata_temporel_V0.py'),'CARMEL3DTV0','defaut'), + ('CARMEL3D','frequentiel',os.path.join(repIni,'Carmel3D_Cata_frequentiel_V1.py'),'CARMEL3DFV0','defaut') +) diff --git a/OldCodes/Carmel3D/properties.py b/OldCodes/Carmel3D/properties.py new file mode 100644 index 00000000..3db8254b --- /dev/null +++ b/OldCodes/Carmel3D/properties.py @@ -0,0 +1,25 @@ +#@ MODIF properties Accas DATE 02/06/2010 AUTEUR aster M.ADMINISTRATEUR +# CONFIGURATION MANAGEMENT OF EDF VERSION +# RESPONSABLE D6BHHHH J-P.LEFEBVRE +# ====================================================================== +# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# ====================================================================== +# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR +# DE LA VERSION DU CODE_ASTER ASSOCIE +#---------------------------------------------------------------------- +version = "10.1.27" +date = "02/06/2010" +exploit = False diff --git a/OldCodes/Carmel3D/qtEficas_Carmel3D.py b/OldCodes/Carmel3D/qtEficas_Carmel3D.py new file mode 100755 index 00000000..d20a93f0 --- /dev/null +++ b/OldCodes/Carmel3D/qtEficas_Carmel3D.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +""" + Ce module sert à lancer EFICAS configuré pour Carmel +""" +# Modules Python +# Modules Eficas + +import sys,os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +import prefs +from InterfaceQT4 import eficas_go +eficas_go.lance_eficas(code=prefs.code) diff --git a/OldCodes/Carmel3D/style.py b/OldCodes/Carmel3D/style.py new file mode 100644 index 00000000..d4855725 --- /dev/null +++ b/OldCodes/Carmel3D/style.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +""" +Pour modifier le style d'EFICAS il faut ajouter un fichier style.py qui contiendra les +informations sur le style voulu dans son repertoire Eficas_install. + +La methode la plus simple consiste à modifier directement les attributs de l'objet style dans le +fichier style.py d'Eficas_install. Exemple:: + + style.background='yellow' + +pour modifier la couleur du background. + +Il existe une autre méthode qui peut être utilisée quand on veut modifier plusieurs propriétés à la fois. + +Le fichier style.py doit définir une nouvelle classe qui dérive de la classe de base STYLE avec des attributs +de classe qui définiront le nouveau style (par exemple, si on veut modifier le background):: + + class STYLE(STYLE): + background='yellow' + +Il faut ensuite instancier cette classe, dans ce meme fichier, en donnant le nom style à l'objet cree:: + + style=STYLE() + +Tous les attributs de classe possibles sont visibles dans le module Editeur/basestyle.py:: + + background='gray90' + foreground='black' + entry_background='white' + list_background='white' + list_select_background='#00008b' + list_select_foreground='grey' + tooltip_background="yellow" + + standard = ("Helvetica",12) + standard_italique = ("Helvetica",12,'italic') + standard_gras = ("Helvetica",12,'bold') + standard_gras_souligne = ("Helvetica",12,'bold','underline') + + canvas = ('Helvetica',10) + canvas_italique = ('Helvetica',10,'italic') + canvas_gras = ("Helvetica",10,'bold') + canvas_gras_italique = ("Helvetica",12,'bold','italic') + + standard12 = ("Helvetica",14) + standard12_gras = ("Helvetica",14,'bold') + standard12_gras_italique = ( "Helvetica",14,'bold','italic') + + +Le fichier style.py contenu dans le répertoire Aster permet de spécifier des propriétés globales pour une installation. +Les modifications de style contenues dans ce fichier et dans le fichier style.py d'Eficas_install +sont prises en compte dans cet ordre. +""" + +p1=10 +p2=14 +f1="Helvetica" + +style.background='gray90' +style.foreground='black' +style.standard = (f1,p1) +style.standard_italique = (f1,p1,'italic') +style.standard_gras = (f1,p1,'bold') +style.canvas_italique = (f1,p1,'italic') +style.canvas_gras = (f1,p1,'bold') +style.statusfont = (f1,p2) diff --git a/OldCodes/CarmelCND/prefs.py b/OldCodes/CarmelCND/prefs.py index cfd8503b..2dbeff03 100644 --- a/OldCodes/CarmelCND/prefs.py +++ b/OldCodes/CarmelCND/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/CarmelCND/qtEficas_CarmelCND.py b/OldCodes/CarmelCND/qtEficas_CarmelCND.py index f49b9bcb..336afdff 100755 --- a/OldCodes/CarmelCND/qtEficas_CarmelCND.py +++ b/OldCodes/CarmelCND/qtEficas_CarmelCND.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/CarmelCS/prefs.py b/OldCodes/CarmelCS/prefs.py index 2692b028..7b609b2a 100644 --- a/OldCodes/CarmelCS/prefs.py +++ b/OldCodes/CarmelCS/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/CarmelCS/qtEficas_CarmelCS.py b/OldCodes/CarmelCS/qtEficas_CarmelCS.py index b1254f2c..7f9a6e2c 100755 --- a/OldCodes/CarmelCS/qtEficas_CarmelCS.py +++ b/OldCodes/CarmelCS/qtEficas_CarmelCS.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/MED/CataAZ.py b/OldCodes/MED/CataAZ.py new file mode 100755 index 00000000..b6e6494e --- /dev/null +++ b/OldCodes/MED/CataAZ.py @@ -0,0 +1,210 @@ +# coding: utf-8 +import types +from Accas import * + +class grno(GEOM): + """ + Classe servant à définir le nom d'un groupe de noeuds dans le fichier de commande + En clair : un chaine de longueur 24. + """ + def __convert__(cls,valeur): + """ + Fonction de verification de la longueur de la chaine + """ + if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24: + return valeur.strip() + raise ValueError(_(u'On attend une chaine de caractères (de longueur <= 24).')) + __convert__ = classmethod(__convert__) + +class grma(GEOM): + """ + Classe servant à définir le nom d'un groupe de mailles dans le fichier de commande + En clair : un chaine de longueur 24. + """ + def __convert__(cls,valeur): + """ + Fonction de verification de la longueur de la chaine + """ + if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24: + return valeur.strip() + raise ValueError(_(u'On attend une chaine de caractères (de longueur <= 24).')) + __convert__ = classmethod(__convert__) + + +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + if type(valeur) == types.StringType: return None + if len(valeur) != self.ntuple: return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + __repr__=info + __str__=info + +class ObjetUtilisateur(ASSD): pass + + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + ) + + +EXAMPLE = PROC (nom = 'EXAMPLE', + op=None, + + TITRE = SIMP(statut ='o', typ = 'TXM', defaut = 'Mon Etude',), + TITRE2 = SIMP(statut ='f', typ = 'TXM', ), +) +CREEOBJET = OPER (nom="CREEOBJET", + op=None, + sd_prod=ObjetUtilisateur, + UIinfo={"groupes":("Group1",)}, + + TITLE = SIMP(statut ='o', typ = 'TXM', defaut = '',), + RB1 = SIMP(statut ='o', typ = 'I', into = [1,2,3],), + RB2 = SIMP(statut ='o', typ = 'I', into = [1,2,3,4,5,6,],), + CB = SIMP(statut ='o', typ = 'I', into = [1,2,3,4,5,6,7,8,9],), + MBool = SIMP(statut ='o', typ = bool,), + MFile = SIMP(statut ='o', typ = ('Fichier','All Files (*)')), + MDir = SIMP(statut ='o', typ = 'Repertoire'), + Reel1 = SIMP(statut ='o', typ = 'R'), + Compl = SIMP(statut ='o', typ = 'C'), + Tuple2 = SIMP(statut ='o', typ = Tuple(2), validators=VerifTypeTuple(('R','R'))), + Tuple3 = SIMP(statut ='o', typ = Tuple(3), validators=VerifTypeTuple(('R','R','R'))), + InSalome = SIMP(statut ='o', typ = SalomeEntry), + + LTITLE = SIMP(statut ='o', typ = 'TXM', max='**', defaut = '',), + LRB2 = SIMP(statut ='o', typ = 'I', max = '**', into = [1,2,3,4,5,6,],), + LCB = SIMP(statut ='o', typ = 'I', max = '**', homo="SansOrdreNiDoublon", into = [1,2,3,4,5,6,7,8,9],), + LReel1 = SIMP(statut ='o', typ = 'R', max = "**"), + LCompl = SIMP(statut ='o', typ = 'C', max = "**"), + LTuple2 = SIMP(statut ='o', typ = Tuple(2), validators=VerifTypeTuple(('R','R')), max = "**"), + LTuple3 = SIMP(statut ='o', typ = Tuple(3), validators=VerifTypeTuple(('R','R','R')), max = "**"), + LInSalome = SIMP(statut ='o', typ = SalomeEntry, max="**"), + + LREEL = SIMP(statut ='f', typ = 'R', max='**', defaut = '',), +) + +UTILISEOBJET = PROC (nom="UTILISEOBJET", + op=None, + UIinfo={"groupes":("Group1",)}, + Obj = SIMP (statut ='o', typ = ObjetUtilisateur,) +) + +ESSAI_FACT=OPER(nom="ESSAI_FACT", + sd_prod=ObjetUtilisateur, + op=None, + fr="Affectation de caractéristiques à des éléments de structure", + regles = (AU_MOINS_UN('Poutre','Barre'), + EXCLUS('Discret','Discret_2D'),), + Info = SIMP(statut='f',typ='I', defaut= 1 ,into=(1,2) ), + Verif = SIMP(statut='f',typ='TXM',validators=NoRepeat(),max='**',into=("Maille","Noeud") ), +# +# ============================================================================== + Poutre = FACT(statut= 'f',max= '**', + Section = SIMP(statut= 'o',typ= 'TXM' ,into= ("GENERALE","RECTANGLE","CERCLE") ), + + b_generale = BLOC(condition = " Section == 'GENERALE'", + regles = (UN_PARMI('Maille','GroupeMailles'),), + Maille = SIMP(statut= 'f',typ= 'TXM' ,validators= NoRepeat(),max= '**'), + GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'), + + Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE"),defaut= "CONSTANT"), + + b_constant = BLOC(condition = "Vari == 'CONSTANT'", + regles = (PRESENT_ABSENT('Table','Cara'), + PRESENT_PRESENT('Table','Nom'), + PRESENT_PRESENT('Cara','Valeur'),), + Table = SIMP(statut= 'f',typ='TXM'), + Nom = SIMP(statut= 'f',typ= 'TXM'), + Cara = SIMP(statut= 'o',typ= 'TXM',min= 4 ,max= 5, + fr= "A,IY,IZ,JX sont des paramètres obligatoires", + validators= [NoRepeat(), Compulsory(['A','IY','IZ','JX'])], + into= ("A","IY","IZ","AY","AZ","EY","EZ","JX","RY","RZ","RT","JG","IYR2","IZR2","AI") ), + Valeur = SIMP(statut= 'f',typ= 'R',min= 4 ,max= 15), + ), + ), + b_rectangle = BLOC(condition = "Section == 'RECTANGLE'", + regles = (UN_PARMI('Maille','GroupeMailles'),), + Maille = SIMP(statut= 'f',typ= 'TXM' ,validators= NoRepeat(),max= '**'), + GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'), + Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE","AFFINE"),defaut= "CONSTANT"), + b_constant = BLOC(condition = "Vari == 'CONSTANT'", + Cara = SIMP(statut= 'o',typ= 'TXM',min= 1 ,max= 4, + validators = [NoRepeat(), + OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ), + AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )], + into= ("H","EP", "HY","HZ","EPY","EPZ"),), + Valeur = SIMP(statut= 'o',typ= 'R',min= 1 ,max= 4), + ), + + Metrique = SIMP(statut= 'f',typ= 'TXM',defaut= "NON",into= ("OUI","NON") ), + Fcx = SIMP(statut= 'f',typ= 'R'), + Tuyau = SIMP(statut= 'f',typ= 'I',val_max= 10,defaut= 3), + ), + ), +# +# ============================================================================== + Barre = FACT(statut='f',max='**', + regles = (UN_PARMI('Maille','GroupeMailles'),), + Maille = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'), + GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),max='**'), + Section = SIMP(statut='o',typ='TXM',into=("GENERALE","RECTANGLE","CERCLE") ), + b_generale = BLOC(condition = "Section=='GENERALE'", + regles = (PRESENT_ABSENT('Table','Cara'), + PRESENT_PRESENT('Table','Nom'), + PRESENT_PRESENT('Cara','Valeur')), + Table = SIMP(statut='f',typ='TXM'), + Nom = SIMP(statut='f',typ='TXM',validators=LongStr(1,24) ), + Cara = SIMP(statut='f',typ='TXM',into=("A",) ), + Valeur = SIMP(statut='f',typ='R',min=1,max=1 ), + ), + b_rectangle = BLOC(condition = "Section=='RECTANGLE'", + Cara = SIMP(statut='o',typ='TXM', min=1, max=4, + validators = [NoRepeat(), + OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ), + AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )], + into=("H","EP","HZ","HY","EPY","EPZ"), ), + Valeur = SIMP(statut='o',typ='R',min=1,max=4 ), ), + b_cercle = BLOC(condition = "Section=='CERCLE'", + Cara = SIMP(statut='o',typ='TXM',validators=[NoRepeat(),Compulsory(['R'])],min=1,max=2,into=("R","EP") ), + Valeur = SIMP(statut='o',typ='R',min=1,max=2 ), ), + ), +# +# ============================================================================== + Discret = FACT(statut='f',max='**', + REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ), + AMOR_HYST = SIMP(statut='f',typ='R' ), + SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),), + b_SYME_OUI = BLOC(condition="SYME=='OUI'", + fr="SYMETRIQUE: Affectation de matrices de rigidité, de masse ou d'amortissement à des mailles ou noeuds", + Cara = SIMP(statut='o',typ='TXM',validators=NoRepeat(),max=1,defaut="None", + into = ("K_T_D_N", "K_T_D_L", "K_TR_D_N", "K_TR_D_L", "K_T_N", "K_T_L", "K_TR_N", "K_TR_L", + "M_T_D_N", "M_T_D_L", "M_TR_D_N", "M_TR_D_L", "M_T_N", "M_T_L", "M_TR_N", "M_TR_L", + "A_T_D_N", "A_T_D_L", "A_TR_D_N", "A_TR_D_L", "A_T_N", "A_T_L", "A_TR_N", "A_TR_L",),), + # Affection des caractéristiques de RIGIDITE/AMORTISSEMENT/MASSE + b_AK_T_D_N = BLOC(condition = "((Cara=='K_T_D_N')or(Cara=='A_T_D_N'))", + fr = "Noeud: 3 valeurs (triangulaire supérieure par colonne)", + regles = (UN_PARMI('Maille','GroupeMailles','Noeud','GROUP_NO'),), + Noeud = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'), + GROUP_NO = SIMP(statut='f',typ=grno,validators=NoRepeat(),max='**'), + Maille = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'), + GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),homo='SansOrdreNiDoublon',max='**'), + Valeur = SIMP(statut='o',typ='R',min=3 ,max=3 ),), + ), + ), +# +# ============================================================================== + Discret_2D = FACT(statut='f',max='**', + REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ), + AMOR_HYST = SIMP(statut='f',typ='R' ), + SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),), + ), +) + + diff --git a/OldCodes/MED/Elementary_Lists_52996_Cata.py b/OldCodes/MED/Elementary_Lists_52996_Cata.py new file mode 100644 index 00000000..f3cc11c8 --- /dev/null +++ b/OldCodes/MED/Elementary_Lists_52996_Cata.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +from Accas import * + +#class myMesh(ASSD): pass +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('ALL_LISTS'), + #AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') + ) +) + +class grma(): + def __convert__(cls,valeur): + if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24 : #and ("item" in (valeur.strip())) + return valeur.strip() + raise ValueError("Name length does not contain \"test\" and is longer than allowed, 24") + __convert__ = classmethod(__convert__) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=True #change 'o' to 'f' of some widgets in the loop +#empty_defauts=True + +def myBloc(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values + defauts_mask=[False,False,True,True,True] #switch off defaults of some types + defauts=list() + for id0 in range(len(defauts0)): + if defauts_mask[id0]: + item=", defaut="+str(defauts0[id0]) + else: + item="" + defauts.append(item) + #print defauts + + opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups + #make different widgets optional, one by one: + myLen=len(opt) + if switch_facultatif: + make_f=(num)%myLen + opt[make_f]='f' + #print opt + #if empty_defauts: + # clean_defaut=num%myLen + + myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=2,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" + print myString + return eval(myString) + +ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + ang="Model mesh definition EN", + reentrant='n', + #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), + + #LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**'), + #LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**'), + #LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**'), + #LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**'), + + #LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**'), + #LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**'), + #LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**'), + #LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**'), + + #LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'), + #LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'), + + LIST_O_NOREPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04",), min=3, max='**'), + #LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), defaut=('item01','item02','item03'), min=3, max='**'), +) + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/OldCodes/MED/Elementary_Lists_53000_Cata.py b/OldCodes/MED/Elementary_Lists_53000_Cata.py new file mode 100644 index 00000000..0dbba473 --- /dev/null +++ b/OldCodes/MED/Elementary_Lists_53000_Cata.py @@ -0,0 +1,52 @@ +# coding: utf-8 +from Accas import * + +#class myMesh(ASSD): pass +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('ALL_LISTS'), + #AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') + ) +) + + +ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + ang="Model mesh definition EN", + reentrant='n', + LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ="TXM",validators=NoRepeat(), + into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), + defaut=('item01','item02','item03'), + homo="SansOrdreNiDoublon", + min=3, max='**'), + + #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), + + #LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**'), + #LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**'), + #LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**'), + #LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**'), + + #LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**'), + #LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**'), + #LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**'), + #LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**'), + + #LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'), + #LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'), + + #LIST_O_NOREPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04",), min=3, max='**'), + + + #LIST_O_SANSORDRENODOUBLON_CHECKTEXT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), defaut=('item01','item02','item03'), min=3, max='**'), +) + + + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/OldCodes/MED/Elementary_Lists_53013_Cata.py b/OldCodes/MED/Elementary_Lists_53013_Cata.py new file mode 100644 index 00000000..cf371ff2 --- /dev/null +++ b/OldCodes/MED/Elementary_Lists_53013_Cata.py @@ -0,0 +1,59 @@ +# coding: utf-8 +from Accas import * + +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('ALL_LISTS'), + #AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') + ) +) + +class grma(): + def __convert__(cls,valeur): + if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): # + return valeur.strip() + raise ValueError("Name length does not contain \"test\" and is longer than allowed, 12") + __convert__ = classmethod(__convert__) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + fr="All lists definition FR", + ang="All lists definition EN", + reentrant='n', + #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), + + L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'), + L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'), + L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'), + L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'), + + L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'), + L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'), + L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'), + L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'), + + L9_LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, EN',), + L10_LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ='TXM', into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Optional, Allowed Repetitions, any text, EN'), + L11_LIST_O_REPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma, into=("item01","text01","item02","text02","item03","text03","item04","text04"),ang='With spare list, obligatory, No Repetitions, checked text, no default values, EN', min=3, max='**'), + L12_LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), defaut=('item01','item02','item03'), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, with default values EN'), + + L13_LIST_F_SANSORDRENODOUBLON_ANYTEXT_NODEFAUT=SIMP(statut='f',typ='TXM',homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Optional, any text, no defaults, EN'), + L14_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NODEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Obligatory, checked text, EN'), + L15_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03","item02","text02","item01","text01",), defaut=('item01','item02','item03'), min=3, max='**', ang='With check boxes, Obligatory, checked text, with default values, EN'), +) + + + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/OldCodes/MED/Elementary_Lists_53036_Cata.py b/OldCodes/MED/Elementary_Lists_53036_Cata.py new file mode 100644 index 00000000..5cdc0faa --- /dev/null +++ b/OldCodes/MED/Elementary_Lists_53036_Cata.py @@ -0,0 +1,59 @@ +# coding: utf-8 +from Accas import * + +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('ALL_LISTS'), + #AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') + ) +) + +class grma(): + def __convert__(cls,valeur): + if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): # + return valeur.strip() + raise ValueError("Name length does not contain \"item\" and is longer than allowed, 12") + __convert__ = classmethod(__convert__) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + fr="All lists definition FR", + ang="All lists definition EN", + reentrant='n', + #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), + + L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'), + L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'), + L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'), + L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'), + + L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'), + L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'), + L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'), + L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'), + + L9_LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, EN',), + L10_LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ='TXM', into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Optional, Allowed Repetitions, any text, EN'), + L11_LIST_O_REPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma, into=("item01","text01","item02","text02","item03","text03","item04","text04"),ang='With spare list, obligatory, No Repetitions, checked text, no default values, EN', min=3, max='**'), + L12_LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), defaut=('item01','item02','item03'), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, with default values EN'), + + L13_LIST_F_SANSORDRENODOUBLON_ANYTEXT_NODEFAUT=SIMP(statut='f',typ='TXM',homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Optional, any text, no defaults, EN'), + L14_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NODEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Obligatory, checked text, EN'), + L15_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NOREPEAT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03","item03","text03","item02","text02","item01","text01",), defaut=('item01','item02','item03'), min=3, max='**', ang='With check boxes, Obligatory, checked text, with default values, EN'), #validators=NoRepeat(), +) + + + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/OldCodes/MED/Elementary_Lists_Cata.py b/OldCodes/MED/Elementary_Lists_Cata.py new file mode 100755 index 00000000..92d20b35 --- /dev/null +++ b/OldCodes/MED/Elementary_Lists_Cata.py @@ -0,0 +1,59 @@ +# coding: utf-8 +from Accas import * + +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('ALL_LISTS'), + #AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') + ) +) + +class grma(): + def __convert__(cls,valeur): + if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): # + return valeur.strip() + raise ValueError("Name length does not contain \"test\" and is longer than allowed, 12") + __convert__ = classmethod(__convert__) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + fr="All lists definition FR", + ang="All lists definition EN", + reentrant='n', + #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), + + L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'), + L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'), + L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'), + L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'), + + L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'), + L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'), + L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'), + L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'), + + L9_LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, EN',), + L10_LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ='TXM', into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Optional, Allowed Repetitions, any text, EN'), + L11_LIST_O_REPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma, into=("item01","text01","item02","text02","item03","text03","item04","text04"),ang='With spare list, obligatory, No Repetitions, checked text, no default values, EN', min=3, max='**'), + L12_LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), defaut=('item01','item02','item03'), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, with default values EN'), + + L13_LIST_F_SANSORDRENODOUBLON_ANYTEXT_NODEFAUT=SIMP(statut='f',typ='TXM',homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Optional, any text, no defaults, EN'), + L14_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NODEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Obligatory, checked text, EN'), + L15_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), defaut=('item01','item02','item03'), min=3, max='**', ang='With check boxes, Obligatory, checked text, with default values, EN'), +) + + + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/OldCodes/MED/Global_Condition_Cata.py b/OldCodes/MED/Global_Condition_Cata.py new file mode 100755 index 00000000..02396340 --- /dev/null +++ b/OldCodes/MED/Global_Condition_Cata.py @@ -0,0 +1,53 @@ +# coding: utf-8 +from Accas import * +#class myModel(ASSD): pass + +JdC = JDC_CATA(code='GLOB_COND', + execmodul=None, + regles=(AU_PLUS_UN('TYPES',), + AU_PLUS_UN('INITS',), + AU_PLUS_UN('DATAS',), + #A_CLASSER('TYPES','INITS','DATAS') + ) +); + +TYPES=PROC(nom='TYPES',op=None,UIinfo={"groupes":("Global_Workflow",)}, #sd_prod=myModel, + MODE=SIMP( + typ='TXM', + statut='o', + position='global_jdc', + into=("MANUAL","AUTOMATIC","MIXED"), + defaut="AUTOMATIC", + ), +); + +liste_condition=('INITS', 'DATAS') + +INITS=PROC(nom='INITS',op=None,UIinfo={"groupes":("INI_param",)}, + ini_manual=BLOC(condition="MODE == 'MANUAL'", + Informer=SIMP(statut='o',typ='TXM', defaut="INITS MANUAL"), + ), + ini_auto=BLOC(condition="MODE == 'AUTOMATIC'", + Informer=SIMP(statut='o', typ='TXM', defaut="INITS AUTOMATIC",), + ), + ini_mixed=BLOC(condition="MODE == 'MIXED'", + Informer=SIMP(statut='o',typ='TXM', defaut="INITS MIXED",), + ), +); +DATAS=PROC(nom='DATAS',op=None,UIinfo={"groupes":("DATAS",)}, + data_manual=BLOC(condition="MODE == 'MANUAL'", + Informer=SIMP(statut='o',typ='TXM', defaut="DATAS MANUAL", + ), + ), + data_auto=BLOC(condition="MODE == 'AUTOMATIC'", + Informer=SIMP(statut='o', typ='TXM', defaut="DATAS AUTOMATIC", + ), + ), + data_mixed=BLOC(condition="MODE == 'MIXED'", + Informer=SIMP(statut='o',typ='TXM', defaut="DATAS MIXED", + ), + ), +); + +Classement_Commandes_Ds_Arbre=('TYPES','INITS','DATAS') +Ordre_Des_Commandes = ('TYPES','INITS','DATAS') diff --git a/OldCodes/MED/Many_Concepts_52983_Cata.py b/OldCodes/MED/Many_Concepts_52983_Cata.py new file mode 100644 index 00000000..70f099ac --- /dev/null +++ b/OldCodes/MED/Many_Concepts_52983_Cata.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +from Accas import * + +#class myMesh(ASSD): pass +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(UN_PARMI('DEBUT', 'POURSUITE'), + AU_MOINS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) + +DEBUT=PROC(nom="DEBUT", op=68, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", + PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), +) +AFFE_MODELE=OPER(nom="AFFE_MODELE",op=None,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + ang="Model mesh definition EN", + MESH=SIMP(statut='o',typ='TXM',into=("mesh_01","mesh_02","mesh_03","mesh_04",) , defaut="mesh_01"), + #reentrant='n', + #regles=(AU_MOINS_UN('AFFE','AFFE_SOUS_STRUC'),UN_PARMI('MAILLAGE','GRILLE')), + + + block_mesh_01=BLOC(condition="MESH=='mesh_01'", + AFFE=FACT(statut='o', + ALL=SIMP(statut='o', typ=bool,ang='ALL 01 help EN', defaut=True), + PHENOMENA=SIMP(statut='o',typ='TXM',into=('phenomena_01','phenomena_02',), defaut='phenomena_01'), + #MODELISATION=SIMP(statut='o',typ='TXM', min=2,max='**', into=("mesh_01","mesh_02","mesh_03","mesh_04",) ,ang='Input 01 list EN', fr='Input 01 list FR'), + MODELISATION=SIMP(statut='o',typ='TXM', min=2,max='**', into=('Item_01_01','Item_01_02',) ,ang='Input 01 list EN', fr='Input 01 list FR'), + ), + ), +) +FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, + FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), +) + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH','AFFE_MODELE','FIN') +Ordre_Des_Commandes = ('DEBUT','MESH','AFFE_MODELE','FIN') diff --git a/OldCodes/MED/Many_Concepts_52988_Cata.py b/OldCodes/MED/Many_Concepts_52988_Cata.py new file mode 100644 index 00000000..52d4f10f --- /dev/null +++ b/OldCodes/MED/Many_Concepts_52988_Cata.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +from Accas import * + +class myMesh(ASSD): pass +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('AFFE_MODELE'), + AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=True #change 'o' to 'f' of some widgets in the loop +empty_defauts=True + +def myBloc(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values + defauts_mask=[False,False,True,True,True] #switch off defaults of some types + defauts=list() + for id0 in range(len(defauts0)): + if defauts_mask[id0]: + item=", defaut="+str(defauts0[id0]) + else: + item="" + defauts.append(item) + #print defauts + + opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups + #make some widgets optional: + myLen=len(opt) + if switch_facultatif: + make_f=(num)%myLen + opt[make_f]='f' + #print opt + if empty_defauts: + clean_defaut=num%myLen + + myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=2,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" + print myString + return eval(myString) + +DEBUT=PROC(nom="DEBUT", op=10, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", + PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), +); + +AFFE_MODELE=OPER(nom="AFFE_MODELE",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + ang="Model mesh definition EN", + reentrant='n', + regles=(AU_MOINS_UN('APPROVED')), + MESH=SIMP(statut='o',typ='TXM',into=mySeveral("mesh_",4) ,defaut="mesh_01"), + APPROVED=SIMP(statut="o", typ=bool), + block_mesh_01=myBloc(1), + block_mesh_02=myBloc(2), + block_mesh_03=myBloc(3), + block_mesh_04=myBloc(4), +) + + +FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, + FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), +); + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') diff --git a/OldCodes/MED/Many_Concepts_52989_Cata.py b/OldCodes/MED/Many_Concepts_52989_Cata.py new file mode 100644 index 00000000..930d9e89 --- /dev/null +++ b/OldCodes/MED/Many_Concepts_52989_Cata.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +from Accas import * + +#class myMesh(ASSD): pass +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('AFFE_MODELE'), + AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=True #change 'o' to 'f' of some widgets in the loop +#empty_defauts=True + +def myBloc(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values + defauts_mask=[False,False,True,True,True] #switch off defaults of some types + defauts=list() + for id0 in range(len(defauts0)): + if defauts_mask[id0]: + item=", defaut="+str(defauts0[id0]) + else: + item="" + defauts.append(item) + #print defauts + + opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups + #make different widgets optional, one by one: + myLen=len(opt) + if switch_facultatif: + make_f=(num)%myLen + opt[make_f]='f' + #print opt + #if empty_defauts: + # clean_defaut=num%myLen + + myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=2,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" + print myString + return eval(myString) + +DEBUT=PROC(nom="DEBUT", op=10, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", + PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), +); + +AFFE_MODELE=OPER(nom="AFFE_MODELE",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + ang="Model mesh definition EN", + reentrant='n', + regles=(AU_MOINS_UN('APPROVED')), + MESH=SIMP(statut='o',typ='TXM',into=mySeveral("mesh_",4) ,defaut="mesh_01"), + APPROVED=SIMP(statut="f", typ=bool), # presence of this item will validate the whole group + PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ='I', defaut=True), + block_mesh_01=myBloc(1), + block_mesh_02=myBloc(2), + block_mesh_03=myBloc(3), + block_mesh_04=myBloc(4), +) + + +FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, + FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), +); + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') diff --git a/OldCodes/MED/Many_Concepts_52992_Cata.py b/OldCodes/MED/Many_Concepts_52992_Cata.py new file mode 100644 index 00000000..13145b96 --- /dev/null +++ b/OldCodes/MED/Many_Concepts_52992_Cata.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +from Accas import * + +#class myMesh(ASSD): pass +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('AFFE_MODELE'), + AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=True #change 'o' to 'f' of some widgets in the loop +#empty_defauts=True + +def myBloc(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values + defauts_mask=[False,False,True,True,False] #switch off defaults of some types + defauts=list() + for id0 in range(len(defauts0)): + if defauts_mask[id0]: + item=", defaut="+str(defauts0[id0]) + else: + item="" + defauts.append(item) + #print defauts + + opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups + #make different widgets optional, one by one: + myLen=len(opt) + if switch_facultatif: + make_f=(num)%myLen + opt[make_f]='f' + #print opt + #if empty_defauts: + # clean_defaut=num%myLen + + myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=4,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" + print myString + return eval(myString) + +DEBUT=PROC(nom="DEBUT", op=10, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", + PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), +); + +AFFE_MODELE=OPER(nom="AFFE_MODELE",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + ang="Model mesh definition EN", + reentrant='n', + regles=(AU_MOINS_UN('APPROVED')), + MESH=SIMP(statut='o',typ='TXM',into=mySeveral("mesh_",4) ,defaut="mesh_01"), + APPROVED=SIMP(statut="f", typ=bool), # presence of this item will validate the whole group + block_mesh_01=myBloc(1), + block_mesh_02=myBloc(2), + block_mesh_03=myBloc(3), + block_mesh_04=myBloc(4), +) + + +FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, + FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), +); + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') diff --git a/OldCodes/MED/Matrix_Cata.py b/OldCodes/MED/Matrix_Cata.py new file mode 100644 index 00000000..268a77bf --- /dev/null +++ b/OldCodes/MED/Matrix_Cata.py @@ -0,0 +1,87 @@ +# coding: utf-8 +from Accas import * + +class loi ( ASSD ) : pass +class variable ( ASSD ) : pass + +class Matrice: + def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None): + self.nbLigs=nbLigs + self.nbCols=nbCols + self.methodeCalculTaille=methodeCalculTaille + self.formatSortie=formatSortie + self.valSup=valSup + self.valMin=valMin + self.structure=structure + + def __convert__(self,valeur): + # Attention ne verifie pas grand chose + if type(valeur) != types.ListType : + return None + return valeur + + def info(self): + return "Matrice %s x %s" % (self.nbLigs, self.nbCols) + + __repr__=info + __str__=info + + + +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(AU_MOINS_UN ( 'CORRELATION' ), + ) +) + +DETERMINISTICVARIABLE = OPER ( nom = "DETERMINISTICVARIABLE", + sd_prod = variable, + op = None, + fr = "Variable deterministe", + ang = "Deterministic variable", + + N = SIMP ( statut = 'o', typ = "TXM", fr = "Nom", ang = "Name", defaut = "Var1" ), + T = SIMP ( statut = 'o', defaut = "in", into = ( "in" , "out", ), typ = "TXM", fr = "Type", ang = "Type" ), + R = SIMP ( statut = 'o', defaut = 0, typ = "I", fr = "Rang", ang = "Rank" ), +) + +DISTRIBUTION = OPER ( nom = "DISTRIBUTION", + sd_prod = loi, + op = 68, + fr = "Definitions des lois marginales utilisees par les variables d'entree", + + R = SIMP ( statut = "o", typ = "R", max = 1, val_min = 0., fr = "Parametre R de la loi | R > 0", ang = "R parameter | R > 0", defaut = 0.5 ), + # T > R + T = SIMP ( statut = "o", typ = "R", max = 1, val_min = 0., fr = "Parametre T de la loi | T > R", ang = "T parameter | T > R", defaut = 0.7 ), + A = SIMP ( statut = "o", typ = "R", max = 1, fr = "Borne inferieure du support de la loi", ang = "Support lower bound", defaut = 0.1 ), + # B > A + B = SIMP ( statut = "o", typ = "R", max = 1, fr = "Borne superieure du support de la loi", ang = "Support upper bound", defaut = 0.3 ), +) + +VARIABLE = PROC ( nom = "VARIABLE", + op = None, + docu = "", + fr = "Variable probabiliste", + ang = "Probabilistic variable", + + ModelVariable = SIMP ( statut = "o", typ = ( variable, ), fr = "Variable d'entrée du modèle", ang = "Input variable of the model" ), + Distribution = SIMP ( statut = "o", typ = ( loi, ), fr = "Modélisation probabiliste", ang = "Probabilistic modelisation" ), +) + +CORRELATION = PROC ( nom = 'CORRELATION', + op = None, + docu = "", + fr = "Correlation entre variables", + ang = "Variable correlation", + + CorrelationMatrix = SIMP ( statut = "o", typ = Matrice(nbLigs=None, + nbCols=None, + methodeCalculTaille='NbDeVariables', + valSup=1, + valMin=-1, + structure="symetrique"), + fr = "Matrice de correlation entre les variables d'entree", + ang = "Correlation matrix for input variables" ), +) diff --git a/OldCodes/MED/Nested_Cond_52945_Cata.py b/OldCodes/MED/Nested_Cond_52945_Cata.py new file mode 100644 index 00000000..9d3b119d --- /dev/null +++ b/OldCodes/MED/Nested_Cond_52945_Cata.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +from Accas import * + +class loi(): pass + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +use_and=False #switch off second condition about MAX_ROWS while it does not work for blocks greater than 2 +def cond2(myMax=False): + if use_and: + if myMax: + out= " and MAX_ROWS>="+str(myMax) + else: + out="" + else: + out="" + print out + return out + +PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", + MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8), + PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1A","2A","add new row",)), + wideblock1=BLOC(condition='PROCGROUP1=="add new row"'+cond2(1), + PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1A","add new row","3A",)), + wideblock2=BLOC(condition='PROCGROUP2=="add new row"'+cond2(2), + PROCGROUP3=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + PROCGROUP689=SIMP(statut='o',typ='TXM',), + wideblock3=BLOC(condition='PROCGROUP3=="add new row"'+cond2(3), + PROCGROUP4=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock4=BLOC(condition='PROCGROUP4=="add new row"'+cond2(4), + PROCGROUP5=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), + wideblock5=BLOC(condition='PROCGROUP5=="add new row"'+cond2(5), + PROCGROUP6=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock6=BLOC(condition='PROCGROUP6=="add new row"'+cond2(6), + PROCGROUP7=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock7=BLOC(condition='PROCGROUP7=="add new row"'+cond2(7), + PROCGROUP8=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), + wideblock8=BLOC(condition='PROCGROUP8=="add new row"'+cond2(8), + ) + ) + ) + ) + ) + ) + ) + ) +) + +#LEV1 = OPER( nom = "LEV1", +# sd_prod=loi, +# op=68, +# fr='LEV1 FR', +# Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'), +# SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"), +#) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/MED/Nested_Cond_52946_Cata.py b/OldCodes/MED/Nested_Cond_52946_Cata.py new file mode 100644 index 00000000..fef5edf0 --- /dev/null +++ b/OldCodes/MED/Nested_Cond_52946_Cata.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +from Accas import * + +class loi(): pass + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +use_and=True #switch off second condition about MAX_ROWS while it does not work for blocks greater than 2 +def cond2(myMax=False): + if use_and: + if myMax: + out= " and MAX_ROWS>="+str(myMax) + else: + out="" + else: + out="" + print out + return out + +PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", + MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8), + PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock1=BLOC(condition='PROCGROUP1=="add new row"'+cond2(1), + PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + #wideblock2=BLOC(condition='PROCGROUP2=="add new row"', + wideblock2=BLOC(condition='MAX_ROWS == 8', + #wideblock2=BLOC(condition='PROCGROUP2=="add new row" and (MAX_ROWS > 2)', + PROCGROUP3=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock3=BLOC(condition='PROCGROUP3=="add new row"'+cond2(3), + PROCGROUP4=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock4=BLOC(condition='PROCGROUP4=="add new row"'+cond2(4), + PROCGROUP5=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), + wideblock5=BLOC(condition='PROCGROUP5=="add new row"'+cond2(5), + PROCGROUP6=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock6=BLOC(condition='PROCGROUP6=="add new row"'+cond2(6), + PROCGROUP7=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock7=BLOC(condition='PROCGROUP7=="add new row"'+cond2(7), + PROCGROUP8=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), + wideblock8=BLOC(condition='PROCGROUP8=="add new row"'+cond2(8), + ) + ) + ) + ) + ) + ) + ) + ) +) + +#LEV1 = OPER( nom = "LEV1", +# sd_prod=loi, +# op=68, +# fr='LEV1 FR', +# Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'), +# SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"), +#) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/MED/Nested_Cond_52947_Cata.py b/OldCodes/MED/Nested_Cond_52947_Cata.py new file mode 100644 index 00000000..bf3be39e --- /dev/null +++ b/OldCodes/MED/Nested_Cond_52947_Cata.py @@ -0,0 +1,17 @@ +# coding: utf-8 + +from Accas import * + +class loi(): pass + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) + +PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", + PROCGROUP1=SIMP(statut='o',typ='TXM',into=("a1","a2","a3",)), +) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/MED/Nested_Cond_52948_Cata.py b/OldCodes/MED/Nested_Cond_52948_Cata.py new file mode 100644 index 00000000..81f216f8 --- /dev/null +++ b/OldCodes/MED/Nested_Cond_52948_Cata.py @@ -0,0 +1,21 @@ +# coding: utf-8 + +from Accas import * + +class loi(ASSD): pass + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) + +PER_01 = OPER( nom = "PER_01", + sd_prod=loi, + op=68, + fr='LEV1 FR', + Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'), + SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"), +) + +#Classement_Commandes_Ds_Arbre=('OPER_01',) + +#Ordre_Des_Commandes = ('OPER_01',) diff --git a/OldCodes/MED/Nested_Cond_52949_Cata.py b/OldCodes/MED/Nested_Cond_52949_Cata.py new file mode 100644 index 00000000..d09011a3 --- /dev/null +++ b/OldCodes/MED/Nested_Cond_52949_Cata.py @@ -0,0 +1,19 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) + +PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", + MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8), + PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock1=BLOC(condition='PROCGROUP1 in "add new row"', + PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + ) +) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/MED/Nested_Cond_52952_Cata.py b/OldCodes/MED/Nested_Cond_52952_Cata.py new file mode 100644 index 00000000..47a8d7c5 --- /dev/null +++ b/OldCodes/MED/Nested_Cond_52952_Cata.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +from Accas import * + +class loi(): pass + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +use_and=False #switch off second condition about MAX_ROWS while it does not work for blocks greater than 2 +def cond2(myMax=False): + if use_and: + if myMax: + out= " and MAX_ROWS>="+str(myMax) + else: + out="" + else: + out="" + #print out + return out + +PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", + MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8), + PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock1=BLOC(condition='PROCGROUP1=="add new row"'+cond2(1), + PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock2=BLOC(condition='PROCGROUP2=="add new row"'+cond2(2), + PROCGROUP3=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock3=BLOC(condition='PROCGROUP3=="add new row"'+cond2(3), + PROCGROUP4=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock4=BLOC(condition='PROCGROUP4=="add new row"'+cond2(4), + PROCGROUP5=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), + wideblock5=BLOC(condition='PROCGROUP5=="add new row"'+cond2(5), + PROCGROUP6=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock6=BLOC(condition='PROCGROUP6=="add new row"'+cond2(6), + PROCGROUP7=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock7=BLOC(condition='PROCGROUP7=="add new row"'+cond2(7), + PROCGROUP8=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), + wideblock8=BLOC(condition='PROCGROUP8=="add new row"'+cond2(8), + ) + ) + ) + ) + ) + ) + ) + ) +) + +#LEV1 = OPER( nom = "LEV1", +# sd_prod=loi, +# op=68, +# fr='LEV1 FR', +# Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'), +# SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"), +#) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/MED/Separate_Blocks_52958_Cata.py b/OldCodes/MED/Separate_Blocks_52958_Cata.py new file mode 100644 index 00000000..1327a3fb --- /dev/null +++ b/OldCodes/MED/Separate_Blocks_52958_Cata.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +def several(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +NUMERICAL_PARAMETERS=PROC(nom = "NUMERICAL_PARAMETERS", op=None, ang="Help for NUMERICAL_PARAMETERS, English version", + #Equations=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), + Solver_definition=FACT(statut = 'o', + Solver = SIMP(statut = 'o',typ = 'TXM', into=several("Solver_",12), defaut="Solver_06"), + ) +) +PASCALE=PROC(nom = "PASCALE", op=None, ang="Help for NUMERICAL_PARAMETERS, English version", + Equations=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), + Solver_definition=FACT(statut = 'o', + Solver = SIMP(statut = 'o',typ = 'TXM', into=several("Solver_",12), defaut="Solver_06"), + ) +) + +Classement_Commandes_Ds_Arbre=('NUMERICAL_PARAMETERS',) + +Ordre_Des_Commandes = ('NUMERICAL_PARAMETERS',) diff --git a/OldCodes/MED/Separate_Blocks_52963_Cata.py b/OldCodes/MED/Separate_Blocks_52963_Cata.py new file mode 100644 index 00000000..c115196f --- /dev/null +++ b/OldCodes/MED/Separate_Blocks_52963_Cata.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +def myFact(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + myString="FACT(statut = 'f', List_"+myNum+" = SIMP(statut = 'o',typ = 'TXM', into=mySeveral('"+list_item_body+"',12), defaut='"+list_item_body+myNum+"'),Real_"+myNum+" = SIMP(statut = 'o',typ = 'R', defaut = "+str(num/100.)+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = 'o',typ = 'I', defaut = "+str(100+num)+",ang='Max_Iter "+myNum+" help EN'))" + print myString + return eval(myString) + + +PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="", + Radio_01=SIMP(statut = 'f',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), + FACT_01=myFact(1), + FACT_02=myFact(2), + FACT_03=myFact(3), + FACT_04=myFact(4), + FACT_05=myFact(5), + FACT_06=myFact(6), + FACT_07=myFact(7), + FACT_08=myFact(8), + FACT_09=myFact(9), + FACT_10=myFact(10), + FACT_11=myFact(11), + FACT_12=myFact(12), +) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/MED/Separate_Blocks_52966_Cata.py b/OldCodes/MED/Separate_Blocks_52966_Cata.py new file mode 100644 index 00000000..baef1eb1 --- /dev/null +++ b/OldCodes/MED/Separate_Blocks_52966_Cata.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=False #change 'o' to 'f' of some widgets in the loop + +def myFact(num): + opt=['o','f','o','o'] + if switch_facultatif: + myLen=len(opt) + make_f=(num-1)%myLen + opt[make_f]='f' + #print opt + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + myString="FACT(statut = '"+opt[0]+"', List_"+myNum+" = SIMP(statut = '"+opt[1]+"',typ = 'TXM', into=mySeveral('"+list_item_body+"',12), defaut='"+list_item_body+myNum+"'),Real_"+myNum+" = SIMP(statut = '"+opt[2]+"',typ = 'R', defaut = "+str(num/100.)+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = '"+opt[3]+"',typ = 'I', defaut = "+str(100+num)+",ang='Max_Iter "+myNum+" help EN'))" + print myString + return eval(myString) + + +PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="", + Radio_01=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), + FACT_01=myFact(1), + FACT_02=myFact(2), + FACT_03=myFact(3), + FACT_04=myFact(4), + FACT_05=myFact(5), + FACT_06=myFact(6), + FACT_07=myFact(7), + FACT_08=myFact(8), + FACT_09=myFact(9), + FACT_10=myFact(10), + FACT_11=myFact(11), + FACT_12=myFact(12), +) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/MED/Separate_Blocks_52972_Cata.py b/OldCodes/MED/Separate_Blocks_52972_Cata.py new file mode 100644 index 00000000..88927e49 --- /dev/null +++ b/OldCodes/MED/Separate_Blocks_52972_Cata.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=True #change 'o' to 'f' of some widgets in the loop +empty_defauts=True + +def myFact(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + + defauts0=["","'"+list_item_body+myNum+"'", str(num/100.), str(100+num), "'Text_"+myNum+"'" ] #presence of default values + defauts_mask=[False,True,True,False,True] #switch off defaults of some types + defauts=list() + for id0 in range(len(defauts0)): + if defauts_mask[id0]: + item=", defaut="+defauts0[id0] + else: + item="" + defauts.append(item) + print defauts + + opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups + #make some widgets optional: + myLen=len(opt) + if switch_facultatif: + make_f=(num)%myLen + opt[make_f]='f' + #print opt + if empty_defauts: + clean_defaut=num%myLen + + + myString="FACT(statut = '"+opt[0]+"', List_"+myNum+" = SIMP(statut = '"+opt[1]+"',typ = 'TXM', into=mySeveral('"+list_item_body+"',12)"+defauts[1]+"),Real_"+myNum+" = SIMP(statut = '"+opt[2]+"',typ = 'R'"+defauts[2]+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = '"+opt[3]+"',typ = 'I'"+defauts[3]+",ang='Integer "+myNum+" help EN'),Text_"+myNum+" = SIMP(statut = '"+opt[4]+"',typ = 'TXM'"+defauts[4]+",ang='Text "+myNum+" help EN'))" + print myString + return eval(myString) + + +PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="", + Radio_01=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), + FACT_01=myFact(1), + FACT_02=myFact(2), + FACT_03=myFact(3), + FACT_04=myFact(4), + FACT_05=myFact(5), + #FACT_06=myFact(6), + #FACT_07=myFact(7), + #FACT_08=myFact(8), + #FACT_09=myFact(9), + #FACT_10=myFact(10), + #FACT_11=myFact(11), + #FACT_12=myFact(12), +) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/MED/Separate_Blocks_52975_Cata.py b/OldCodes/MED/Separate_Blocks_52975_Cata.py new file mode 100644 index 00000000..88927e49 --- /dev/null +++ b/OldCodes/MED/Separate_Blocks_52975_Cata.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=True #change 'o' to 'f' of some widgets in the loop +empty_defauts=True + +def myFact(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + + defauts0=["","'"+list_item_body+myNum+"'", str(num/100.), str(100+num), "'Text_"+myNum+"'" ] #presence of default values + defauts_mask=[False,True,True,False,True] #switch off defaults of some types + defauts=list() + for id0 in range(len(defauts0)): + if defauts_mask[id0]: + item=", defaut="+defauts0[id0] + else: + item="" + defauts.append(item) + print defauts + + opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups + #make some widgets optional: + myLen=len(opt) + if switch_facultatif: + make_f=(num)%myLen + opt[make_f]='f' + #print opt + if empty_defauts: + clean_defaut=num%myLen + + + myString="FACT(statut = '"+opt[0]+"', List_"+myNum+" = SIMP(statut = '"+opt[1]+"',typ = 'TXM', into=mySeveral('"+list_item_body+"',12)"+defauts[1]+"),Real_"+myNum+" = SIMP(statut = '"+opt[2]+"',typ = 'R'"+defauts[2]+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = '"+opt[3]+"',typ = 'I'"+defauts[3]+",ang='Integer "+myNum+" help EN'),Text_"+myNum+" = SIMP(statut = '"+opt[4]+"',typ = 'TXM'"+defauts[4]+",ang='Text "+myNum+" help EN'))" + print myString + return eval(myString) + + +PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="", + Radio_01=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), + FACT_01=myFact(1), + FACT_02=myFact(2), + FACT_03=myFact(3), + FACT_04=myFact(4), + FACT_05=myFact(5), + #FACT_06=myFact(6), + #FACT_07=myFact(7), + #FACT_08=myFact(8), + #FACT_09=myFact(9), + #FACT_10=myFact(10), + #FACT_11=myFact(11), + #FACT_12=myFact(12), +) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/MED/a b/OldCodes/MED/a new file mode 100644 index 00000000..0018d1d5 --- /dev/null +++ b/OldCodes/MED/a @@ -0,0 +1,110 @@ +ESSAI_FACT=OPER(nom="ESSAI_FACT", + sd_prod=ObjetUtilisateur, + op=None, + fr=tr("Affectation de caractéristiques à des éléments de structure"), + regles = (AU_MOINS_UN('Poutre','Barre'), + EXCLUS('Discret','Discret_2D'),), + Info = SIMP(statut='f',typ='I', defaut= 1 ,into=(1,2) ), + Verif = SIMP(statut='f',typ='TXM',validators=NoRepeat(),max='**',into=("Maille","Noeud") ), +# +# ============================================================================== + Poutre = FACT(statut= 'f',max= '**', + Section = SIMP(statut= 'o',typ= 'TXM' ,into= ("GENERALE","RECTANGLE","CERCLE") ), + + b_generale = BLOC(condition = " Section == 'GENERALE'", + regles = (UN_PARMI('Maille','GroupeMailles'),), + Maille = SIMP(statut= 'f',typ= ma ,validators= NoRepeat(),max= '**'), + GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'), + + Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE"),defaut= "CONSTANT"), + + b_constant = BLOC(condition = "Vari == 'CONSTANT'", + regles = (PRESENT_ABSENT('Table','Cara'), + PRESENT_PRESENT('Table','Nom'), + PRESENT_PRESENT('Cara','Valeur'),), + Table = SIMP(statut= 'f',typ='TXM'), + Nom = SIMP(statut= 'f',typ= 'TXM'), + Cara = SIMP(statut= 'o',typ= 'TXM',min= 4 ,max= 5, + fr= tr("A,IY,IZ,JX sont des paramètres obligatoires"), + validators= [NoRepeat(), Compulsory(['A','IY','IZ','JX'])], + into= ("A","IY","IZ","AY","AZ","EY","EZ","JX","RY","RZ","RT","JG","IYR2","IZR2","AI") ), + Valeur = SIMP(statut= 'f',typ= 'R',min= 4 ,max= 15), + ), + ), + b_rectangle = BLOC(condition = "Section == 'RECTANGLE'", + regles = (UN_PARMI('Maille','GroupeMailles'),), + Maille = SIMP(statut= 'f',typ= ma ,validators= NoRepeat(),max= '**'), + GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'), + Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE","AFFINE"),defaut= "CONSTANT"), + b_constant = BLOC(condition = "Vari == 'CONSTANT'", + Cara = SIMP(statut= 'o',typ= 'TXM',min= 1 ,max= 4, + validators = [NoRepeat(), + OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ), + AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )], + into= ("H","EP", "HY","HZ","EPY","EPZ"),), + Valeur = SIMP(statut= 'o',typ= 'R',min= 1 ,max= 4), + ), + + Metrique = SIMP(statut= 'f',typ= 'TXM',defaut= "NON",into= ("OUI","NON") ), + Fcx = SIMP(statut= 'f',typ= 'R'), + Tuyau = SIMP(statut= 'f',typ= 'I',val_max= 10,defaut= 3), + ), + ), +# +# ============================================================================== + Barre = FACT(statut='f',max='**', + regles = (UN_PARMI('Maille','GroupeMailles'),), + Maille = SIMP(statut='f',typ=ma ,validators=NoRepeat(),max='**'), + GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),max='**'), + Section = SIMP(statut='o',typ='TXM',into=("GENERALE","RECTANGLE","CERCLE") ), + b_generale = BLOC(condition = "Section=='GENERALE'", + regles = (PRESENT_ABSENT('Table','Cara'), + PRESENT_PRESENT('Table','Nom'), + PRESENT_PRESENT('Cara','Valeur')), + Table = SIMP(statut='f',typ=table_sdaster), + Nom = SIMP(statut='f',typ='TXM',validators=LongStr(1,24) ), + Cara = SIMP(statut='f',typ='TXM',into=("A",) ), + Valeur = SIMP(statut='f',typ='R',min=1,max=1 ), + ), + b_rectangle = BLOC(condition = "Section=='RECTANGLE'", + Cara = SIMP(statut='o',typ='TXM', min=1, max=4, + validators = [NoRepeat(), + OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ), + AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )], + into=("H","EP","HZ","HY","EPY","EPZ"), ), + Valeur = SIMP(statut='o',typ='R',min=1,max=4 ), ), + b_cercle = BLOC(condition = "Section=='CERCLE'", + Cara = SIMP(statut='o',typ='TXM',validators=[NoRepeat(),Compulsory(['R'])],min=1,max=2,into=("R","EP") ), + Valeur = SIMP(statut='o',typ='R',min=1,max=2 ), ), + ), +# +# ============================================================================== + Discret = FACT(statut='f',max='**', + REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ), + AMOR_HYST = SIMP(statut='f',typ='R' ), + SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),), + b_SYME_OUI = BLOC(condition="SYME=='OUI'", + fr=tr("SYMETRIQUE: Affectation de matrices de rigidité, de masse ou d'amortissement à des mailles ou noeuds"), + Cara = SIMP(statut='o',typ='TXM',validators=NoRepeat(),max=1,defaut="None", + into = ("K_T_D_N", "K_T_D_L", "K_TR_D_N", "K_TR_D_L", "K_T_N", "K_T_L", "K_TR_N", "K_TR_L", + "M_T_D_N", "M_T_D_L", "M_TR_D_N", "M_TR_D_L", "M_T_N", "M_T_L", "M_TR_N", "M_TR_L", + "A_T_D_N", "A_T_D_L", "A_TR_D_N", "A_TR_D_L", "A_T_N", "A_T_L", "A_TR_N", "A_TR_L",),), + # Affection des caractéristiques de RIGIDITE/AMORTISSEMENT/MASSE + b_AK_T_D_N = BLOC(condition = "((Cara=='K_T_D_N')or(Cara=='A_T_D_N'))", + fr = tr("Noeud: 3 valeurs (triangulaire supérieure par colonne)"), + regles = (UN_PARMI('Maille','GroupeMailles','Noeud','GROUP_NO'),), + Noeud = SIMP(statut='f',typ=no ,validators=NoRepeat(),max='**'), + GROUP_NO = SIMP(statut='f',typ=grno,validators=NoRepeat(),max='**'), + Maille = SIMP(statut='f',typ=ma ,validators=NoRepeat(),max='**'), + GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),homo='SansOrdreNiDoublon',max='**'), + Valeur = SIMP(statut='o',typ='R',min=3 ,max=3 ),), + ), + ), +# +# ============================================================================== + Discret_2D = FACT(statut='f',max='**', + REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ), + AMOR_HYST = SIMP(statut='f',typ='R' ), + SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),), + ), +) diff --git a/OldCodes/MED/cata_diapo.py b/OldCodes/MED/cata_diapo.py new file mode 100644 index 00000000..0c5268ef --- /dev/null +++ b/OldCodes/MED/cata_diapo.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +from Accas import * +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + import types + if type(valeur) == types.StringType: + return None + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + __repr__=info + __str__=info + + + +class forme ( ASSD ) : pass + +JdC = JDC_CATA (code = 'MED', + execmodul = None, + ) + +FORME_GEOMETRIQUE=OPER(nom='FORME_GEOMETRIQUE',sd_prod =forme ,op=None, + Forme=SIMP(statut="o",typ='TXM',into=[ 'carre', 'cercle', 'triangle' ],defaut='carre'), + bloc_pour_Carre = BLOC (condition = "Forme=='carre'", + Cote=SIMP(statut="o",typ='I'), ) , # fin bloc_pour_carre + bloc_pour_cercle = BLOC (condition ="Forme=='cercle'", + rayon=SIMP(statut="o",typ='I'), ) , # fin bloc_pour_cercle + + DE_NOMBREUSES_WIDGETS= FACT(statut="o", + Stop_Criteria = SIMP(statut = 'o',typ = Tuple(3),validators = VerifTypeTuple(('R','R','R'))), + Fichier_Med = SIMP( statut = 'o', typ = ('Fichier', 'Med Files (*.med);;All Files (*)',),), + ListeDeChoixPlusGrande=SIMP(statut="o",typ='TXM',into=['a','b,','c','d','e','f','g','h'], + homo="SansOrdreNiDoublon",), + Un_Parametre_Facultatif=SIMP(statut="f",typ='TXM') + + ), + Couleur=SIMP(statut = 'f',typ='TXM'), + Matiere=SIMP(statut = 'f',typ='TXM'), +); + diff --git a/OldCodes/MED/cata_med.py b/OldCodes/MED/cata_med.py new file mode 100644 index 00000000..4640f81e --- /dev/null +++ b/OldCodes/MED/cata_med.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'MED', + execmodul = None, + ) +FAS=PROC(nom='FAS',op=None, + FAMILY_MESH_NAME_REF = FACT(statut='o', max='**', + + NAME=SIMP(statut="o",typ='TXM'), + ELEM=FACT(statut="f", max="**", + NUM=SIMP(statut="o",typ='TXM',), + NAME=SIMP(statut="o",typ='TXM',), + ATT=FACT(statut="f", + NBR=SIMP(statut="o", max=1 , typ = 'I'), + DES=SIMP(statut="o", max="**", typ = 'TXM'), + IDE=SIMP(statut="o", max="**", typ = 'I'), + VAL=SIMP(statut="o", max="**", typ = 'I'), + ), + GRO=FACT(statut="f", + NBR=SIMP(statut="o", max=1 , typ = 'I'), + NOM=SIMP(statut="o", max="**", typ='TXM'), + ), + ), + ), +); + + diff --git a/OldCodes/MED/configuration_MED.py b/OldCodes/MED/configuration_MED.py new file mode 100644 index 00000000..4ab64b85 --- /dev/null +++ b/OldCodes/MED/configuration_MED.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== +""" + Ce module sert pour charger les paramètres de configuration d'EFICAS +""" +# Modules Python +from InterfaceQT4 import configuration +import os + + +class CONFIG(configuration.CONFIG_BASE): + + #----------------------------------- + def __init__(self,appli,repIni): + #----------------------------------- + + self.labels_user=['catalogues','lang'] + self.labels_eficas=['lang','rep_cata','catalogues'] + + configuration.CONFIG_BASE.__init__(self,appli,'.Eficas_monCode') + + +def make_config(appli,rep): + return CONFIG(appli,rep) + diff --git a/OldCodes/MED/images/essaiAster.png b/OldCodes/MED/images/essaiAster.png new file mode 100644 index 00000000..d01c5de8 Binary files /dev/null and b/OldCodes/MED/images/essaiAster.png differ diff --git a/OldCodes/MED/items_integer_space.txt b/OldCodes/MED/items_integer_space.txt new file mode 100644 index 00000000..8e17136e --- /dev/null +++ b/OldCodes/MED/items_integer_space.txt @@ -0,0 +1,2 @@ +"4" "3" "2" "1" +"4" "5" "6" "7" \ No newline at end of file diff --git a/OldCodes/MED/monCode_qtEficas.py b/OldCodes/MED/monCode_qtEficas.py new file mode 100755 index 00000000..7f9a6e2c --- /dev/null +++ b/OldCodes/MED/monCode_qtEficas.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour Code_Aster +""" +# Modules Python +# Modules Eficas + +import sys,os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +from PyQt4.QtCore import * +import prefs +from InterfaceQT4 import eficas_go +eficas_go.lance_eficas(code=prefs.code) diff --git a/OldCodes/MED/prefs.py b/OldCodes/MED/prefs.py new file mode 100644 index 00000000..768415d5 --- /dev/null +++ b/OldCodes/MED/prefs.py @@ -0,0 +1,22 @@ +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +code="MED" +import sys, os +if os.path.dirname(os.path.abspath(__file__)) not in sys.path : + sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/OldCodes/MED/prefs_MED.py b/OldCodes/MED/prefs_MED.py new file mode 100644 index 00000000..220dc3f0 --- /dev/null +++ b/OldCodes/MED/prefs_MED.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +import os,sys +# repIni sert a localiser le fichier editeur.ini +# Obligatoire +repIni=os.path.dirname(os.path.abspath(__file__)) +INSTALLDIR=os.path.join(repIni,'..') +sys.path[:0]=[INSTALLDIR] + + +# lang indique la langue utilisee pour les chaines d'aide : fr ou ang +lang='en' + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +encoding='iso-8859-1' +docPath=repIni + +# +catalogues=( + #('med','med',os.path.join(repIni,'cata_med.py'),'dico','python'), + ('med','med',os.path.join(repIni,'CataAZ.py'),'python','python'), +) + +simpleClic=True +nombreDeBoutonParLigne = 4 +dicoImages={ +'CREEOBJET' : os.path.join(repIni,'images/essaiAster.png') +} + diff --git a/OldCodes/MED/prefs_monCode.py b/OldCodes/MED/prefs_monCode.py new file mode 100644 index 00000000..b9e513fc --- /dev/null +++ b/OldCodes/MED/prefs_monCode.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +import os,sys +# repIni sert a localiser le fichier editeur.ini +# Obligatoire +repIni=os.path.dirname(os.path.abspath(__file__)) +INSTALLDIR=os.path.join(repIni,'..') +sys.path[:0]=[INSTALLDIR] + + +# lang indique la langue utilisee pour les chaines d'aide : fr ou ang +lang='en' + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +encoding='iso-8859-1' +docPath=repIni + +# +catalogues=( + ('monCode','med',os.path.join(repIni,'CataAZ.py'),'python','python'), +# ('monCode','53036',os.path.join(repIni,'Elementary_Lists_53036_Cata.py'),'dico','python'), +# ('monCode','53033',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), +# ('monCode','53031',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), +# ('monCode','53030',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), +# ('monCode','53020',os.path.join(repIni,'Nested_Cond_52945_Cata.py'),'dico','python'), +# ('monCode','53013',os.path.join(repIni,'Elementary_Lists_53013_Cata.py'),'dico','python'), +# ('monCode','53000',os.path.join(repIni,'Elementary_Lists_53030_Cata.py'),'dico','python'), +# ('monCode','52996',os.path.join(repIni,'Elementary_Lists_52996_Cata.py'),'dico','python'), +# ('monCode','52992',os.path.join(repIni,'Many_Concepts_52992_Cata.py'),'dico','python'), +# ('monCode','52989',os.path.join(repIni,'Many_Concepts_52989_Cata.py'),'dico','python'), +# ('monCode','52988',os.path.join(repIni,'Many_Concepts_52988_Cata.py'),'dico','python'), +# ('monCode','52985',os.path.join(repIni,'fin_52985_Cata.py'),'dico','python'), +# ('monCode','52983',os.path.join(repIni,'Many_Concepts_52983_Cata.py'),'dico','python'), +# ('monCode','52975',os.path.join(repIni,'Separate_Blocks_52975_Cata.py'),'dico','python'), +# ('monCode','52972',os.path.join(repIni,'Separate_Blocks_52972_Cata.py'),'dico','python'), +# ('monCode','52958',os.path.join(repIni,'Separate_Blocks_52958_Cata.py'),'dico','python'), +# ('monCode','52952',os.path.join(repIni,'Nested_Cond_52952_Cata.py'),'dico','python'), +# ('monCode','52949',os.path.join(repIni,'Nested_Cond_52949_Cata.py'),'dico','python'), +# ('monCode','52947',os.path.join(repIni,'Nested_Cond_52947_Cata.py'),'dico','python'), +# ('monCode','52946',os.path.join(repIni,'Nested_Cond_52946_Cata.py'),'dico','python'), +# ('monCode','52945',os.path.join(repIni,'Nested_Cond_52945_Cata.py'),'dico','python'), +# ('monCode','Global',os.path.join(repIni,'Global_Condition_Cata.py'),'dico','python'), +## resolu ('monCode','52948',os.path.join(repIni,'Nested_Cond_52948_Cata.py'),'dico','python'), +# pb d afffichage des optionnels ('monCode','52963',os.path.join(repIni,'Separate_Blocks_52963_Cata.py'),'dico','python'), +# pb d afffichage des optionnels ('monCode','52966',os.path.join(repIni,'Separate_Blocks_52966_Cata.py'),'dico','python'), + +# ('monCode','test',os.path.join(repIni,'monCode_Cata1.py'),'dico','python'), +) + diff --git a/OldCodes/MED/properties.py b/OldCodes/MED/properties.py new file mode 100644 index 00000000..1d328a46 --- /dev/null +++ b/OldCodes/MED/properties.py @@ -0,0 +1,24 @@ +#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR +# RESPONSABLE D6BHHHH J-P.LEFEBVRE +# ====================================================================== +# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# ====================================================================== +# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR +# DE LA VERSION DU CODE_ASTER ASSOCIE +#---------------------------------------------------------------------- +version = "1.2" +date = "25/05/2010" +exploit = False diff --git a/OldCodes/MED/qtEficas_AZ.py b/OldCodes/MED/qtEficas_AZ.py new file mode 100755 index 00000000..336afdff --- /dev/null +++ b/OldCodes/MED/qtEficas_AZ.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour Code_Aster +""" +# Modules Python +# Modules Eficas + +import sys,os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +import prefs +from InterfaceQT4 import eficas_go +eficas_go.lance_eficas(code=prefs.code) diff --git a/OldCodes/MED/qtEficas_Med.py b/OldCodes/MED/qtEficas_Med.py new file mode 100755 index 00000000..336afdff --- /dev/null +++ b/OldCodes/MED/qtEficas_Med.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour Code_Aster +""" +# Modules Python +# Modules Eficas + +import sys,os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +import prefs +from InterfaceQT4 import eficas_go +eficas_go.lance_eficas(code=prefs.code) diff --git a/OldCodes/MED/typescript b/OldCodes/MED/typescript new file mode 100644 index 00000000..f070be17 --- /dev/null +++ b/OldCodes/MED/typescript @@ -0,0 +1,34 @@ +Le script a débuté sur mar. 29 nov. 2016 15:37:06 CET +]0;A96028@dsp0780471: ~/QT5GitEficasTravail/eficas/monCodeA96028@dsp0780471:~/QT5GitEficasTravail/eficas/monCode$ ./qtEficas_Med.py /tmp/a.commoo.comm +eficas_en /home/A96028/QT5GitEficasTravail/eficas/monCode/../Extensions/../UiQT4 +() +{'typ': 'TXM', 'statut': 'o'} +() +{'typ': 'TXM', 'statut': 'o'} +() +{'typ': 'TXM', 'statut': 'o'} +() +{'max': 1, 'typ': 'I', 'statut': 'o'} +() +{'max': '**', 'typ': 'TXM', 'statut': 'o'} +() +{'max': '**', 'typ': 'I', 'statut': 'o'} +() +{'max': '**', 'typ': 'I', 'statut': 'o'} +() +{'NBR': , 'IDE': , 'DES': , 'VAL': , 'statut': 'f'} +() +{'max': 1, 'typ': 'I', 'statut': 'o'} +() +{'max': '**', 'typ': 'TXM', 'statut': 'o'} +() +{'NOM': , 'NBR': , 'statut': 'f'} +() +{'NAME': , 'statut': 'f', 'max': '**', 'ATT': , 'NUM': , 'GRO': } +() +{'NAME': , 'ELEM': , 'statut': 'o'} +() +{'nom': 'FAS', 'FAMILY_MESH_NAME_REF': , 'op': None} +]0;A96028@dsp0780471: ~/QT5GitEficasTravail/eficas/monCodeA96028@dsp0780471:~/QT5GitEficasTravail/eficas/monCode$ exit + +Script terminé sur mar. 29 nov. 2016 15:37:13 CET diff --git a/OldCodes/Openturns_Study/OpenTURNS_Cata_Study_V8.py b/OldCodes/Openturns_Study/OpenTURNS_Cata_Study_V8.py index 9e43e543..948554c8 100644 --- a/OldCodes/Openturns_Study/OpenTURNS_Cata_Study_V8.py +++ b/OldCodes/Openturns_Study/OpenTURNS_Cata_Study_V8.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Openturns_Study/configuration_OPENTURNS_STUDY.py b/OldCodes/Openturns_Study/configuration_OPENTURNS_STUDY.py index 64d0b05e..9bc506fd 100644 --- a/OldCodes/Openturns_Study/configuration_OPENTURNS_STUDY.py +++ b/OldCodes/Openturns_Study/configuration_OPENTURNS_STUDY.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Openturns_Study/opsOT.py b/OldCodes/Openturns_Study/opsOT.py index ed023cdb..dfeee514 100644 --- a/OldCodes/Openturns_Study/opsOT.py +++ b/OldCodes/Openturns_Study/opsOT.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Openturns_Study/prefs.py b/OldCodes/Openturns_Study/prefs.py index f83b0a29..1db9360c 100644 --- a/OldCodes/Openturns_Study/prefs.py +++ b/OldCodes/Openturns_Study/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Openturns_Study/qtEficas_openturns_study.py b/OldCodes/Openturns_Study/qtEficas_openturns_study.py index abf2d5ab..a88c1232 100755 --- a/OldCodes/Openturns_Study/qtEficas_openturns_study.py +++ b/OldCodes/Openturns_Study/qtEficas_openturns_study.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Openturns_Wrapper/OpenTURNS_Cata_Wrapper_V4.py b/OldCodes/Openturns_Wrapper/OpenTURNS_Cata_Wrapper_V4.py index 651d5b82..ab094581 100644 --- a/OldCodes/Openturns_Wrapper/OpenTURNS_Cata_Wrapper_V4.py +++ b/OldCodes/Openturns_Wrapper/OpenTURNS_Cata_Wrapper_V4.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Openturns_Wrapper/configuration_OPENTURNS_WRAPPER.py b/OldCodes/Openturns_Wrapper/configuration_OPENTURNS_WRAPPER.py index 64d0b05e..9bc506fd 100644 --- a/OldCodes/Openturns_Wrapper/configuration_OPENTURNS_WRAPPER.py +++ b/OldCodes/Openturns_Wrapper/configuration_OPENTURNS_WRAPPER.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Openturns_Wrapper/prefs.py b/OldCodes/Openturns_Wrapper/prefs.py index 10b557d2..544236d0 100644 --- a/OldCodes/Openturns_Wrapper/prefs.py +++ b/OldCodes/Openturns_Wrapper/prefs.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/PSEN_Eficas/ExtractGeneratorLoadLineandTransfoDico.py b/OldCodes/PSEN_Eficas/ExtractGeneratorLoadLineandTransfoDico.py new file mode 100755 index 00000000..9427e18c --- /dev/null +++ b/OldCodes/PSEN_Eficas/ExtractGeneratorLoadLineandTransfoDico.py @@ -0,0 +1,173 @@ +#NetworkFile = r"C:\Users\J15773\Documents\GTDosier\PSENdocs\Victoria ALL - EFICAS PSEN\Data\2030Conv_HFP2.sav" +#PSSE_PATH = "C:/Program Files/PTI/PSSE33/PSSBIN" #emplacement de PSSE + +def ExtractGeneratorLoadLineandTransfoDico(NetworkFile,PSSE_PATH): + + import os + import sys + + print NetworkFile + print PSSE_PATH + sys.path.append(PSSE_PATH) + os.environ['PATH'] += ';' + PSSE_PATH + ';' + + import psspy + import redirect + + ###initialization PSSE + psspy.psseinit(10000) + _i=psspy.getdefaultint() + _f=psspy.getdefaultreal() + _s=psspy.getdefaultchar() + redirect.psse2py() + + # Silent execution of PSSe + islct=6 # 6=no output; 1=standard + psspy.progress_output(islct) + + #open Network File + psspy.case(NetworkFile) + + #Extract Loads + sid = -1 #all buses + flag = 1 #all in service loads/generators (4 all loads/generators) + + + string = ['NUMBER'] + ierr,iarray = psspy.aloadint(sid,flag,string) + + string = ['NAME','ID','EXNAME'] + ierr,carray = psspy.aloadchar(sid,flag,string) + + LoadDico = {} # [Bus name, load ID, extended bus name, bus number] + for i in range(len(iarray[0])): + idname = "Lo" + str(int(carray[1][i])) + loadname = carray[0][i].strip()+ "__" + idname + loadname = loadname.replace(" ","_") + loadname = loadname.replace(".","_") + loadname = loadname.replace("&","and") + try: + int(loadname[0]) + loadname="_" + loadname + except: + pass + LoadDico[loadname]= {} + LoadDico[loadname]['BusName'] = carray[0][i].strip() + LoadDico[loadname]['ID'] = carray[1][i] + LoadDico[loadname]['BusExName'] =carray[2][i] + LoadDico[loadname]['BusNum']=iarray[0][i] + + #Extract Generators + sid = -1 #all buses + flag = 1 #all in service loads/generators (4 all loads/generators) + + string = ['NUMBER'] + ierr,iarray = psspy.amachint(sid,flag,string) + + string = ['NAME','ID','EXNAME'] + ierr,carray = psspy.amachchar(sid,flag,string) + + MachineDico = {} # [Bus name, machine ID, extended bus name, bus number] + for i in range(len(iarray[0])): + idname = "Gr" + str(int(carray[1][i])) + machinename = carray[0][i].strip()+ "__" + idname + machinename = machinename.replace(" ","_") + machinename = machinename.replace(".","_") + machinename = machinename.replace("&","and") + try: + int(machinename[0]) + machinename="_" + machinename + except: + pass + MachineDico[machinename]={} + MachineDico[machinename]['NAME'] = carray[0][i].strip() + MachineDico[machinename]['ID'] = carray[1][i] + MachineDico[machinename]['EXNAME'] =carray[2][i] + MachineDico[machinename]['NUMBER']=iarray[0][i] + + #Extract Lignes + sid = -1 + owner = 1 + ties = 1 + flag = 2 #6 for two-winding transfos + entry = 1 #each branch once, not both directions + string = ['FROMNUMBER','TONUMBER'] + ierr,iarray = psspy.abrnint(sid,owner,ties,flag,entry,string) + string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] + ierr,carray = psspy.abrnchar(sid,owner,ties,flag,entry,string) + + LineDico = {} #[linename, Bus name 1, Bus name 2, ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] + for i in range(len(iarray[0])): + idname = carray[4][i] + if '@' in idname: + idname = idname.replace('@','Br') + else: + idname = 'Li' + str(int(idname)) + linename =carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname + linename = linename.replace(" ","_") + linename = linename.replace(".","_") + linename = linename.replace("&","and") + try: + int(linename[0]) + linename="_" + linename + except: + pass + LineDico[linename]={} + LineDico[linename]['FROMNAME']=carray[0][i].strip() + LineDico[linename]['TONAME']=carray[1][i].strip() + LineDico[linename]['ID']=carray[4][i] + LineDico[linename]['FROMEXNAME']=carray[2][i] + LineDico[linename]['TOEXNAME']=carray[3][i] + LineDico[linename]['FROMNUMBER']=iarray[0][i] + LineDico[linename]['TONUMBER']=iarray[1][i] + + #Extract Transfos + sid = -1 + owner = 1 + ties = 1 + flag = 6 #two-winding transfos + entry = 1 #each branch once, not both directions + string = ['FROMNUMBER','TONUMBER'] + ierr,iarray = psspy.abrnint(sid,owner,ties,flag,entry,string) + string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] + ierr,carray = psspy.abrnchar(sid,owner,ties,flag,entry,string) + + TfoDico = {} #[linename, Bus name 1, Bus name 2, machine ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] + for i in range(len(iarray[0])): + idname = 'Tr' + str(int(carray[4][i])) + tfoname = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname + tfoname = tfoname.replace(" ","_") + tfoname = tfoname.replace(".","_") + tfoname = tfoname.replace("&","and") + try: + int(tfoname[0]) + tfoname="_" + tfoname + except: + pass + TfoDico[tfoname]={} + TfoDico[tfoname]['FROMNAME']=carray[0][i].strip() + TfoDico[tfoname]['TONAME']=carray[1][i].strip() + TfoDico[tfoname]['ID']=carray[4][i] + TfoDico[tfoname]['FROMEXNAME']=carray[2][i] + TfoDico[tfoname]['TOEXNAME']=carray[3][i] + TfoDico[tfoname]['FROMNUMBER']=iarray[0][i] + TfoDico[tfoname]['TONUMBER']=iarray[1][i] + + return MachineDico, LoadDico, LineDico, TfoDico + + +#MachineDico, LoadDico, LineDico, TfoDico = ExtractGeneratorLoadLineandTransfoDico(NetworkFile,PSSE_PATH) + + +def ExtractGeneratorLoadLineandTransfoDico2(NetworkFile,PSSE_PATH): + MachineDico={'M1':'M1','M2':'M2','M3':'M3','M4':'M4','B6_BUS13__1':'AZ','CSPRING__1':'DD','GT12B__1':'ER','BSTMB__1':'JJ'} + LoadDico={'C1':'C1','C2':'C2','C3':'C3','C4':'C4'} + LineDico={'L1':'L1','L2':'L2','L3':'L3','L4':'L4'} + TfoDico={'T1':'T1','T2':'T2','T3':'T3','T4':'T4'} + MDico={'MZ1':'MZ1','MZ2':'MZ2','MZ3':'MZ3','MZ4':'MZ4'} + if NetworkFile == '/home/A96028/PSEN/PSEN_V8/Code/PSEN_Eficas/faux2.sav': + print "sans T1" + TfoDico={'T2':'T2','T3':'T3','T4':'T4'} + + + return MachineDico, LoadDico, LineDico, TfoDico, MDico diff --git a/OldCodes/PSEN_Eficas/ExtractGeneratorandLoadList.py b/OldCodes/PSEN_Eficas/ExtractGeneratorandLoadList.py new file mode 100755 index 00000000..08f45480 --- /dev/null +++ b/OldCodes/PSEN_Eficas/ExtractGeneratorandLoadList.py @@ -0,0 +1,70 @@ +NetworkFile = r"C:\Users\J15773\Documents\GTDosier\PSENdocs\Victoria ALL - EFICAS PSEN\Data\2030Conv_HFP2.sav" +PSSE_PATH = "C:/Program Files/PTI/PSSE33/PSSBIN" #emplacement de PSSE + +def ExtractGeneratorandLoadList(NetworkFile,PSSE_PATH): + + import os + import sys + + print NetworkFile + print PSSE_PATH + sys.path.append(PSSE_PATH) + os.environ['PATH'] += ';' + PSSE_PATH + ';' + + import psspy + import redirect + + ###initialization PSSE + psspy.psseinit(10000) + _i=psspy.getdefaultint() + _f=psspy.getdefaultreal() + _s=psspy.getdefaultchar() + redirect.psse2py() + + # Silent execution of PSSe + islct=6 # 6=no output; 1=standard + psspy.progress_output(islct) + + #open Network File + psspy.case(NetworkFile) + + #Extract Loads + sid = -1 #all buses + flag = 1 #all in service loads/generators (4 all loads/generators) + + + string = ['NUMBER'] + ierr,iarray = psspy.aloadint(sid,flag,string) + + string = ['NAME','ID','EXNAME'] + ierr,carray = psspy.aloadchar(sid,flag,string) + + LoadList = [] # [Bus name, load ID, extended bus name, bus number] + for i in range(len(iarray[0])): + LoadList.append([carray[0][i].strip(),carray[1][i],carray[2][i],iarray[0][i]]) + + #Extract Generators + sid = -1 #all buses + flag = 1 #all in service loads/generators (4 all loads/generators) + + string = ['NUMBER'] + ierr,iarray = psspy.amachint(sid,flag,string) + + string = ['NAME','ID','EXNAME'] + ierr,carray = psspy.amachchar(sid,flag,string) + + MachineList = [] # [Bus name, machine ID, extended bus name, bus number] + for i in range(len(iarray[0])): + MachineList.append([carray[0][i].strip(),carray[1][i],carray[2][i],iarray[0][i]]) + + return MachineList, LoadList + +def ExtractGeneratorandLoadList2(NetworkFile,PSSE_PATH): + MachineList = [['GT 6', '1 ', 'GT 6 11.500', 10], ['GT 7', '1 ', 'GT 7 11.500', 11], ['GT10', '1 ', 'GT10 11.500', 12], ['GT 5', '1 ', 'GT 5 11.500', 13], ['NEWHUNT', '1 ', 'NEWHUNT 11.500', 15], ['BSTMB', '1 ', 'BSTMB 11.500', 23], ['HYD_MAG', '1 ', 'HYD_MAG 6.9000', 25], ['RF1', '1 ', 'RF1 13.800', 37], ['OH2', '1 ', 'OH2 13.800', 41], ['RF2', '1 ', 'RF2 13.800', 42], ['GT3', '1 ', 'GT3 11.500', 43], ['OH3', '1 ', 'OH3 13.800', 47], ['OH4', '1 ', 'OH4 13.800', 50], ['OH6', '1 ', 'OH6 13.800', 52], ['GT 11', '1 ', 'GT 11 11.500', 56], ['B6_BUS13', '1 ', 'B6_BUS13 13.800', 57], ['GT8', '1 ', 'GT8 11.500', 58], ['HYDRR', '1 ', 'HYDRR 6.9000', 59], ['GT9', '1 ', 'GT9 11.500', 63], ['HYD_UWR', '1 ', 'HYD_UWR 6.9000', 64], ['HYD_RIOB', '1 ', 'HYD_RIOB 6.9000', 65], ['HRYD_LW', '1 ', 'HRYD_LW 6.9000', 68], ['GT13B', '1 ', 'GT13B 11.500', 76], ['GT12B', '1 ', 'GT12B 11.500', 77], ['CSPRING', '1 ', 'CSPRING 69.000', 91], ['OLDHARB1', '1 ', 'OLDHARB1 138.00', 114], ['WIGTON', '1 ', 'WIGTON 0.6900', 202], ['JEPWK1', '1 ', 'JEPWK1 11.500', 300], ['JEPWK1', '2 ', 'JEPWK1 11.500', 300], ['JEPWK1', '3 ', 'JEPWK1 11.500', 300], ['JEPWK2', '1 ', 'JEPWK2 11.500', 301], ['JEPWK2', '2 ', 'JEPWK2 11.500', 301], ['JEPWK2', '3 ', 'JEPWK2 11.500', 301], ['W_MUN1', '1 ', 'W_MUN1 69.000', 503], ['HYD_RHORN', '1 ', 'HYD_RHORN 69.000', 711]] + + LoadList= [['TREDEGAR', '1 ', 'TREDEGAR 69.000', 5], ['HOPE', '1 ', 'HOPE 69.000', 16], ['MILCHELT', '1 ', 'MILCHELT 69.000', 17], ['PARADISE', '1 ', 'PARADISE 69.000', 24], ['BLEDGE', '1 ', 'BLEDGE 69.000', 26], ['CANE RIV', '1 ', 'CANE RIV 69.000', 27], ['HIGHGATE', '1 ', 'HIGHGATE 69.000', 29], ['QUEENS D', '1 ', 'QUEENS D 69.000', 30], ['OCHO', '1 ', 'OCHO 69.000', 32], ['BOGUE_69', '1 ', 'BOGUE_69 69.000', 33], ['ROSE HAL', '1 ', 'ROSE HAL 69.000', 35], ['OH1', '1 ', 'OH1 13.800', 36], ['RF1', '1 ', 'RF1 13.800', 37], ['CEMENT C', '1 ', 'CEMENT C 69.000', 38], ['OBAY69', '1 ', 'OBAY69 69.000', 39], ['DUNCANS6', '1 ', 'DUNCANS6 69.000', 40], ['OH2', '1 ', 'OH2 13.800', 41], ['RF2', '1 ', 'RF2 13.800', 42], ['3MLS69', '1 ', '3MLS69 69.000', 45], ['WBLVD69', '1 ', 'WBLVD69 69.000', 46], ['OH3', '1 ', 'OH3 13.800', 47], ['PORT ANT', '1 ', 'PORT ANT 69.000', 48], ['OH4', '1 ', 'OH4 13.800', 50], ['B6_BUS13', '1 ', 'B6_BUS13 13.800', 57], ['GREENWOO', '1 ', 'GREENWOO 69.000', 60], ['LYSSONS', '1 ', 'LYSSONS 69.000', 61], ['PORUS', '1 ', 'PORUS 69.000', 62], ['R RIVER', '1 ', 'R RIVER 69.000', 66], ['MARTHA B', '1 ', 'MARTHA B 69.000', 67], ['WKH69', '1 ', 'WKH69 69.000', 69], ['PNASUS69', '1 ', 'PNASUS69 69.000', 70], ['ANNOTTO', '1 ', 'ANNOTTO 69.000', 71], ['UW RIVER', '1 ', 'UW RIVER 69.000', 74], ['KNDAL 69', '1 ', 'KNDAL 69 69.000', 75], ['MONYMUSK', '1 ', 'MONYMUSK 69.000', 78], ['OROCABES', '1 ', 'OROCABES 69.000', 79], ['MAGGOTTY', '1 ', 'MAGGOTTY 69.000', 80], ['UP PARK', '1 ', 'UP PARK 69.000', 82], ['TWICKENH', '1 ', 'TWICKENH 69.000', 85], ['MAY PEN', '1 ', 'MAY PEN 69.000', 88], ['PAJ', '1 ', 'PAJ 69.000', 89], ['GROAD_69', '1 ', 'GROAD_69 69.000', 90], ['CSPRING', '1 ', 'CSPRING 69.000', 91], ['S_ TREE6', '1 ', 'S_ TREE6 69.000', 92], ['NAGGOS H', '1 ', 'NAGGOS H 69.000', 94], ['GOODYEAR', '1 ', 'GOODYEAR 69.000', 99], ['HBAY_69', '1 ', 'HBAY_69 69.000', 101], ['RFORT69', '1 ', 'RFORT69 69.000', 102], ['RHODEN P', '1 ', 'RHODEN P 69.000', 105], ['DUHANEY6', '1 ', 'DUHANEY6 69.000', 107], ['CARDIFF', '1 ', 'CARDIFF 69.000', 109], ['JAB13.8', '1 ', 'JAB13.8 13.800', 112], ['JAM13.8', '1 ', 'JAM13.8 13.800', 113]] + return MachineList, LoadList + +if __name__ == "__main__": + MachineList,LoadList= ExtractGeneratorandLoadList2(NetworkFile,PSSE_PATH) + print MachineList, LoadList diff --git a/OldCodes/PSEN_Eficas/PSEN/PSEN_GUI.py b/OldCodes/PSEN_Eficas/PSEN/PSEN_GUI.py new file mode 100755 index 00000000..32b22dbe --- /dev/null +++ b/OldCodes/PSEN_Eficas/PSEN/PSEN_GUI.py @@ -0,0 +1,1220 @@ +# -*- coding: cp1252 -*- +# ======================== PSEN graphic interface ======================== +# This Python script creates a graphical interface to parameter and launch PSEN + +# ============== Import useful modules ================= +from Tkinter import * +from ttk import Combobox +import tkFileDialog, os +import subprocess +from time import sleep +import numpy as np + +# ============== Initialize some variables ================= +config=[] +for i in range (60) : # config[] will be used as a list of preferences for PSEN study + config.append('') + +root = Tk() # Creates the main window +root.wm_withdraw() # The main window is withdrawn/hidden + +CIST=PhotoImage(file="lib\CISTlogo.gif") # Load images +header=PhotoImage(file="lib\header.gif") +WTcurve=PhotoImage(file="lib\WTcurve.gif") + +# ============== Define functions ================= + +# browse_PSSe function is used to get the .SAV file path from the user. +# tkFileDialog.askopenfilename offers a browsing interface to the user +def browse_PSSe() : + global savAdress + savAdress = tkFileDialog.askopenfilename(parent=fenPref,title='Open PSSe SAV file',filetypes=[('SAV files', '.sav')]) + savAdressD.set(savAdress) + fenPref.update_idletasks() # this updates the values in the fenPref window (defined in preferences()) + print 'Added: '+str(savAdress) + return savAdress + +# browse_ENR function is used to get a .CSV file path from the user +# The CSV file contains a list of machines and their type (PV, Wind, Interconnexion) +# tkFileDialog.askopenfilename offers a browsing interface to the user +def browse_ENR() : + global ENRpath + ENRpath = tkFileDialog.askopenfilename(parent=fenPref,title='Open ENR configuration',filetypes=[('CSV files', '.csv'),('All files', '.*')]) + ENRpathD.set(ENRpath) + fenPref.update_idletasks() # this updates the values in the fenPref window (defined in preferences()) + print 'Added: '+str(ENRpath) + return ENRpath + +# browse_folder function is used to get a folder path from the user +# This folder is used to save all study files (.sav, .csv, ...) +# tkFileDialog.askdirectory offers a browsing interface to the user +def browse_folder() : + global folderPATH + folderPATH = tkFileDialog.askdirectory(parent=fenPref,title='Choose working folder') + folderPATHD.set(folderPATH) + fenPref.update_idletasks() # this updates the values in the fenPref window (defined in preferences()) + print 'Added: '+str(folderPATH) + return folderPATH + +# savePref function is used to save preferences input in fenPref window (defined in preferences()) +def savePref() : + global Vcin, Vrate, Vcout, Rho, lossrate # These variables are global because they are used in savePSEN() + try : # Test if the user has defined all the requested variables + savAdress + folderPATH + ENRpath + VcinD + VrateD + VcoutD + RhoD + lossrateD + except NameError : # If not a new window pops up and explains the data is missing + fenetre2 = Tk() + champ_label = Label(fenetre2, text="ERROR\nNo file and/or folder selected", fg="red", font=("Century Gothic",16)) + champ_label.pack(side=TOP, fill=BOTH, expand=YES) + else : # If it's OK it gets the data from the fields and save it into config[] + config[9]=VcinD.get(); config[10]=VrateD.get(); config[11]=VcoutD.get(); config[12]=RhoD.get(); config[13]=lossrateD.get(); config[2]=ENRpathD.get(); config[1]=folderPATHD.get(); config[0]=savAdressD.get() + Vcin=VcinD.get() + Vrate=VrateD.get() + Vcout=VcoutD.get() + Rho=RhoD.get() + lossrate=lossrateD.get() + f=open("lib\pref.psen", "w") # Creates a config file with values to give to PSSEWrapper.py + f.write(str(savAdress)+";"+str(folderPATH)+";"+str(ENRpath)+";"+str(Vcin)+";"+str(Vrate)+";"+str(Vcout)+";"+str(Rho)+";"+str(lossrate)+";0\n") + f.close() + try : + fenPref + except NameError : + pass + else : + fenPref.destroy() + print 'Preferences saved' + +# refresh_pref function is used to refresh fields value in fenPref window (defined in preferences()) +def refresh_pref () : + try : + saved + except NameError : # if saved hasn't been created yet there is no data to update + pass + print 'No configuration yet' + else : # if it has been created we set fields variables and update the window with update_idletasks() + print 'Update values' + global continpath + global model_Path + global PSSEfolder + VcinD.set(config[9]) + VrateD.set(config[10]) + VcoutD.set(config[11]) + RhoD.set(config[12]) + lossrateD.set(config[13]) + ENRpathD.set(ENRpath) + folderPATHD.set(folderPATH) + savAdressD.set(savAdress) + fenPref.update_idletasks() + +# savePSEN function is used to create a .PSEN file containing all users parameters and preferences +def savePSEN() : + global savePATH + global saved + saved=1 + + # === We get all the fields data === + + MCS_num=var_MCS.get() + N_1_opt=N_1.get() + PV_opt=PV.get() + Wind1_opt=Wind1.get() + Wind2_opt=Wind1.get() + Load_opt=Load.get() + + load_type=choix_load.get() + load1=var_loadn1.get() + load2=var_loadn2.get() + load3=var_loadn3.get() + load4=var_loadn4.get() + loadPath=loadPathD.get() + + wind11_type=choix_wind11.get() + wind11=var_windn11.get() + wind12=var_windn12.get() + wind13=var_windn13.get() + wind14=var_windn14.get() + wind1Path=wind1PathD.get() + + wind21_type=choix_wind21.get() + wind21=var_windn21.get() + wind22=var_windn22.get() + wind23=var_windn23.get() + wind24=var_windn24.get() + wind2Path=wind2PathD.get() + + pv_type=choix_pv.get() + pv1=var_pvn1.get() + pv2=var_pvn2.get() + pv3=var_pvn3.get() + pv4=var_pvn4.get() + pvPath=pvPathD.get() + + C01=C01D.get() + C02=C02D.get() + C03=C03D.get() + C04=C04D.get() + C12=C12D.get() + C14=C14D.get() + C13=C13D.get() + C23=C23D.get() + C24=C24D.get() + C34=C34D.get() + + fuel_cost_opt = fuel_cost.get() + bus_shunt_opt = bus_shunt.get() + bus_loads_opt = bus_loads.get() + + rate_choice = rate_choiceD.get() + + try : + contin_lines_Path + contin_groups_Path + except NameError : # If the user hasn't choose a path for the contingency CSV file, we create it as blank to save the data + contin_lines_Path='' + contin_groups_Path='' + + # We ask the user the name and path of the file + savePATH = tkFileDialog.asksaveasfilename(parent=fenetre,title='Save the file as ...',defaultextension='.psen',filetypes=[('PSEN file', '.psen')]) + try : + len(savePATH)>0 + except NameError : + pass + else : # Writing all the variables in a specific order (could be improved with XML file for instance) + f=open(savePATH,'w') + f.write(str(savAdress)+";"+str(folderPATH)+";"+str(ENRpath)+";" + +str(contin_lines_Path)+";"+str(contin_groups_Path)+";"+str(model_Path)+";"+str(PSSEfolder)+";"+str(orange_Path)+";"+str(python_Path)+";" + +str(Vcin)+";"+str(Vrate)+";"+str(Vcout)+";"+str(Rho)+";"+str(lossrate)+";" + +str(MCS_num)+";"+str(N_1_opt)+";"+str(PV_opt)+";"+str(Wind1_opt)+";"+str(Wind2_opt)+";"+str(Load_opt)+";" + +str(load_type)+";"+str(load1)+";"+str(load2)+";"+str(load3)+";"+str(load4)+";"+str(loadPath)+";" + +str(wind11_type)+";"+str(wind11)+";"+str(wind12)+";"+str(wind13)+";"+str(wind14)+";"+str(wind1Path)+";" + +str(wind21_type)+";"+str(wind21)+";"+str(wind22)+";"+str(wind23)+";"+str(wind24)+";"+str(wind2Path)+";" + +str(pv_type)+";"+str(pv1)+";"+str(pv2)+";"+str(pv3)+";"+str(pv4)+";"+str(pvPath)+";" + +str(C01)+";"+str(C02)+";"+str(C03)+";"+str(C04)+";"+str(C12)+";"+str(C13)+";"+str(C14)+";"+str(C23)+";"+str(C24)+";"+str(C34)+";" + +str(fuel_cost_opt)+";"+str(bus_shunt_opt)+";"+str(bus_loads_opt)+";" + +str(rate_choice)+";0\n") + f.close() + print 'Successfuly saved case study' + +# preferences function is a new window to update some PSEN parameters +def preferences () : + global fenPref + global savAdressD + global folderPATHD + global ENRpathD + global VcinD + global VrateD + global VcoutD + global RhoD + global lossrateD + global config + + fenPref = Toplevel(root) # Creating a new window + fenPref.wm_iconbitmap('lib\PSEN.ico') # Window icon + fenPref.wm_title('PSEN - Probabilistic Studies of Electrical Networks') # Window title + + f0p=Frame(fenPref, height=70, width=500, bd=2, relief=RIDGE) + f0p.pack_propagate(0) # don't shrink + f0p.pack() + + Label(f0p, text="PSSe .SAV file", fg="black", justify=LEFT, font=("Century Gothic",12)).pack(anchor=NW, padx=10, expand=YES) + savAdressD=StringVar() + Entry(f0p, textvariable=savAdressD, width=50).pack(side=LEFT, padx=15, expand=YES) + Button(f0p, text="Load SAV file", command=browse_PSSe, height=15, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) + + fline=Frame(fenPref, height=2, width=500, bg="grey") + fline.pack_propagate(0) # don't shrink + fline.pack(expand=1) + + f1p=Frame(fenPref, height=70, width=500, bd=2, relief=RIDGE) + f1p.pack_propagate(0) # don't shrink + f1p.pack() + + Label(f1p, text="Working folder adress :", fg="black", justify=LEFT, font=("Century Gothic",12)).pack(anchor=NW, padx=10, expand=YES) + folderPATHD=StringVar() + Entry(f1p, textvariable=folderPATHD, width=50).pack(side=LEFT, padx=15, expand=YES) + Button(f1p, text="Browse to working folder", command=browse_folder, height=15, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) + + fline=Frame(fenPref, height=5, width=500, bg="grey") + fline.pack_propagate(0) # don't shrink + fline.pack(expand=1) + + f3p=Frame(fenPref, height=100, width=500, bd=2, relief=RIDGE) + f3p.pack_propagate(0) # don't shrink + f3p.pack() + + Label(f3p, text="Machines configuration :", fg="black", justify=LEFT, font=("Century Gothic",12)).pack(anchor=NW, padx=10, expand=YES) + Label(f3p, text="N.B. Use the PSSe machine tab, insert a new column in first and write PV for PV, W1 for wind 1, W2 for wind 2 or do nothing for non-ENR. Save as CSV", fg="black", justify=LEFT, wraplength=450).pack(anchor=NW, padx=10, expand=YES) + ENRpathD=StringVar() + Entry(f3p, textvariable=ENRpathD, width=50).pack(side=LEFT, padx=15, expand=YES) + Button(f3p, text="Browse to ENR CSV file", command=browse_ENR, height=15, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) + + fline=Frame(fenPref, height=5, width=500, bg="grey") + fline.pack_propagate(0) # don't shrink + fline.pack(expand=1) + + f4p=Frame(fenPref, height=120, width=500, bd=2, relief=RIDGE) + f4p.pack_propagate(0) # don't shrink + f4p.pack() + + # Creates 5 entry for wind turbines characteristics + Label(f4p, text="Wind 1 & 2 characteristics :", fg="black", justify=LEFT, font=("Century Gothic",12)).pack(anchor=NW, padx=10, expand=YES) + Label(f4p, text="If wind law, enter the following parameters : \nVcin, Vrate, Vcout, rho (air density kg.m-3, base is 1.225), lossrate (base is 0.05)\nIf power law: Vcin=0, Vrate=1, Vcout>=1. Law must take values between 0 and 1.", fg="black", justify=LEFT, wraplength=450).pack(anchor=NW, padx=10, expand=YES) + VcinD = StringVar() + Entry(f4p, textvariable=VcinD, width=13).pack(side=LEFT, padx=5, pady=5) + VrateD = StringVar() + Entry(f4p, textvariable=VrateD, width=13).pack(side=LEFT, padx=5, pady=5) + VcoutD = StringVar() + Entry(f4p, textvariable=VcoutD, width=13).pack(side=LEFT, padx=5, pady=5) + RhoD = StringVar() + Entry(f4p, textvariable=RhoD, width=13).pack(side=LEFT, padx=5, pady=5) + lossrateD = StringVar() + Entry(f4p, textvariable=lossrateD, width=13).pack(side=LEFT, padx=5, pady=5) + + fline=Frame(fenPref, height=2, width=500, bg="grey") + fline.pack_propagate(0) # don't shrink + fline.pack(expand=1) + + f2p=Frame(fenPref, height=40, width=500, bd=2, relief=RIDGE) + f2p.pack_propagate(0) # don't shrink + f2p.pack() + + Button(f2p, text="Save and quit", command=savePref, height=1, width=30).pack(anchor=N, fill=BOTH, expand=1, padx=5, pady=3) + + # Refresh the window data + refresh_pref () + +# openPSEN function opens a .PSEN file with all PSEN parameters, read them and updates their value in the GUI +def openPSEN () : + global openPATH + global folderPATH + global savAdress + global ENRpath + global contin_lines_Path + global contin_groups_Path + global model_Path + global loadPath, wind1Path, wind2Path, pvPath + global PSSEfolder + global orange_Path + global python_Path + global config + global Vcin; global Vrate; global Vcout; global Rho; global lossrate + global PVpath + + openPATH = tkFileDialog.askopenfilename(parent=fenetre,title='Open PSEN file',filetypes=[('PSEN files', '.psen'),('All files', '.*'),]) + try : + os.lstat(openPATH) + except WindowsError : # If the user doesn't choose any file we don't open it + pass + except NameError : # If the user doesn't choose any file we don't open it + pass + else : + global saved # Create a saved variable : config list will be created + saved=1 + f=open(openPATH,'r') + lines=f.readlines() + config=lines[0].split(";") + savAdress=config[0]; folderPATH=config[1]; ENRpath=config[2]; + contin_lines_Path=config[3]; contin_groups_Path=config[4]; model_Path=config[5]; PSSEfolder=config[6]; orange_Path=config[7]; python_Path=config[8]; + Vcin=config[9]; Vrate=config[10]; Vcout=config[11]; Rho=config[12]; lossrate=config[13]; + loadPath=config[25]; wind1Path=config[31]; wind2Path=config[37]; pvPath=config[43]; + refresh(config) + f=open("lib\pref.psen", "w") + f.write(str(savAdress)+";"+str(folderPATH)+";"+str(ENRpath)+";"+str(Vcin)+";"+str(Vrate)+";"+str(Vcout)+";"+str(Rho)+";"+str(lossrate)+";0\n") + f.close() + print 'Successfuly opened '+str(openPATH) + +# This function is not used yet +def numToName (num) : + num=int(num) + if num == 1 : + name = "Normal(mean, stdev)" + elif num == 2 : + name = "Uniform(min, max)" + elif num == 3 : + name = "Exponential(lambda, gamma)" + elif num == 4 : + name = "Weibull(alpha, beta, gamma)" + elif num == 5 : + name = "TruncatedNormal(mean, stdev, min, max)" + elif num == 6 : + name = "Value list ([[v1,p1],[v2,p2],...])" + elif num == 7 : + name = "Histogram (steps, probabilities)" + elif num == 10 : + name = "PDF from file ()" + elif num == 20 : + name = "Time Serie from file (stepsize, number of points)" + return name + +# refresh function updates fields values in fenetre window +def refresh (config) : + var_MCS.set(config[14]) + N_1.set(config[15]) + PV.set(config[16]) + Wind1.set(config[17]) + Wind2.set(config[18]) + Load.set(config[19]) + + choix_load.set(config[20]) + var_loadn1.set(config[21]) + var_loadn2.set(config[22]) + var_loadn3.set(config[23]) + var_loadn4.set(config[24]) + loadPathD.set(config[25]) + + choix_wind11.set(config[26]) + var_windn11.set(config[27]) + var_windn12.set(config[28]) + var_windn13.set(config[39]) + var_windn14.set(config[30]) + wind1PathD.set(config[31]) + + choix_wind21.set(config[32]) + var_windn21.set(config[33]) + var_windn22.set(config[34]) + var_windn23.set(config[35]) + var_windn24.set(config[36]) + wind2PathD.set(config[37]) + + choix_pv.set(config[38]) + var_pvn1.set(config[39]) + var_pvn2.set(config[40]) + var_pvn3.set(config[41]) + var_pvn4.set(config[42]) + pvPathD.set(config[43]) + + C01D.set(config[44]) + C02D.set(config[45]) + C03D.set(config[46]) + C04D.set(config[47]) + C12D.set(config[48]) + C13D.set(config[49]) + C14D.set(config[50]) + C23D.set(config[51]) + C24D.set(config[52]) + C34D.set(config[53]) + + fuel_cost.set(config[54]) + bus_shunt.set(config[55]) + bus_loads.set(config[56]) + + rate_choiceD.set(config[57]) + + fenetre.update_idletasks() + +# PCpreferences function creates a window in which the user can choose some requested paths +def PCpreferences (): + global fenPrefPC + global python_Path + global orange_Path + global PSSEfolder + + fenPrefPC = Tk() + fenPrefPC.wm_iconbitmap('lib\PSEN.ico') + fenPrefPC.wm_title('PSEN - Probabilistic Studies of Electrical Networks') + + Label(fenPrefPC, text="Configure PSEN for your computer : ", fg="black", justify=LEFT, font=("Century Gothic",12)).pack(anchor=NW, padx=10, expand=YES) + Button(fenPrefPC, text="Path to Python 2.7.exe...", command=browse_Python, height=3, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) + Button(fenPrefPC, text="Path to orngCanvas.pyw...", command=browse_Orange, height=3, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) + Button(fenPrefPC, text="Path to PSSE33\PSSBIN...", command=browse_PSSEfolder, height=3, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) + Button(fenPrefPC, text="Save and close", command=closePCpref, height=3, width=15).pack(anchor=S, fill=BOTH, expand=1, padx=5, pady=10) + +def closePCpref () : + try : # Test if the user has defined all the requested variables + python_Path + orange_Path + PSSEfolder + except NameError : # If not a new window pops up and explains the data is missing + fenetre2 = Tk() + champ_label = Label(fenetre2, text="ERROR\nNo file and/or folder selected", fg="red", font=("Century Gothic",16)) + champ_label.pack(side=TOP, fill=BOTH, expand=YES) + else : # If it's OK it gets the data from the fields and save it into config[] + config[6]=PSSEfolder; config[7]=orange_Path; config[8]=python_Path + try : + fenPrefPC + except NameError : + pass + else : + fenPrefPC.destroy() + print 'Data saved' + +# PCpreferences function creates a window in which the user can choose some requested paths +def ContinPreferences (): + global fenPrefC + global contin_lines_Path + global contin_groups_Path + + fenPrefC = Tk() + fenPrefC.wm_iconbitmap('lib\PSEN.ico') + fenPrefC.wm_title('PSEN - Probabilistic Studies of Electrical Networks') + + Label(fenPrefC, text="Choose contingency files with probabilities : ", fg="black", justify=LEFT, font=("Century Gothic",12)).pack(anchor=NW, padx=10, expand=YES) + Button(fenPrefC, text="Path to branches file", command=contin_lines, height=3, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) + Button(fenPrefC, text="Path to groups file", command=contin_groups, height=3, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) + Button(fenPrefC, text="Save and close", command=closeCpref, height=3, width=15).pack(anchor=S, fill=BOTH, expand=1, padx=5, pady=10) + +def closeCpref () : + try : # Test if the user has defined all the requested variables + contin_lines_Path + contin_groups_Path + except NameError : # If not a new window pops up and explains the data is missing + fenetre2 = Tk() + champ_label = Label(fenetre2, text="ERROR\nNo file and/or folder selected", fg="red", font=("Century Gothic",16)) + champ_label.pack(side=TOP, fill=BOTH, expand=YES) + else : # If it's OK it gets the data from the fields and save it into config[] + config[3]=contin_lines_Path; config[4]=contin_lines_Path + f=open("lib\contin.psen", "w") + f.write(str(contin_lines_Path)+";"+str(contin_groups_Path)+";0\n") + f.close() + try : + fenPrefC + except NameError : + pass + else : + print 'Added :\n'+str(contin_lines_Path)+'\n'+str(contin_groups_Path) + fenPrefC.destroy() + print 'Saved contingency data' + +def contin_lines () : + global contin_lines_Path + contin_lines_Path = tkFileDialog.askopenfilename(parent=fenetre,title='Choose contingency lines file',filetypes=[('CSV file', '.csv'),('All files', '.*')]) + return contin_lines_Path + +def contin_groups () : + global contin_groups_Path + contin_groups_Path = tkFileDialog.askopenfilename(parent=fenetre,title='Choose contingency groups file',filetypes=[('CSV file', '.csv'),('All files', '.*')]) + return contin_groups_Path + +# Hide command window +if os.name == 'nt': # The functions only work with Windows OS + try: + import win32gui, win32console, win32con + win32console.GetConsoleWindow() # do nothing, this is just a test + def set_attached_console_visible(): + state=is_attached_console_visible() + win32gui.ShowWindow(win32console.GetConsoleWindow(), win32con.SW_HIDE if state else win32con.SW_SHOW) + def is_attached_console_visible(): + return win32gui.IsWindowVisible(win32console.GetConsoleWindow()) + except (ImportError, NotImplementedError): + pass + + +# config_save function is used to save configuration for PSSEWrapper +def config_save(): + MCS_num=var_MCS.get() + N_1_opt=N_1.get() + PV_opt=PV.get() + Wind1_opt=Wind1.get() + Wind2_opt=Wind2.get() + Load_opt=Load.get() + + load_type=choix_load.get() + load1=var_loadn1.get() + load2=var_loadn2.get() + load3=var_loadn3.get() + load4=var_loadn4.get() + loadPath=loadPathD.get() + + wind11_type=choix_wind11.get() + wind11=var_windn11.get() + wind12=var_windn12.get() + wind13=var_windn13.get() + wind14=var_windn14.get() + wind1Path=wind1PathD.get() + + wind21_type=choix_wind21.get() + wind21=var_windn21.get() + wind22=var_windn22.get() + wind23=var_windn23.get() + wind24=var_windn24.get() + wind2Path=wind2PathD.get() + + pv_type=choix_pv.get() + pv1=var_pvn1.get() + pv2=var_pvn2.get() + pv3=var_pvn3.get() + pv4=var_pvn4.get() + pvPath=pvPathD.get() + + C01=C01D.get() + C02=C02D.get() + C03=C03D.get() + C04=C04D.get() + C12=C12D.get() + C13=C13D.get() + C14=C14D.get() + C23=C23D.get() + C24=C24D.get() + C34=C34D.get() + + fuel_cost_opt = fuel_cost.get() + bus_shunt_opt = bus_shunt.get() + bus_loads_opt = bus_loads.get() + + rate_choice=rate_choiceD.get() + + f=open("lib\config.psen", "w") +# Write probabilistic model data + f.write(str(MCS_num)+";"+str(N_1_opt)+";"+str(PV_opt)+";"+str(Wind1_opt)+";"+str(Wind2_opt)+";"+str(Load_opt)+";"+str(fuel_cost_opt)+";"+str(bus_shunt_opt)+";"+str(bus_loads_opt)+"\n") + +# Write load probabilistic model data + if load_type == "Normal(mean, stdev)" : + f.write('1;'+str(load1)+";"+str(load2)+';0') + elif load_type == "Uniform(min, max)" : + f.write('2;'+str(load1)+";"+str(load2)+';0') + elif load_type == "Exponential(lambda, gamma)" : + f.write('3;'+str(load1)+";"+str(load2)+';0') + elif load_type == "Weibull(alpha, beta, gamma)" : + f.write('4;'+str(load1)+";"+str(load2)+";"+str(load3)+';0') + elif load_type == "TruncatedNormal(mean, stdev, min, max)" : + f.write('5;'+str(load1)+";"+str(load2)+";"+str(load3)+";"+str(load4)+';0') + elif load_type == "Value list (values, probabilities)" : + f.write('6;'+str(load1)+";"+str(load2)+';0') + elif load_type == 'Histogram (steps, probabilities)' : + f.write('7;'+str(load1)+";"+str(load2)+';0') + elif load_type== "PDF from file ()" : + try : + loadPath + except NameError : + fenetre2 = Tk() + Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) + else : + f.write('10;'+loadPath+';0') + elif load_type== "Time Serie from file (stepsize, number of points)" : + try : + loadPath + except NameError : + fenetre2 = Tk() + Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) + else : + f.write('20;'+loadPath+";"+str(load1)+";"+str(load2)+';0') + else : + fenetre2 = Tk() + Label(fenetre2, text="ERROR\nNo load model selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) + f.write("\n") + +# Write wind 1 probabilistic model data + if wind11_type == "Normal(mean, stdev)" : + f.write('1;'+str(wind11)+";"+str(wind12)+';0') + elif wind11_type == "Uniform(min, max)" : + f.write('2;'+str(wind11)+";"+str(wind12)+';0') + elif wind11_type == "Exponential(lambda, gamma)" : + f.write('3;'+str(wind11)+";"+str(wind12)+';0') + elif wind11_type == "Weibull(alpha, beta, gamma)" : + f.write('4;'+str(wind11)+";"+str(wind12)+";"+str(wind13)+';0') + elif wind11_type == "TruncatedNormal(mean, stdev, min, max)" : + f.write('5;'+str(wind11)+";"+str(wind12)+";"+str(wind13)+";"+str(wind14)+';0') + elif wind11_type == "Value list (values, probabilities)" : + f.write('6;'+str(wind11)+";"+str(wind12)+';0') + elif wind11_type == 'Histogram (steps, probabilities)' : + f.write('7;'+str(wind11)+";"+str(wind12)+';0') + elif wind11_type== "PDF from file ()" : + try : + wind1Path + except NameError : + fenetre2 = Tk() + Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) + else : + f.write('10;'+wind1Path+';0') + elif wind11_type== "Time Serie from file (stepsize, number of points)" : + try : + wind1Path + except NameError : + fenetre2 = Tk() + Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) + else : + f.write('20;'+wind1Path+";"+str(wind11)+";"+str(wind12)+';0') + else : + fenetre2 = Tk() + Label(fenetre2, text="ERROR\nNo wind model selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) + f.write("\n") + +# Write wind 2 probabilistic model data + if wind21_type == "Normal(mean, stdev)" : + f.write('1;'+str(wind21)+";"+str(wind22)+';0') + elif wind21_type == "Uniform(min, max)" : + f.write('2;'+str(wind21)+";"+str(wind22)+';0') + elif wind21_type == "Exponential(lambda, gamma)" : + f.write('3;'+str(wind21)+";"+str(wind22)+';0') + elif wind21_type == "Weibull(alpha, beta, gamma)" : + f.write('4;'+str(wind21)+";"+str(wind22)+";"+str(wind23)+';0') + elif wind21_type == "TruncatedNormal(mean, stdev, min, max)" : + f.write('5;'+str(wind21)+";"+str(wind22)+";"+str(wind23)+";"+str(wind24)+';0') + elif wind21_type == "Value list (values, probabilities)" : + f.write('6;'+str(wind21)+";"+str(wind22)+';0') + elif wind21_type == 'Histogram (steps, probabilities)' : + f.write('7;'+str(wind21)+";"+str(wind22)+';0') + elif wind21_type== "PDF from file ()" : + try : + wind2Path + except NameError : + fenetre2 = Tk() + Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) + else : + f.write('10;'+wind2Path+';0') + elif wind21_type== "Time Serie from file (stepsize, number of points)" : + try : + wind2Path + except NameError : + fenetre2 = Tk() + Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) + else : + f.write('20;'+wind2Path+";"+str(wind21)+";"+str(wind22)+';0') + else : + fenetre2 = Tk() + Label(fenetre2, text="ERROR\nNo wind 2 model selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) + f.write("\n") + +# Write correlation probabilistic model data + f.write(str(C01)+";"+str(C02)+";"+str(C03)+";"+str(C04)+";"+str(C12)+";"+str(C13)+";"+str(C14)+";"+str(C23)+";"+str(C24)+";"+str(C34)+";0") + f.write("\n") + +# Write pv probabilistic model data + if pv_type == "Normal(mean, stdev)" : + f.write('1;'+str(pv1)+";"+str(pv2)+';0') + elif pv_type == "Uniform(min, max)" : + f.write('2;'+str(pv1)+";"+str(pv2)+';0') + elif pv_type == "Exponential(lambda, gamma)" : + f.write('3;'+str(pv1)+";"+str(pv2)+';0') + elif pv_type == "Weibull(alpha, beta, gamma)" : + f.write('4;'+str(pv1)+";"+str(pv2)+";"+str(pv3)+';0') + elif pv_type == "TruncatedNormal(mean, stdev, min, max)" : + f.write('5;'+str(pv1)+";"+str(pv2)+";"+str(pv3)+";"+str(pv4)+';0') + elif pv_type == "Value list (values, probabilities)" : + f.write('6;'+str(pv1)+";"+str(pv2)+';0') + elif pv_type == 'Histogram (steps, probabilities)' : + f.write('7;'+str(pv1)+";"+str(pv2)+';0') + elif pv_type== "PDF from file ()" : + try : + pvPath + except NameError : + fenetre2 = Tk() + champ_label = Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)) + champ_label.pack(side=TOP, fill=BOTH, expand=YES) + else : + f.write('10;'+pvPath+';0') + elif pv_type== "Time Serie from file (stepsize, number of points)" : + try : + pvPath + except NameError : + fenetre2 = Tk() + champ_label = Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)) + champ_label.pack(side=TOP, fill=BOTH, expand=YES) + else : + f.write('20;'+pvPath+";"+str(pv1)+";"+str(pv2)+';0') + else : + fenetre2 = Tk() + champ_label = Label(fenetre2, text="ERROR\nNo wind model selected", fg="red", font=("Century Gothic",16)) + champ_label.pack(side=TOP, fill=BOTH, expand=YES) + f.write("\n") + +# Write OPF data model + f.write(str(fuel_cost_opt) +";"+ str(bus_shunt_opt) +";"+ str(bus_loads_opt)+";0\n") + +# Write Imap rate choice + f.write(str(rate_choice)+";0\n") + + f.close() + + print 'Successfuly saved case data' + +# launch_PSEN function is used to run PSSEWrapper code with the configuration in the GUI +def launch_PSEN(): + config_save() # Current configuration is fist saved + PSEN_Path='PSEN/PSSEWrapper.py' + subprocess.Popen([python_Path,PSEN_Path]) + +# launch_orange function is used to launch Orange with the model file +def launch_Orange(): + subprocess.Popen([python_Path,orange_Path,model_Path]) + +# browse_load is used to select a .CSV file with a 1D array of load measures +def browse_load() : + global loadPath + loadPath = tkFileDialog.askopenfilename(parent=fenetre,title='Open file for load data estimation',filetypes=[('CSV files', '.csv'),('All files', '.*')]) + loadPathD.set(loadPath) + fenetre.update_idletasks() # updates the fields paths + return loadPath + +# browse_wind is used to select a .CSV file with a 1D array of wind measures +def browse_wind1() : + global wind1Path + wind1Path = tkFileDialog.askopenfilename(parent=fenetre,title='Open file for wind 1 data estimation',filetypes=[('CSV files', '.csv'),('All files', '.*')]) + wind1PathD.set(wind1Path) + fenetre.update_idletasks() # updates the fields paths + return wind1Path + +# browse_wind is used to select a .CSV file with a 1D array of wind measures +def browse_wind2() : + global wind2Path + wind2Path = tkFileDialog.askopenfilename(parent=fenetre,title='Open file for wind 2 data estimation',filetypes=[('CSV files', '.csv'),('All files', '.*')]) + wind2PathD.set(wind2Path) + fenetre.update_idletasks() # updates the fields paths + return wind2Path + +# browse_pv is used to select a .CSV file with a 1D array of PV measures +def browse_pv() : + global pvPath + pvPath = tkFileDialog.askopenfilename(parent=fenetre,title='Open file for PV data estimation',filetypes=[('CSV files', '.csv'),('All files', '.*')]) + pvPathD.set(pvPath) + fenetre.update_idletasks() # updates the fields paths + return pvPath + +# continload function is a browsing window returning the path to the contingency CSV file +def continload () : + global continpath + continpath = tkFileDialog.askopenfilename(parent=fenetre,title='Open contingency file',filetypes=[('CSV files', '.csv'),('All files', '.*')]) + try : + continpath + except NameError : + pass + else : # Saves the path into a file for PSSEWrapper.py + f=open("lib\contin.psen", "w") + f.write(str(continpath)+";0\n") + f.close() + return continpath + +# orangeload function is a browsing window returning the path to the orange model file OWS +def orangeload () : + global model_Path + model_Path = tkFileDialog.askopenfilename(parent=fenetre,title='Open orange file...',filetypes=[('Orange Widget Scripts', '.ows')]) + +def browse_PSSEfolder () : + global PSSEfolder + if os.path.exists("C:\Program Files\PTI\PSSE33\PSSBIN") == True : + path="C:\Program Files\PTI\PSSE33\PSSBIN" + else : + path="C:" + PSSEfolder = tkFileDialog.askdirectory(parent=fenPrefPC,title='Choose PSSE/PSSBIN folder', initialdir=path) + return PSSEfolder + +def browse_Python () : + global python_Path + if os.path.exists("C:\Python27") == True : + path="C:\Python27" + else : + path="C:" + python_Path = tkFileDialog.askopenfilename(parent=fenetre,title='Choose python.exe',filetypes=[('Executables', '.exe'),('All files', '.*')], initialdir=path) + return python_Path + +def browse_Orange () : + global orange_Path + if os.path.exists("C:\Python27\Lib\site-packages\Orange\OrangeCanvas") == True : + path="C:\Python27\Lib\site-packages\Orange\OrangeCanvas" + else : + path="C:" + orange_Path = tkFileDialog.askopenfilename(parent=fenetre,title='Choose orngCanvas.pyw',filetypes=[('Python file', '.pyw'),('All files', '.*')], initialdir=path) + return orange_Path +# On crée une fenêtre, racine de notre interface +def fenetre() : + global fenetre,var_MCS,N_1,PV,Wind1,Wind2,Load,choix_load,var_loadn1,var_loadn2,var_loadn3,var_loadn4,loadPathD,choix_wind11,var_windn11,var_windn12,var_windn13,var_windn14,wind1PathD,choix_wind21,var_windn21,var_windn22,var_windn23,var_windn24,wind2PathD,choix_pv,var_pvn1,var_pvn2,var_pvn3,var_pvn4,pvPathD,C01D,C02D,C03D,C04D,C12D,C13D,C14D,C23D,C24D,C34D,fuel_cost,bus_shunt,bus_loads,rate_choiceD + fenetre = Toplevel(root) + fenetre.wm_iconbitmap('lib\PSEN.ico') + fenetre.wm_title('PSEN - Probabilistic Studies of Electrical Networks') + + def openshort (event): + openPSEN() + def saveshort (event) : + savePSEN() + def quitshort (event) : + fenetre.destroy() + def orangeshort (event): + launch_Orange() + def runshort (event) : + launch_PSEN() + def prefshort (event) : + preferences() + + fenetre.bind_all("", quitshort) + fenetre.bind_all("", openshort) + fenetre.bind_all("", saveshort) + fenetre.bind_all("", orangeshort) + fenetre.bind_all("", runshort) + fenetre.bind_all("", prefshort) + + wd=500 + + # Create a toplevel menu + menubar=Menu(fenetre) + + filemenu = Menu(menubar, tearoff=0) + filemenu.add_command(label="Open PSEN", command=openPSEN, accelerator="Ctrl+O") + filemenu.add_command(label="Save PSEN", command=savePSEN, accelerator="Ctrl+S") + filemenu.add_separator() + filemenu.add_command(label="Exit", command=fenetre.quit, accelerator="Ctrl+Q") + menubar.add_cascade(label="File", menu=filemenu) + + editmenu = Menu(menubar, tearoff=0) + editmenu.add_command(label="Computer preferences", command=PCpreferences) + editmenu.add_separator() + editmenu.add_command(label="Study preferences", command=preferences, accelerator="Ctrl+P") + menubar.add_cascade(label="Edit", menu=editmenu) + + exemenu = Menu(menubar, tearoff=0) + exemenu.add_command(label="Run PSEN", command=preferences, accelerator="Ctrl+R") + menubar.add_cascade(label="Execution", menu=exemenu) + + contmenu = Menu(menubar, tearoff=0) + contmenu.add_command(label="Load contingency file", command=ContinPreferences) + menubar.add_cascade(label="Contingency analysis", menu=contmenu) + + orangemenu = Menu(menubar, tearoff=0) + orangemenu.add_command(label="Choose Orange model", command=orangeload) + orangemenu.add_command(label="Open Orange", command=launch_Orange, accelerator="Ctrl+A") + menubar.add_cascade(label="Orange analysis", menu=orangemenu) + + viewmenu = Menu(menubar, tearoff=0) + viewmenu.add_command(label="Show/Hide cmd window", command=set_attached_console_visible) + menubar.add_cascade(label="View", menu=viewmenu) + + # Display the menu + fenetre.config(menu=menubar) + + ftop=Frame(fenetre, height=140, width=2*wd, bd=2, relief=RIDGE) + ftop.pack_propagate(0) # don't shrink + ftop.pack() + + fmid=Frame(fenetre, height=500, width=2*wd) + fmid.pack_propagate(0) # don't shrink + fmid.pack() + + fleft=Frame(fmid, height=500, width=wd, bd=2, relief=RIDGE) + fleft.pack_propagate(0) # don't shrink + fleft.pack(side=LEFT) + + fright=Frame(fmid, height=500, width=wd, bd=2, relief=RIDGE) + fright.pack_propagate(0) # don't shrink + fright.pack(side=RIGHT) + + #canvas=Canvas(fenetre, width=600, height=100, bg='ivory') + Label(ftop, image=header).pack(side=TOP, fill=BOTH, expand=YES) + #canvas.pack(side=TOP,padx=5,pady=5) + + fline=Frame(ftop, height=2, width=2*wd, bg="grey") + fline.pack_propagate(0) # don't shrink + fline.pack(expand=1) + + fl0=Frame(fleft, height=55, width=wd) + fl0.pack_propagate(0) # don't shrink + fl0.pack() + + Label(fl0, text="Simulation parameters", fg="black", justify=LEFT, font=("Century Gothic",14)).pack(anchor=NW, padx=10, expand=NO) + + # Change Monte Carlo samplings + Label(fl0, text="Choose the number of samples:", fg="black").pack(side=LEFT, padx=10, expand=NO) + + var_MCS = StringVar() + Entry(fl0, textvariable=var_MCS, width=15).pack(side=LEFT, padx=15, expand=NO) + + fl01=Frame(fleft, height=30, width=wd) + fl01.pack_propagate(0) # don't shrink + fl01.pack() + + # Change N-1 study or not + N_1 = IntVar() + Checkbutton(fl01, text="N-1 study ?", variable=N_1).pack(side=LEFT, padx=2) + + # Include Load ? + Load = IntVar() + Checkbutton(fl01, text="Load study ?", variable=Load).pack(side=LEFT, padx=2) + + # Include Wind 1 ? + Wind1 = IntVar() + Checkbutton(fl01, text="Wind 1 study ?", variable=Wind1).pack(side=LEFT, padx=2) + + # Include Wind 2 ? + Wind2 = IntVar() + Checkbutton(fl01, text="Wind 2 study ?", variable=Wind2).pack(side=LEFT, padx=2) + + # Include PV + PV = IntVar() + Checkbutton(fl01, text="PV study ?", variable=PV).pack(side=LEFT, padx=2) + + Frame(fleft, height=2, width=wd, bg="grey").pack(pady=10, expand=NO) + + fl1=Frame(fleft, height=152, width=wd) + fl1.pack_propagate(0) # don't shrink + fl1.pack(pady=0, expand=NO) + + champ_label = Label(fl1, text="Correlation upper matrix :", fg="black", justify=LEFT, font=("Century Gothic",14)) + champ_label.pack(anchor=NW, padx=10, expand=NO) + + champ_label = Label(fl1, text="Load N-1 Wind1 Wind2 Solar ", fg="black") + champ_label.pack(anchor=NE, padx=10) + + fl11=Frame(fl1, height=25, width=wd) + fl11.pack_propagate(0) # don't shrink + fl11.pack(padx=10, expand=NO) + C04D = StringVar() + Entry(fl11, textvariable=C04D, width=10).pack(side=RIGHT, padx=10, pady=5) + C04D.set(0) + C03D = StringVar() + Entry(fl11, textvariable=C03D, width=10).pack(side=RIGHT, padx=10, pady=5) + C03D.set(0) + C02D = StringVar() + Entry(fl11, textvariable=C02D, width=10).pack(side=RIGHT, padx=10, pady=5) + C02D.set(0) + C01D = StringVar() + Entry(fl11, textvariable=C01D, width=10).pack(side=RIGHT, padx=10, pady=5) + C01D.set(0) + + champ_label = Label(fl11, text="Load ", fg="black") + champ_label.pack(side=RIGHT, padx=10) + + fl12=Frame(fl1, height=25, width=wd) + fl12.pack_propagate(0) # don't shrink + fl12.pack(padx=10, expand=NO) + C14D = StringVar() + Entry(fl12, textvariable=C14D, width=10).pack(side=RIGHT, padx=10, pady=5) + C14D.set(0) + C13D = StringVar() + Entry(fl12, textvariable=C13D, width=10).pack(side=RIGHT, padx=10, pady=5) + C13D.set(0) + C12D = StringVar() + Entry(fl12, textvariable=C12D, width=10).pack(side=RIGHT, padx=10, pady=5) + C12D.set(0) + + champ_label = Label(fl12, text="N-1 ", fg="black") + champ_label.pack(side=RIGHT, padx=10) + + fl13=Frame(fl1, height=25, width=wd) + fl13.pack_propagate(0) # don't shrink + fl13.pack(padx=10, expand=NO) + C24D = StringVar() + Entry(fl13, textvariable=C24D, width=10).pack(side=RIGHT, padx=10, pady=5) + C24D.set(0) + C23D = StringVar() + Entry(fl13, textvariable=C23D, width=10).pack(side=RIGHT, padx=10, pady=5) + C23D.set(0) + + champ_label = Label(fl13, text="Wind1 ", fg="black") + champ_label.pack(side=RIGHT, padx=10) + + fl14=Frame(fl1, height=25, width=wd) + fl14.pack_propagate(0) # don't shrink + fl14.pack(padx=10, expand=NO) + C34D = StringVar() + Entry(fl14, textvariable=C34D, width=10).pack(side=RIGHT, padx=10, pady=5) + C34D.set(0) + + champ_label = Label(fl14, text="Wind2 ", fg="black") + champ_label.pack(side=RIGHT, padx=10) + + fline=Frame(fleft, height=2, width=wd, bg="grey") + fline.pack(pady=10, expand=NO) + + fl2=Frame(fleft, height=20, width=wd) + fl2.pack_propagate(0) # don't shrink + fl2.pack() + + champ_label = Label(fl2, text="PSSe OPF parameters", fg="black", justify=LEFT, font=("Century Gothic",14)) + champ_label.pack(anchor=NW, padx=10, expand=NO) + + fl21=Frame(fleft, height=30, width=wd) + fl21.pack_propagate(0) # don't shrink + fl21.pack() + + # "Minimize fuel cost" + fuel_cost = IntVar() + Checkbutton(fl21, text="Minimize fuel cost", variable=fuel_cost).pack(side=LEFT, padx=10) + + # "Minimize adj. bus shunts" + bus_shunt = IntVar() + Checkbutton(fl21, text="Minimize adj. bus shunts", variable=bus_shunt).pack(side=LEFT, padx=10) + + # "Minimize adj. bus loads" + bus_loads = IntVar() + Checkbutton(fl21, text="Minimize adj. bus loads", variable=bus_loads).pack(side=LEFT, padx=10) + + fline=Frame(fleft, height=2, width=wd, bg="grey") + fline.pack(pady=10, expand=NO) + + fl3=Frame(fleft, height=20, width=wd) + fl3.pack_propagate(0) # don't shrink + fl3.pack() + + champ_label = Label(fl3, text="PSSe Irate choice :", fg="black", justify=LEFT, font=("Century Gothic",14)) + champ_label.pack(side=LEFT, padx=10, expand=NO) + + # "Minimize fuel cost" + rate_choiceD = IntVar() + Radiobutton(fl3, text="Rate A", variable=rate_choiceD, value=1).pack(side=LEFT, padx=20) + Radiobutton(fl3, text="Rate B", variable=rate_choiceD, value=2).pack(side=LEFT, padx=10) + Radiobutton(fl3, text="Rate C", variable=rate_choiceD, value=3).pack(side=LEFT, padx=10) + +#---- Choose the probability laws --- + #---- Load model ---- + fr0=Frame(fright, height=55, width=wd) + fr0.pack_propagate(0) # don't shrink + fr0.pack(expand=NO, anchor=NW) + + champ_label = Label(fr0, text="Load model :", fg="black", justify=LEFT, font=("Century Gothic",14)) + champ_label.pack(anchor=NW, padx=10, expand=NO) + + choix_load=StringVar() + laws_choice = ('Normal(mean, stdev)','Uniform(min, max)','Exponential(lambda, gamma)','Weibull(alpha, beta, gamma)', 'TruncatedNormal(mean, stdev, min, max)', 'Value list (values, probabilities)', 'Histogram (steps, probabilities)', 'PDF from file ()', 'Time Serie from file (stepsize, number of points)' ) + Combobox(fr0, textvariable = choix_load, values = laws_choice, state = 'readonly', width=50).pack(side=LEFT, padx=10, expand=NO) + choix_load.set('Choose your load model') + + fr01=Frame(fright, height=30, width=wd) + fr01.pack_propagate(0) # don't shrink + fr01.pack(expand=NO) + champ_label = Label(fr01, text="Parameters :", fg="black").pack(side=LEFT, padx=10, pady=0) + + var_loadn1 = StringVar() + Entry(fr01, textvariable=var_loadn1, width=12).pack(side=LEFT, padx=10, pady=5) + var_loadn2 = StringVar() + Entry(fr01, textvariable=var_loadn2, width=12).pack(side=LEFT, padx=10, pady=5) + var_loadn3 = StringVar() + Entry(fr01, textvariable=var_loadn3, width=12).pack(side=LEFT, padx=10, pady=5) + var_loadn4 = StringVar() + Entry(fr01, textvariable=var_loadn4, width=12).pack(side=LEFT, padx=10, pady=5) + + fr011=Frame(fright, height=35, width=wd) + fr011.pack_propagate(0) # don't shrink + fr011.pack(expand=NO) + + # We create the browse button + loadPathD=StringVar() + Entry(fr011, textvariable=loadPathD, width=50).pack(side=LEFT, padx=15, expand=YES) + + Button(fr011, text="Load data", command=browse_load).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) + + fline=Frame(fright, height=2, width=wd, bg="grey") + fline.pack(pady=2, expand=NO) + + #---- Wind 1 model ---- + fr1=Frame(fright, height=55, width=wd) + fr1.pack_propagate(0) # don't shrink + fr1.pack(expand=NO, pady=0) + + champ_label = Label(fr1, text="Wind 1 distribution model :", fg="black", justify=LEFT, font=("Century Gothic",14)) + champ_label.pack(anchor=NW, padx=10, expand=NO) + + choix_wind11=StringVar() + laws_choice = ('Normal(mean, stdev)','Uniform(min, max)','Exponential(lambda, gamma)','Weibull(alpha, beta, gamma)', 'TruncatedNormal(mean, stdev, min, max)', 'Value list (values, probabilities)', 'Histogram (steps, probabilities)', 'PDF from file ()', 'Time Serie from file (stepsize, number of points)' ) + Combobox(fr1, textvariable = choix_wind11, values = laws_choice, state = 'readonly', width=50).pack(side=LEFT, padx=10, expand=NO) + choix_wind11.set('Choose your wind model') + + fr11=Frame(fright, height=30, width=wd) + fr11.pack_propagate(0) # don't shrink + fr11.pack(expand=NO) + Label(fr11, text="Parameters :", fg="black").pack(side=LEFT, padx=10, pady=0) + + var_windn11 = StringVar() + Entry(fr11, textvariable=var_windn11, width=12).pack(side=LEFT, padx=10, pady=5) + var_windn12 = StringVar() + Entry(fr11, textvariable=var_windn12, width=12).pack(side=LEFT, padx=10, pady=5) + var_windn13 = StringVar() + Entry(fr11, textvariable=var_windn13, width=12).pack(side=LEFT, padx=10, pady=5) + var_windn14 = StringVar() + Entry(fr11, textvariable=var_windn14, width=12).pack(side=LEFT, padx=10, pady=5) + + fr111=Frame(fright, height=35, width=wd) + fr111.pack_propagate(0) # don't shrink + fr111.pack(expand=NO) + + # We create the browse button + wind1PathD=StringVar() + Entry(fr111, textvariable=wind1PathD, width=50).pack(side=LEFT, padx=15, expand=YES) + + Button(fr111, text="Wind 1 data", command=browse_wind1).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) + + fline=Frame(fright, height=2, width=wd, bg="grey") + fline.pack(pady=2, expand=NO) + + #---- Wind 2 model ---- + fr2=Frame(fright, height=55, width=wd) + fr2.pack_propagate(0) # don't shrink + fr2.pack(expand=NO, pady=0) + + champ_label = Label(fr2, text="Wind 2 distribution model :", fg="black", justify=LEFT, font=("Century Gothic",14)) + champ_label.pack(anchor=NW, padx=10, expand=NO) + + choix_wind21=StringVar() + laws_choice = ('Normal(mean, stdev)','Uniform(min, max)','Exponential(lambda, gamma)','Weibull(alpha, beta, gamma)', 'TruncatedNormal(mean, stdev, min, max)', 'Value list (values, probabilities)', 'Histogram (steps, probabilities)', 'PDF from file ()', 'Time Serie from file (stepsize, number of points)' ) + Combobox(fr2, textvariable = choix_wind21, values = laws_choice, state = 'readonly', width=50).pack(side=LEFT, padx=10, expand=NO) + choix_wind21.set('Choose your wind model') + + fr21=Frame(fright, height=30, width=wd) + fr21.pack_propagate(0) # don't shrink + fr21.pack(expand=NO) + Label(fr21, text="Parameters :", fg="black").pack(side=LEFT, padx=10, pady=0) + + var_windn21 = StringVar() + Entry(fr21, textvariable=var_windn21, width=12).pack(side=LEFT, padx=10, pady=5) + var_windn22 = StringVar() + Entry(fr21, textvariable=var_windn22, width=12).pack(side=LEFT, padx=10, pady=5) + var_windn23 = StringVar() + Entry(fr21, textvariable=var_windn23, width=12).pack(side=LEFT, padx=10, pady=5) + var_windn24 = StringVar() + Entry(fr21, textvariable=var_windn24, width=12).pack(side=LEFT, padx=10, pady=5) + + fr211=Frame(fright, height=35, width=wd) + fr211.pack_propagate(0) # don't shrink + fr211.pack(expand=NO) + + # We create the browse button + wind2PathD=StringVar() + Entry(fr211, textvariable=wind2PathD, width=50).pack(side=LEFT, padx=15, expand=YES) + + Button(fr211, text="Wind 2 data", command=browse_wind2).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) + + fline=Frame(fright, height=2, width=wd, bg="grey") + fline.pack(pady=2, expand=NO) + + #---- PV model ---- + fr3=Frame(fright, height=55, width=wd) + fr3.pack_propagate(0) # don't shrink + fr3.pack(expand=NO, pady=0) + + champ_label = Label(fr3, text="Photovoltaic distribution model :", fg="black", justify=LEFT, font=("Century Gothic",14)) + champ_label.pack(anchor=NW, padx=10, expand=NO) + + choix_pv=StringVar() + laws_choice = ('Normal(mean, stdev)','Uniform(min, max)','Exponential(lambda, gamma)','Weibull(alpha, beta, gamma)', 'TruncatedNormal(mean, stdev, min, max)', 'Value list (values, probabilities)', 'Histogram (steps, probabilities)', 'PDF from file ()', 'Time Serie from file (stepsize, number of points)' ) + Combobox(fr3, textvariable = choix_pv, values = laws_choice, state = 'readonly', width=50).pack(side=LEFT, padx=10, expand=NO) + choix_pv.set('Choose your PV model') + + fr31=Frame(fright, height=30, width=wd) + fr31.pack_propagate(0) # don't shrink + fr31.pack(expand=NO) + Label(fr31, text="Parameters :", fg="black").pack(side=LEFT, padx=10, pady=0) + + var_pvn1 = StringVar() + Entry(fr31, textvariable=var_pvn1, width=12).pack(side=LEFT, padx=10, pady=5) + var_pvn2 = StringVar() + Entry(fr31, textvariable=var_pvn2, width=12).pack(side=LEFT, padx=10, pady=5) + var_pvn3 = StringVar() + Entry(fr31, textvariable=var_pvn3, width=12).pack(side=LEFT, padx=10, pady=5) + var_pvn4 = StringVar() + Entry(fr31, textvariable=var_pvn4, width=12).pack(side=LEFT, padx=10, pady=5) + + fr311=Frame(fright, height=35, width=wd) + fr311.pack_propagate(0) # don't shrink + fr311.pack(expand=NO) + + # We create the browse button + pvPathD=StringVar() + Entry(fr311, textvariable=pvPathD, width=50).pack(side=LEFT, padx=15, expand=YES) + + Button(fr311, text="PV data", command=browse_pv).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) + + fb=Frame(fenetre, height=50, width=2*wd, bd=2, relief=RIDGE) + fb.pack_propagate(0) # don't shrink + fb.pack() + + Frame(fb, height=2, width=2*wd, bg="grey").pack(expand=1) + + # We create the launch button + Button(fb, text="Run PSEN", command=launch_PSEN, height=1, width=20, underline=YES).pack(expand=NO, padx=5, pady=3) + +# On démarre la boucle Tkinter qui s'interompt quand on ferme la fenêtre +fenetre() +root.mainloop() \ No newline at end of file diff --git a/OldCodes/PSEN_Eficas/PSEN/PSSEWrapper.py b/OldCodes/PSEN_Eficas/PSEN/PSSEWrapper.py new file mode 100755 index 00000000..3adb5ace --- /dev/null +++ b/OldCodes/PSEN_Eficas/PSEN/PSSEWrapper.py @@ -0,0 +1,742 @@ +#=============================================================================== +# PSEN SCRIPT FOR PROBABILISTIC STUDIES OF ELECTICAL NETWORKS +#=============================================================================== +from openturns import * +from pylab import * +from math import* +import os, random +import numpy as np +from time import gmtime, strftime +from array import * +from support_functions import * + +# Ouverture du fichier de configuration et recupecation des valeurs sous forme de listes +f=open("C:\B31272\Documents\PSEN\PSENdev\lib\config.psen","r") +lines=f.readlines() +data_config=lines[0].split(";") +data_load2 = getUserLaw(lines[1].split(";"))[0] +data_wind1=getUserLaw(lines[2].split(";"))[0] +data_wind2=getUserLaw(lines[3].split(";"))[0] +data_corr=lines[4].split(";") +data_PV=getUserLaw(lines[5].split(";"))[0] +data_OPF=lines[6].split(";") +Irate_num=int(lines[7].split(";")[0]) +f.close() + +# Definition des variables pour les series temporelles : getUserLaw(lines[1].split(";"))[1][0] doit valoir 1 +# pour que le programme etudie les series temporelles +time_serie_file=[] +time_serie_mat=[] +for i in ([1,2,3,5]) : + TSoptions = getUserLaw(lines[i].split(";"))[1] + if TSoptions[0] == 1 : + time_serie=1 + f=open(TSoptions[1],"r") + linesTS=f.readlines() + f.close() + tsm=[] + for j in range (len(linesTS)) : + try : + float(linesTS[j]) + except ValueError : + linesTS[j] = commaToPoint(linesTS[j]) + else : + pass + tsm.append(float(linesTS[j])) + time_serie_mat.append(tsm) + time_serie_file.append(TSoptions[1]) + """time_serie_SS = TSoptions[2] + time_serie_TH = TSoptions[3]""" + else : + time_serie_file.append(-1) +time_serie_mat=zip(*time_serie_mat) + +# Ouverture du fichier de preferences et recuperation des donnees +f=open("C:\B31272\Documents\PSEN\PSENdev\lib\pref.psen","r") +lines=f.readlines() +f.close() +paths=lines[0].split(";") +WTconfig=[] +for i in range (3,8): + try : + paths[i] + except : + print "Error in defining wind turbines characteristics" + WTconfig=[3.,5.,25.,1.225,0.05] + else : + WTconfig.append(float(paths[i])) + +# Ouverture du fichier d'analyse de N-1 et recuperation des donnees +f=open("C:\B31272\Documents\PSEN\PSENdev\lib\contin.psen","r") +lines=f.readlines() +path_config_contin=lines[0].split(";") +f.close() + +# Definition des lois des cinq variables aleatoires +N_1=int(data_config[1]) # N_1=1 to do N-1 studies +wind_var1=int(data_config[3]) # To take wind1 variability into account +wind_var2=int(data_config[4]) # To take wind2 variability into account +PV_var=int(data_config[2]) # To take PV variability into account +load_var=int(data_config[5]) # To take load variability into account + +# Creation variable nom dossier N-1 +if N_1 == 1 : + folderN_1 = '1_' +else : + folderN_1 = '_' + +# Recuperation des chemins du dossier d'installation de PSSE, .SAV de l'etude et nom du rapport +folder=paths[1] +doc_base= paths[0] +exec_file="report.txt" + +# Definition des groupes de production PV, eoliennes, des intercos et des lignes en N-1 +ENR=config_ENR(paths[2]) +windTurbines1 = ENR[1] # Buses with wind turbines 1 +windTurbines2 = ENR[2] # Buses with wind turbines 2 +solarPV = ENR[0] # Buses with solar PV plant +intercos=ENR[3] # Buses with interconnexions +# Lines with contingency +try : + config_contingency(path_config_contin) +except IOError : # Si le fichier n'est pas dans un bon format on traite l'exception + nb_lines=1 + print 'Error with contingency input file' +else : + continAll = config_contingency(path_config_contin) + continLines = continAll[0] + continGroups = continAll[1] + continVal = continAll[2] + continProb = continAll[3] + + +# Probabilistic study information +#============================================================================== +# Create the marginal distributions +distributionX0 = data_load2 +distributionX1 = getUserDefined(continVal,continProb) +distributionX2 = data_wind1 +distributionX3 = data_wind2 +distributionX4 = data_PV + +# Create the correlations between the distributions +corr10=float(data_corr[0]) +corr20=float(data_corr[1]) +corr30=float(data_corr[2]) +corr40=float(data_corr[3]) +corr21=float(data_corr[4]) +corr31=float(data_corr[5]) +corr41=float(data_corr[6]) +corr32=float(data_corr[7]) +corr42=float(data_corr[8]) +corr43=float(data_corr[9]) + +# Probabilistic Study: central dispersion => Monte Carlo or LHS iterations +montecarlosize = int(data_config[0]) + +#Extension name for the folders and files +day=time.strftime("%Y%m%d", gmtime()) +hour=time.strftime("%Hh%Mm%S", gmtime()) + +#=============================================================================== +# CHARGEMENT DE PSSE - LOADING OF PSSE +#=============================================================================== +pssFolder=str(paths[3]) +import sys +sys.path.append(pssFolder)#r"C:\Program Files\PTI\PSSE33\PSSBIN") +os.environ['PATH'] = pssFolder+":"+os.environ['PATH'] #r"C:\Program Files\PTI\PSSE33\PSSBIN;"+ os.environ['PATH'] +os.chdir(folder) +import psspy +import pssarrays +import redirect +_i=psspy.getdefaultint() +_f=psspy.getdefaultreal() +_s=psspy.getdefaultchar() +redirect.psse2py() +#import pssdb +psspy.psseinit(80000) + +# Silent execution of PSSe +islct=6 # 6=no output; 1=standard +psspy.progress_output(islct) + +# Enregistrement de l'heure de debut de simulation +f=open(exec_file, 'a') +start_time=time.clock() +f.write("Starting time: %f; Monte Carlo Size : %f; " % (start_time, montecarlosize)) +f.close() + +#=============================================================================== +# Fonction de wrappage - Wrapper function +#=============================================================================== +def PSSEFunction(x): + # Definition des variables globales + global TStest + global Xt + global sizeY0 + global sizeY1 + global sizeY2 + global sizeY3 + global sizeY4 + global sizeY + global wind_var + global PV_var + global N_1 + global load_var + global logCSVfilename + global logTXTfilename + global ite + global folder + global day + global folderN_1 + global fich + global hour + global montecarlosize + global WTconfig + global x2 + + ite+=1 # incrementation du compteur + + # Load data from PSSe + psspy.case(doc_base) #Launching of PSSE and opening the working file + all_inputs_base=read_sav(doc_base) + buses_base=all_inputs_base[0] + lines_base=all_inputs_base[1] + transf_base=all_inputs_base[2] + plants_base=all_inputs_base[3] + loads_base=all_inputs_base[4] + shunt_base=all_inputs_base[5] + doci=folder+"\N"+folderN_1+day+"\CasNum"+str(ite)+".sav" + psspy.save(doci) + + # Total initial shunt on buses + init_shunt = 0 + for i in range(len(shunt_base)) : + init_shunt += float(shunt_base[i][2]) + + # Configuration de l'OPF a partir des parametres de l'utilisateur + nbeOPF=5 # Nombre de lancement max de l'OPF pour atteindre la convergence de l'algorithme + psspy.report_output(6,"",[0,0]) + psspy.produce_opf_log_file(1,r"""DETAIL""") + psspy.minimize_fuel_cost(int(data_OPF[0])) + psspy.minimize_adj_bus_shunts(int(data_OPF[1])) + psspy.minimize_load_adjustments(int(data_OPF[2])) + psspy.initial_opf_barrier_coeff(100.0) + psspy.opf_fix_all_generators(1) + psspy.set_opf_report_subsystem(3,1) + + + print " PSEN simulator, case number: "+str(ite) + + # 1. Affiche X + nx = x.getSize() + if TStest==1 : + for i in range (len (Xt)) : + if Xt[i] == -1 : + if i == 0 and load_var==1 : + pass + elif i == 1 and N_1==1 : + x[i]=int(floor(x[i])) # Si on etudie le N-1 on arrondie la valeur tiree en floor : on obtient le numero de la ligne + elif i == 2 and wind_var1==1 : + x[i]=eol(x[i],WTconfig) + elif i == 3 and wind_var2==1 : + x[i]=eol(x[i],WTconfig) + elif i == 4 and PV_var==1 : # Si on etudie la variabilite de l'eolien on lui donne la valeur de production de l'eolienne a partir du vent + pass + else : + x[i]=-1 + else : + x[i]=float(Xt[i]) # Dans le cas d'une etude temporelle on lui donne la valeur de Xt + else : + if load_var==1 : + pass # Sinon on donne la valeur tiree si on etudie la variabilite de x[0] + else : + x[0]=1 # Sinon on laisse la valeur de base + + if N_1==1 : + x[1]=int(floor(x[1])) # Si on etudie le N-1 on arrondie la valeur tiree en floor : on obtient le numero de la ligne + else : + x[1]=-1 # Sinon on donne -1 comme marqueur + + if wind_var1==1: + x[2]=eol(x[2],WTconfig) # Si on etudie la variabilite de l'eolien on lui donne la valeur de production de l'eolienne a partir du vent + else : + x[2]=0 # Sinon on considere qu'il n'y a pas d'eolien + + if wind_var2==1: + x[3]=eol(x[3],WTconfig) # Si on etudie la variabilite de l'eolien on lui donne la valeur de production de l'eolienne a partir du vent + else : + x[3]=0 # Sinon on considere qu'il n'y a pas d'eolien + + if PV_var==1 : # Si on etudie la variabilite du PV on laisse sa valeur a la va + pass + else : + x[4]=0 # Sinon on considere qu'il n'y a pas de PV + for i in range(0,nx): + print "x[%d]=%f" % (i,x[i]) + + # 2. Fait le calcul avec PSSE + #Editing some values in the PSSE .sav input file + # Change the values of the different loads and treat large changes of load to help convergence + if x[0] > 0.75 : + for i in range(0,np.array(loads_base).shape[0]) : # On change directement toutes les charges + psspy.load_chng_4(int(loads_base[i][0]),r"""1""",[1,_i,_i,_i,_i,_i],[x[0]*loads_base[i][1],x[0]*loads_base[i][2],_f,_f,_f,_f]) + elif x[0] > 0.4 : + for i in range(0,np.array(loads_base).shape[0]) : # On effectue un pretraitement en passant par une charge intermediaire + psspy.load_chng_4(int(loads_base[i][0]),r"""1""",[1,_i,_i,_i,_i,_i],[(1+x[0])/2*loads_base[i][1],(1+x[0])/2*loads_base[i][2],_f,_f,_f,_f]) + psspy.fnsl([0,0,0,1,1,0,99,0]) # Load flow Newton Raphson + psspy.bsys(3,0,[0.0,0.0],0,[],1,[1],0,[],0,[]) + psspy.set_opf_report_subsystem(3,0) + psspy.nopf(0,1) # Lancement OPF + for i in range(0,np.array(loads_base).shape[0]) : # On change toutes les charges + psspy.load_chng_4(int(loads_base[i][0]),r"""1""",[1,_i,_i,_i,_i,_i],[x[0]*loads_base[i][1],x[0]*loads_base[i][2],_f,_f,_f,_f]) + else : + for i in range(0,np.array(loads_base).shape[0]) : # On effectue un pretraitement en passant par une charge intermediaire + psspy.load_chng_4(int(loads_base[i][0]),r"""1""",[1,_i,_i,_i,_i,_i],[0.7*loads_base[i][1],0.7*loads_base[i][2],_f,_f,_f,_f]) + psspy.fnsl([0,0,0,1,1,0,99,0]) + psspy.bsys(3,0,[0.0,0.0],0,[],1,[1],0,[],0,[]) + psspy.set_opf_report_subsystem(3,0) + psspy.nopf(0,1) + for i in range(0,np.array(loads_base).shape[0]) : # On effectue un pretraitement en passant par une charge intermediaire + psspy.load_chng_4(int(loads_base[i][0]),r"""1""",[1,_i,_i,_i,_i,_i],[0.4*loads_base[i][1],0.4*loads_base[i][2],_f,_f,_f,_f]) + psspy.fnsl([0,0,0,1,1,0,99,0]) + psspy.bsys(3,0,[0.0,0.0],0,[],1,[1],0,[],0,[]) + psspy.set_opf_report_subsystem(3,0) + psspy.nopf(0,1) + for i in range(0,np.array(loads_base).shape[0]) : # On change toutes les charges + psspy.load_chng_4(int(loads_base[i][0]),r"""1""",[1,_i,_i,_i,_i,_i],[x[0]*loads_base[i][1],x[0]*loads_base[i][2],_f,_f,_f,_f]) + + x2=[] + for sz in range(0,nx): + x2.append(float(x[sz])) + + if x[1]<0 : + pass + elif x[1] < len(continLines) : # L'element tire est une ligne + line_num=int(x[1]) + from_bus=continLines[int(line_num)][0] + to_bus=continLines[int(line_num)][1] + br_id=continLines[int(line_num)][2]#.replace('@','') + psspy.branch_chng(from_bus,to_bus,str(br_id),[0,_i,_i,_i,_i,_i],[ _f, _f, _f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) + x2[1]='Line '+str(from_bus)+'-'+str(to_bus)+'#'+str(br_id) + elif x[1] < (len(continLines)+len(continGroups)) : + group_num = int(x[1])-len(continLines) + bus_num = continGroups[int(group_num)][0] + bus_id = continGroups[int(group_num)][1] + psspy.machine_chng_2(int(bus_num),str(bus_id),[0,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) # Change Interconnection disponibility + psspy.opf_gendsp_indv(int(bus_num),str(bus_id),_i,0.0) + x2[1]='Group '+str(bus_num)+'#'+str(bus_id) + #elif x[1] < len(intercos) : + #mat_num=int(x[1]) + #psspy.machine_chng_2(int(intercos[mat_num][0]),str(intercos[mat_num][2]),[0,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) # Change Interconnection disponibility + #psspy.opf_gendsp_indv(int(intercos[mat_num][0]),str(intercos[mat_num][2]),_i,0.0) + #x[1]=-mat_num + else : + pass + # Change the bus that is not in service + #intercos = [] + #line_num=int(x[1]-len(intercos)) + #from_bus=lines_con[int(line_num)-1][0] + #to_bus=lines_con[int(line_num)-1][1] + #br_id=lines_con[int(line_num)-1][2]#.replace('@','') + #psspy.branch_chng(from_bus,to_bus,str(br_id),[0,_i,_i,_i,_i,_i],[ _f, _f, _f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) + #x[1]=line_num + # Change the production of the wind turbines + if np.matrix(windTurbines1).shape[1]>0 : + for i in range(0,np.matrix(windTurbines1).shape[0]) : + psspy.machine_chng_2(windTurbines1[i][0],str(windTurbines1[i][2]),[1,_i,_i,_i,_i,_i],[x[2]*plants_base[windTurbines1[i][1]][6],_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) + + if np.matrix(windTurbines2).shape[1]>0 : + for i in range(0,np.matrix(windTurbines2).shape[0]) : + psspy.machine_chng_2(windTurbines2[i][0],str(windTurbines2[i][2]),[1,_i,_i,_i,_i,_i],[x[3]*plants_base[windTurbines2[i][1]][6],_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) + + # Change the production of the PV stations + if np.matrix(solarPV).shape[1]>0 : + for i in range(0,np.matrix(solarPV).shape[0]) : + psspy.machine_chng_2(solarPV[i][0],str(solarPV[i][2]),[1,_i,_i,_i,_i,_i],[x[4]*plants_base[solarPV[i][1]][6],_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) + + psspy.save(doci) #Saving .sav modifications + ok=1 + while nbeOPF>=0 : + #for i in (zip(*buses_base)[0]) : psspy.bus_chng_3(i,[_i,_i,_i,_i],[_f, 1.05,_f,_f,_f,_f,_f],_s) + psspy.fnsl([0,0,0,1,1,1,99,0]) + psspy.bsys(3,0,[0.0,0.0],0,[],1,[1],0,[],0,[]) + psspy.set_opf_report_subsystem(3,0) + psspy.nopf(0,1) + if psspy.solved()==7: + print 'CONVERGENCE CAS '+str(ite) + ok=1 + break + else : + print '===================================================================' + print 'NO CONVERGENCE' + print '===================================================================' + ok=0 + #for i in range (134) : + #psspy.opf_bus_indv(i,[_i,0],[_f, 0.7,_f,_f,_f]) + nbeOPF-=1 + psspy.save(doci) + all_inputs=read_sav(doci) + buses=all_inputs[0];lines=all_inputs[1];transf=all_inputs[2];plants=all_inputs[3];loads=all_inputs[4]; shunt=all_inputs_base[5] + + # 3. Affiche Y + sizeY4=np.matrix(shunt).shape[0] + y=np.zeros(2*sizeY0+sizeY1+3*sizeY2+sizeY3+sizeY4) + z=np.zeros(8) + rate_mat_index=Irate_num+2 + if ok==1 : + # Creates the quantities of interest + for i in range (sizeY2) : + if lines [i][rate_mat_index]>100 : + z[0]+=1 # Number of lines above 100% of their limits + for i in range (sizeY1): + if buses[i][2]>1.06 : + z[1]+=1 + if buses[i][2]<0.9399 : + z[1]+=1 # Number of buses outside of their voltage limits + for i in range (sizeY0) : + z[2]+=float(plants[i][3]) # Total active production + for i in range (sizeY3) : + z[3]+=float(loads[i][1]) # Total active consumption + z[4]=(z[2]-z[3])/z[2]*100 # Active power losses + for i in range (sizeY2) : + if lines [i][3]>z[5] : + z[5]=lines [i][rate_mat_index] # Max flow in lines + for i in range (sizeY2) : + if lines [i][rate_mat_index]>90 : + z[6]+=1 + z[6]=z[6]-z[0] # Number of lines between 90% and 100% of their limits + + final_shunt=0 + for i in range (sizeY4) : + final_shunt+=shunt[i][2] + z[7]=final_shunt-init_shunt + + # Creates the output vectors + for Pmach in range (sizeY0): + y[Pmach]=float(plants[Pmach][3]) + for Qmach in range (sizeY0): + y[Qmach+sizeY0]=float(plants[Qmach][4]) + for Vbus in range (sizeY1): + y[Vbus+2*sizeY0]=float(buses[Vbus][2]) + for Iline in range (sizeY2): + y[Iline+2*sizeY0+sizeY1]=float(lines[Iline][rate_mat_index]) + for Pline in range (sizeY2): + y[Pline+2*sizeY0+sizeY1+sizeY2]=float(lines[Pline][6]) + for Qline in range (sizeY2): + y[Qline+2*sizeY0+sizeY1+2*sizeY2]=float(lines[Qline][7]) + for Pload in range (sizeY3) : + y[Pload+2*sizeY0+sizeY1+3*sizeY2]=float(loads[Pload][1]) + for Qshunt in range (sizeY4) : + y[Qshunt+2*sizeY0+sizeY1+3*sizeY2+sizeY3]=float(shunt[Qshunt][2]) + + #Ecris les sorties + print "sorties:" + nz = len(z) + for i in range(0,nz): + print "z[%d]=%f" % (i,z[i]) + MyLogger(x2,y,z,logCSVfilename,logTXTfilename,ite) + #MyMultiLogger (x2, y, sizeY, z, ite, folder, day, fich, hour) + return NumericalPoint(z) + else : + MyLogger(x2,y,z,logCSVfilename,logTXTfilename,ite) + #MyMultiLogger (x2, y, sizeY, z, ite, folder, day, fich, hour) + return NumericalPoint(z) + +#=============================================================================== +# DEFINITION DU WRAPPER - WRAPPER's DEFINITION +#=============================================================================== +# Initialize size output +psspy.case(doc_base) +all_inputs_base=read_sav(doc_base) +buses_base=all_inputs_base[0] +lines_base=all_inputs_base[1] +trans_base=all_inputs_base[2] +plants_base=all_inputs_base[3] +loads_base=all_inputs_base[4] +shunt_base=all_inputs_base[5] +sizeY0=np.matrix(plants_base).shape[0] +sizeY1=np.matrix(buses_base).shape[0] +sizeY2=np.matrix(lines_base).shape[0] +sizeY3=np.matrix(loads_base).shape[0] +sizeY4=np.matrix(shunt_base).shape[0] +sizeY=[sizeY0,sizeY1,sizeY2,sizeY3,sizeY4] +sizeOutput=sizeY2 + + +class PSSEWrapperClass(OpenTURNSPythonFunction) : + def __init__(self) : + OpenTURNSPythonFunction.__init__(self,5,8) + def _exec(self,x) : + return PSSEFunction(x) + +# Initialize the folder +newpath = folder+"\N"+folderN_1+day +if not os.path.exists(newpath): os.makedirs(newpath) + +# Test the Num. Math. Function +pssefun = NumericalMathFunction(PSSEWrapperClass()) + +# Definition of the function to use +inputDim = pssefun.getInputDimension() +outputDim = pssefun.getOutputDimension() + +# Initialization of the distribution collection: +#aCollection = DistributionCollection() + +# Create a collection of the marginal distributions +collectionMarginals = DistributionCollection(inputDim) +collectionMarginals[0] = Distribution(distributionX0) # Load distribution +collectionMarginals[1] = Distribution(distributionX1) # N-1 distribution +collectionMarginals[2] = Distribution(distributionX2) # Wind 1 distribution +collectionMarginals[3] = Distribution(distributionX3) # Wind 2 distribution +collectionMarginals[4] = Distribution(distributionX4) # PV distribution + +#Create a correlation matrix as copulas +corr=CorrelationMatrix(inputDim) + +corr[1,0]=corr10 +corr[2,0]=corr20 +corr[3,0]=corr30 +corr[4,0]=corr40 +corr[0,1]=corr10 +corr[2,1]=corr21 +corr[3,1]=corr31 +corr[4,1]=corr41 +corr[0,2]=corr20 +corr[1,2]=corr21 +corr[3,2]=corr32 +corr[4,2]=corr42 +corr[0,3]=corr30 +corr[1,3]=corr31 +corr[2,3]=corr32 +corr[4,3]=corr43 +corr[0,4]=corr40 +corr[1,4]=corr41 +corr[2,4]=corr42 +corr[3,4]=corr43 + +copula=Copula(NormalCopula(corr)) + + +# Create the input probability distribution, args are the distributions, the correlation laws +inputDistribution = ComposedDistribution(collectionMarginals, copula) + +# Create the input random vector +"""inputRandomVector = RandomVector(inputDistribution) + +# Create the output variable of interest +outputVariableOfInterest = RandomVector(pssefun, inputRandomVector) +outputVariableOfInterest.setDescription(pssefun.getOutputDescription())""" + +#=============================================================================== +# ETUDE DE DISPERSION CENTRALE - CENTRAL DEVIATION STUDY +#=============================================================================== +# Initialize the logger : write the headers +logCSVfilename=folder+"\N"+folderN_1+day+"\simulationDClog"+hour+".csv" # Name of the file : global variable +f = open(logCSVfilename, "a") +f.write("Iteration;;X:Load(pu);X:lineOff#;XProdEolienne1%Pnom;XProdEolienne2%Pnom;X:ProdPV%Pnom;;Y:NbeTransit;Y:NbeTension;Y:PProdTot;Y:PConsoTot;Y:%Losses;Y:Max%A;Y:NbeTransit_0.9-1;Y:AddedMVAR;;") +# Names of the Output variables withConso the bus number +for name in range (sizeY0): + f.write("Y:PMachine"+str(plants_base[name][0])+";") +for name in range (sizeY0): + f.write("Y:QMachine"+str(plants_base[name][0])+";") +for name in range (sizeY1): + f.write("Y:VBus"+str(buses_base[name][0])+";") +for name in range (sizeY2): + f.write("Y"+str(name+1)+":%Rate "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+";") +for name in range (sizeY2): + f.write("Y"+str(name+1)+":P "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+";") +for name in range (sizeY2): + f.write("Y"+str(name+1)+":Q "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+";") +for name in range (sizeY3): + f.write("Y:Load "+str(loads_base[name][0])+";") +for name in range (sizeY4): + f.write("Y:Shunt bus "+str(shunt_base[name][0])+";") +f.write("\n") +# Names of the Output variables with the bus names +f.write("#;;pu;line number;%Pnom;%Pnom;%Pnom;;Nbe;Nbe;MW;MW;%;%;Nbe;MVAR;;") +for name in range (sizeY0): + f.write(str(plants_base[name][8])+";") +for name in range (sizeY0): + f.write(str(plants_base[name][8])+";") +for name in range (sizeY1): + f.write(str(buses_base[name][3])+";") +for name in range (sizeY2): + f.write(str(lines_base[name][8])+"-"+str(lines_base[name][9])+";") +for name in range (sizeY2): + f.write(str(lines_base[name][8])+"-"+str(lines_base[name][9])+";") +for name in range (sizeY2): + f.write(str(lines_base[name][8])+"-"+str(lines_base[name][9])+";") +for name in range (sizeY3): + f.write(str(loads_base[name][4])+";") +for name in range (sizeY4): + f.write(str(shunt_base[name][3])+";") +f.write("\n") +f.close() + +logTXTfilename=folder+"\N"+folderN_1+day+"\simulationDClog"+hour+".txt" # Name of the file : global variable +f = open(logTXTfilename, "a") +f.write("Iteration\tX:Load(pu)\tX:lineOff#\tXProdEolienne1%Pnom\ttXProdEolienne2%Pnom\tX:ProdPV%Pnom\tY:NbeTransit\tY:NbeTension\tY:PProdTot\tY:PConsoTot\tY:%Losses\tY:Max%A\tY:NbeTransit_0.9-1\tY:AddedShunt\t") +# Names of the Output variables withConso the bus number +for name in range (sizeY0): + f.write("Y:PMachine"+str(plants_base[name][0])+" - "+str(plants_base[name][8])+"\t") +for name in range (sizeY0): + f.write("Y:QMachine"+str(plants_base[name][0])+" - "+str(plants_base[name][8])+"\t") +for name in range (sizeY1): + f.write("Y:VBus"+str(buses_base[name][0])+" - "+str(buses_base[name][3])+"\t") +for name in range (sizeY2): + f.write("Y"+str(name+1)+":%RateA "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+" - "+str(lines_base[name][8])+"-"+str(lines_base[name][9])+"\t") +for name in range (sizeY2): + f.write("Y"+str(name+1)+":P "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+" - "+str(lines_base[name][8])+"-"+str(lines_base[name][9])+"\t") +for name in range (sizeY2): + f.write("Y"+str(name+1)+":Q "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+" - "+str(lines_base[name][8])+"-"+str(lines_base[name][9])+"\t") +for name in range (sizeY3): + f.write("Y:Load "+str(loads_base[name][0])+" - "+str(loads_base[name][4])+"\t") +for name in range (sizeY4): + f.write("Y:Shunt "+str(shunt_base[name][0])+" - "+str(shunt_base[name][3])+"\t") +f.write("\n") +f.close() + +""" +# Initialize the multilogger : write the headers +for fich in range (np.size(sizeY,0)): + multilogfilename=folder+"\N"+day+"\Y"+str(fich)+"simulationDClog"+hour+".csv" + f=open(multilogfilename, 'a') + f.write("Iteration;;X:Load(pu);X:lineOff#;XProdEolienne1%Pnom;XProdEolienne2%Pnom;X:ProdPV%Pnom;;Y:NbeTransit;Y:NbeTension;Y:PProdTot;Y:PConsoTot;Y:Max%A;Y:NbeTransit_0.9-1;;") + if fich == 0 : + for name in range (sizeY[0]): + f.write("Y:PMachine"+str(plants_base[name][0])+";") + f.write("\n") + f.write("#;;pu;line number;%Pnom;%Pnom;%Pnom;;Nbe;Nbe;MW;MW;%;%;Nbe;;") + for name in range (sizeY[0]): + f.write(str(plants_base[name][8])+";") + f.write("\n") + f.close() + elif fich == 1 : + for name in range (sizeY[1]): + f.write("Y:VBus"+str(buses_base[name][0])+";") + f.write("\n") + f.write("#;;pu;line number;%Pnom;%Pnom;%Pnom;;Nbe;Nbe;MW;MW;%;%;Nbe;;") + for name in range (sizeY[1]): + f.write(str(buses_base[name][3])+";") + f.write("\n") + f.close() + elif fich == 2 : + for name in range (sizeY[2]): + f.write("Y"+str(name+1)+":%RateA "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+";") + f.write("\n") + f.write("#;;pu;line number;%Pnom;%Pnom;%Pnom;;Nbe;Nbe;MW;MW;%;%;Nbe;;") + for name in range (sizeY[2]): + f.write(str(lines_base[name][8])+"-"+str(lines_base[name][9])+";") + f.write("\n") + f.close() + elif fich == 3 : + for name in range (sizeY[3]): + f.write("Y:Ploads "+str(loads_base[name][0])+";") + f.write("\n") + f.write("#;;pu;line number;%Pnom;%Pnom;%Pnom;;Nbe;Nbe;MW;MW;%;%;Nbe;;") + for name in range (sizeY[3]): + f.write(str(loads_base[name][4])+";") + f.write("\n") + f.close() + +""" +# Start the simulations +ite=0 +print "\n\n\n Starting PSEN "+str(montecarlosize)+" simulations" + +"""inputSample=inputRandomVector.getSample(montecarlosize) +inputSample.setDescription( ("X0","X1","X2","X3") ) +inputSample.exportToCSVFile("InputSamples.csv")""" + +if sum(corr) == 5 : + myLHSE = LHSExperiment(inputDistribution,montecarlosize) + inputSample = myLHSE.generate() +else : + myMCE = MonteCarloExperiment(inputDistribution,montecarlosize) + inputSample = myMCE.generate() + +try : + time_serie +except NameError : + print 'Probabilistic' + TStest=0 + outputSampleAll = pssefun(inputSample)#outputVariableOfInterest.getSample(montecarlosize) +else : + TStest=1 + for i in range (len(time_serie_mat)) : + print 'Time serie' + RandomGenerator.SetSeed(i) + Xt=[] + n=0 + for j in range (len(time_serie_file)) : + if time_serie_file[j] == -1 : + Xt.append(-1) + n+=1 + else : + Xt.append(time_serie_mat[i][j-n]) + Xt.insert(1,-1) + try : + outputSampleAll + except : + outputSampleAll = pssefun(inputSample) + else : + outputSampleAll.add(pssefun(inputSample)) + +outputDim=outputSampleAll.getDimension() +outputSize=outputSampleAll.getSize() + +outputSample=NumericalSample(0,outputDim) +outputSampleMissed=NumericalSample(0,outputDim) + +for i in range (outputSize): + if outputSampleAll[i,5]==0 : + outputSampleMissed.add(outputSampleAll[i]) + else : + outputSample.add(outputSampleAll[i]) + +outputDescription=[] +for i in range (outputDim): + outputDescription.append("Y"+str(i)) +outputSample.setDescription( outputDescription ) + +# Get the empirical mean and standard deviations +empMeanX = inputSample.computeMean() +empSdX = inputSample.computeStandardDeviationPerComponent() +empiricalMean = outputSample.computeMean() +empiricalSd = outputSample.computeStandardDeviationPerComponent() + +f=open(logCSVfilename, 'a') +f.write("\n") +f.write('Mean;;') +for i in range(0,inputDim): + f.write("%f;" % (empMeanX[i])) +f.write(";") +for i in range(0,outputDim): + f.write("%f;" % (empiricalMean[i])) +f.write(";") +f.write("\nStandard deviation;;") +for i in range(0,inputDim): + f.write("%f;" % (empSdX[i])) +f.write(";") +for i in range(0,outputDim): + f.write("%f;" % (empiricalSd[i])) +f.write(";") +f.close() + +f=open(exec_file,'a') +#stop_time=100*times()[0] +stop_time=time.clock() +f.write("Stop time: %f; Duration: %f; Time per execution: %f; " % (stop_time, stop_time-start_time, (stop_time-start_time)/montecarlosize)) +f.write("\n\n") +f.close() + +print '\n\nSimulated '+str(montecarlosize)+' cases in '+ str(stop_time-start_time)+' seconds. Average '+str((stop_time-start_time)/montecarlosize)+'s per case.' + +nMissed=int(outputSampleMissed.getSize()) + +print '\n\n Non-convergence rate is '+str(round(nMissed*100/montecarlosize,3))+' % ('+str(outputSampleMissed.getSize())+' cases on '+str(montecarlosize)+')' + +#graphical_out(inputSample, outputSampleAll, inputDim, outputDim, montecarlosize) + diff --git a/OldCodes/PSEN_Eficas/PSEN/__init__.py b/OldCodes/PSEN_Eficas/PSEN/__init__.py new file mode 100755 index 00000000..e69de29b diff --git a/OldCodes/PSEN_Eficas/PSEN/exploit2.ows b/OldCodes/PSEN_Eficas/PSEN/exploit2.ows new file mode 100755 index 00000000..56005895 --- /dev/null +++ b/OldCodes/PSEN_Eficas/PSEN/exploit2.ows @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OldCodes/PSEN_Eficas/PSEN/support_functions.py b/OldCodes/PSEN_Eficas/PSEN/support_functions.py new file mode 100755 index 00000000..4a84a08a --- /dev/null +++ b/OldCodes/PSEN_Eficas/PSEN/support_functions.py @@ -0,0 +1,599 @@ +# -*- coding: utf-8 -*- +""" +Created on Mon Jun 03 15:31:42 2013 + +@author: B31272 + +Fonctions de support +""" +import os,sys,random,string +sys.path.append(r"C:\Program Files\PTI\PSSE33\PSSBIN") +os.environ['PATH'] = r"C:\Program Files\PTI\PSSE33\PSSBIN;"+ os.environ['PATH'] +#os.chdir(folder) +import psspy +import pssarrays +import redirect +_i=psspy.getdefaultint() +_f=psspy.getdefaultreal() +_s=psspy.getdefaultchar() +redirect.psse2py() +#import pssdb +psspy.psseinit(80000) + +import numpy as np +from math import* +from openturns import * + +#=============================================================================== +# DEFINITION DES FONCTIONS - CREATION OF THE FUNCTIONS +#=============================================================================== + +#Fonction de transfert vent-puissance d'une eolienne +def eol(wind, WTconfig): + Vcin = WTconfig [0] + Vrate = WTconfig [1] + Vcout = WTconfig [2] + Rho = WTconfig [3] + lossrate = WTconfig [4] + if wind <= Vcin : + Pnorm=0 + elif wind < Vrate : + Pnorm=wind*(1-lossrate)#((wind**2-Vcin**2)/(Vrate**2-Vcin**2)*Rho/1.225*(1-lossrate)) + elif wind < Vcout : + Pnorm = 1*(1-lossrate) + else : + Pnorm=0 + return Pnorm + +#Fonction permettant de lire les donnees qui nous interessent et de les mettre dans une matrice +def read_sav(doc): + psspy.case(doc) + # Select what to report + if psspy.bsysisdef(0): + sid = 0 + else: # Select subsytem with all buses + sid = -1 + + flag_bus = 1 # in-service + flag_plant = 4 # in-service + flag_load = 1 # in-service + flag_swsh = 1 # in-service + flag_brflow = 1 # in-service + owner_brflow = 1 # bus, ignored if sid is -ve + ties_brflow = 5 # ignored if sid is -ve + entry = 1 # gives a single entry (each branch once) + + #Bus data (number, basekV, pu, name, ...) : PSSe has 3 functions one for integer data, one for real data and one for strings + istrings = ['number'] + ierr, idata = psspy.abusint(sid, flag_bus, istrings) + buses=idata + + rstrings = ['base','pu'] + ierr, rdata = psspy.abusreal(sid, flag_bus, rstrings) + buses.append(rdata[0]) + buses.append(rdata[1]) + + cstrings = ['name'] + ierr, cdata = psspy.abuschar(sid, flag_bus, cstrings) + buses.append(cdata[0]) + + buses=zip(*buses) # transpose the matrix + + del idata, rdata, istrings, rstrings + + #Lines data (from, to, amps, rate%a, ploss, qloss) + flag=2 #All non-transformer branches + istrings = ['fromnumber','tonumber'] + ierr, idata = psspy.abrnint(sid, owner_brflow, ties_brflow, flag, entry, istrings) + lines=idata + + rstrings=['amps','pctratea','pctrateb','pctratec','p','q'] + ierr, rdata = psspy.abrnreal(sid, owner_brflow, ties_brflow, flag, entry, rstrings) + for rc in range (np.matrix(rdata).shape[0]) : + lines.append(rdata[rc]) + + cstrings=['fromname','toname','id'] + ierr, cdata = psspy.abrnchar(sid, owner_brflow, ties_brflow, flag, entry, cstrings) + for rc in range (np.matrix(cdata).shape[0]) : + lines.append(cdata[rc]) + + lines=zip(*lines) # transpose the matrix + + del idata, rdata, istrings, rstrings + + #2 windings transformers data (from, to, amps, rate%a, ploss, qloss) + flag=6 #All transformer branches + istrings = ['fromnumber','tonumber'] + ierr, idata = psspy.abrnint(sid, owner_brflow, ties_brflow, flag, entry, istrings) + transf=idata + + rstrings=['amps','pctratea','ploss','qloss'] + ierr, rdata = psspy.abrnreal(sid, owner_brflow, ties_brflow, flag, entry, rstrings) + for rc in range (np.matrix(rdata).shape[0]) : + transf.append(rdata[rc]) + + transf=zip(*transf) # transpose the matrix + + del idata, rdata, istrings, rstrings + + #Machines data (bus, inservice, number, pgen, qgen, mvabase) + istrings = ['number','status'] + ierr, idata = psspy.amachint(sid, flag_plant, istrings) + plants=idata + + cstrings = ['id'] + ierr, cdata = psspy.amachchar(sid, flag_plant, cstrings) + for rc in range (np.matrix(cdata).shape[0]) : + plants.append(cdata[rc]) + + rstrings = ['pgen','qgen','mbase','pmax','qmax'] + ierr, rdata = psspy.amachreal(sid, flag_plant, rstrings) + for rc in range (np.matrix(rdata).shape[0]) : + plants.append(rdata[rc]) + + cstrings = ['name'] + ierr, cdata = psspy.amachchar(sid, flag_plant, cstrings) + plants.append(cdata[0]) + + nb_plants=np.matrix(plants).shape[1] + for rc in range (0,nb_plants) : + plants[3][rc]=float(plants[3][rc]*int(plants[1][rc])) # If the plant isn't in service its production is fixed to zero + plants[4][rc]=float(plants[4][rc]*int(plants[1][rc])) # If the plant isn't in service its production is fixed to zero + + plants=zip(*plants) # transpose the matrix + + #Loads data (bus, active, reactive) + istrings = ['number'] + ierr, idata = psspy.aloadint(sid, flag_load, istrings) + loads=idata + + xstrings = ['mvaact'] + ierr, xdata = psspy.aloadcplx(sid, flag_load, xstrings) + loads.append(np.real(xdata)[0]) # Append the real part of the load + loads.append(np.imag(xdata)[0]) #Append the imaginary part of the load + + istrings = ['status'] + ierr, idata = psspy.aloadint(sid, flag_load, istrings) + loads.append(idata[0]) + + cstrings = ['name'] + ierr, cdata = psspy.aloadchar(sid, flag_load, cstrings) + loads.append(cdata[0]) + + nb_loads=np.matrix(loads).shape[1] + for rc in range (0,nb_loads) : + loads[1][rc]=float(loads[1][rc]*int(loads[3][rc])) # If the load isn't in service its consumption is fixed to zero + loads[2][rc]=float(loads[2][rc]*int(loads[3][rc])) # If the load isn't in service its consumption is fixed to zero + + loads=zip(*loads) # transpose the matrix + + #Fixed shunt data (number, MVAR, name, ...) + istrings = ['number','status'] + ierr, idata = psspy.afxshntbusint(sid, flag_bus, istrings) + shunt=idata + + xstrings = ['shuntact'] + ierr, xdata = psspy.afxshntbuscplx(sid, flag_bus, xstrings) + shunt.append(np.imag(xdata)[0]) #Append the imaginary part of the load + + cstrings = ['name'] + ierr, cdata = psspy.afxshntbuschar(sid, flag_bus, cstrings) + shunt.append(cdata[0]) + + shunt=zip(*shunt) # transpose the matrix + + return buses, lines, transf, plants, loads, shunt + +# Fonction pour ecrire un fichier de sortie type csv +def MyLogger(x,y,z,logCSVfilename,logTXTfilename,ite): + f=open(logCSVfilename, 'a') + f.write("%f;" % (ite)) + f.write(";") + nx = len(x) + for i in range(0,nx): + f.write(str(x[i]))#f.write("%f;" % (x[i])) + f.write(";") + f.write(";") + nz = len(z) + for i in range(0,nz): + f.write("%f;" % (z[i])) + f.write(";") + ny = len(y) + for j in range(0,ny): + f.write("%f;" % (y[j])) + f.write("\n") + f.close() + + f=open(logTXTfilename, 'a') + f.write("%f\t" % (ite)) + nx = len(x) + for i in range(0,nx): + f.write(str(x[i]))#f.write("%f\t" % (x[i])) + f.write("\t") + nz = len(z) + for i in range(0,nz): + f.write("%f\t" % (z[i])) + ny = len(y) + for j in range(0,ny): + f.write("%f\t" % (y[j])) + f.write("\n") + f.close() + + +# Fonction pour ecrire un fichier de sortie type csv pour chaque type de grandeur de sortie +def MyMultiLogger (x, y, sizeY, z, ite, folder, day, fich, hour): + global ny + y0=0 + for fich in range (np.size(sizeY,0)): + multilogfilename=folder+"\N"+day+"\Y"+str(fich)+"simulationDClog"+hour+".csv" + f=open(multilogfilename, 'a') + f.write("%f;" % (ite)) + f.write(";") + nx = len(x) + for i in range(0,nx): + f.write("%f;" % (x[i])) + f.write(";") + nz = len(z) + for i in range(0,nz): + f.write("%f;" % (z[i])) + f.write(";") + ny = sizeY[fich] + for j in range(0,ny): + f.write("%f;" % (y[j+y0])) + f.write("\n") + f.close() + y0 += ny + print "Fichiers "+str(ite)+" enregistres\n\n" + +# Analyses graphiques +def graphical_out (inputSample, outputSampleAll, inputDim, outputDim, montecarlosize) : + print "\n\n\n Writing graphical analysis files..." + # A Pairwise scatter plot of the inputs + myGraph = Graph() + myPairs = Pairs(inputSample, 'Inputs relations', inputSample.getDescription(), "red", "bullet") + myGraph.add(Drawable(myPairs)) + myGraph.draw("Input Samples",640,480,GraphImplementation.PDF) + #View(myGraph.getBitmap()) + print 'Input pairwise scatterplot done...' + + # A Pairwise scatter plot of the outputs + myGraph = Graph() + myPairs = Pairs(outputSampleAll, 'Output relations', outputSampleAll.getDescription(), "red", "bullet") + myGraph.add(Drawable(myPairs)) + myGraph.draw("Output Samples",640,480,GraphImplementation.PDF) + #View(myGraph.getBitmap()) + print 'Output pairwise scatterplot done...' + + # A Pairwise scatter plot of the inputs/outputs + # Draw all scatter plots yj vs xi + for j in range(outputDim): + outputSamplej=outputSampleAll.getMarginal(j) + Ylabelstr=outputSamplej.getDescription()[0] + for i in range(inputDim): + inputSamplei=inputSample.getMarginal(i) + Xlabelstr=inputSamplei.getDescription()[0] + X=NumericalSample(montecarlosize,2) + for k in range(montecarlosize): + X[k,0]=inputSamplei[k][0] + X[k,1]=outputSamplej[k][0] + myGraph = Graph() + myCloud=Cloud(X); + mytitle=Ylabelstr+"vs"+Xlabelstr + myGraph.add(Drawable(myCloud)) + myGraph.setAxes(1) + myGraph.setXTitle(Xlabelstr) + myGraph.setYTitle(Ylabelstr) + myGraph.draw(mytitle,640,480,GraphImplementation.PDF) + #ViewImage(myGraph.getBitmap()) + print 'Input/Output pairwise scatterplot done...' + + # An histogram of the inputs + for i in range(inputDim): + inputSamplei=inputSample.getMarginal(i) + myGraph = VisualTest.DrawHistogram(inputSamplei) + labelarray=inputSamplei.getDescription() + labelstr=labelarray[0] + myGraph.setTitle(labelstr) + myGraph.setName(labelstr) + myGraph.setXTitle(labelstr) + myGraph.setYTitle("Frequency") + myGraph.draw(labelstr,640,480,GraphImplementation.PDF) + #View(myGraph.getBitmap()) + print 'Input histogram done...' + + # An histogram of the outputs + for j in range(outputDim): + outputSamplej=outputSampleAll.getMarginal(j) + myGraph = VisualTest.DrawHistogram(outputSamplej) + labelarray=outputSamplej.getDescription() + labelstr=labelarray[0] + myGraph.setTitle(labelstr) + myGraph.setName(labelstr) + myGraph.setXTitle(labelstr) + myGraph.setYTitle("Frequency") + myGraph.draw(labelstr,640,480,GraphImplementation.PDF) + #View(myGraph.getBitmap()) + print 'Output histogram done' + print 'Graphical output terminated' + +def config_ENR(path_config_ENR) : + PV=[] + Wind1=[] + Wind2=[] + Interco=[] + f=open(path_config_ENR,"r") + lines=f.readlines() + for i in range (len(lines)) : + line = lines[i].split(";") + if str(line[0]).upper() == 'PV' : + PV.append([int(line[1]),i-1,int(line[3])]) + elif str(line[0]).upper() == 'W1' : + Wind1.append([int(line[1]),i-1,int(line[3])]) + elif str(line[0]).upper() == 'W2' : + Wind2.append([int(line[1]),i-1,int(line[3])]) + elif str(line[0]).upper() == 'I' : + Interco.append([int(line[1]),i-1,int(line[3])]) + else : + pass + return PV, Wind1, Wind2, Interco + +def config_contingency(path_config_contin) : + lines_con=[] + groups_con=[] + # Loading of lines contingency configuration + f=open(path_config_contin[0],"r") + lines=f.readlines() + f.close() + for i in range (len(lines)) : + line=lines[i].split(";") + try : + int(line[1]) + except ValueError : + pass + else : + if line[0] == '' : + line[0] = '0' + lines_con.append([int(line[1]), int(line[3]), str(line[5]),float(line[0].replace(',','.'))]) + + # Loading of groups contingency configuration + f=open(path_config_contin[1],"r") + lines=f.readlines() + f.close() + for i in range (len(lines)) : + line=lines[i].split(";") + try : + int(line[1]) + except ValueError : + pass + else : + if line[0] == '' : + line[0] = '0' + groups_con.append([int(line[1]), int(line[3]),float(line[0].replace(',','.'))]) + + sizeLines = len(lines_con) + sizeGroups = len(groups_con) + val=[] + prob=[] + for i in range(sizeLines+sizeGroups) : + val.append(int(i)) + + for i in range (sizeLines) : + prob.append(lines_con[i][3]) + for i in range (sizeGroups) : + prob.append(groups_con[i][2]) + + return lines_con, groups_con, val, prob + +def LoadARMA(time_serie_file, time_serie_SS, time_serie_TH) : + f=open(time_serie_file,"r") + lines=f.readlines() + N=len(lines) + Xt=[] + for i in range(N) : + Xt.append([float(lines[i])]) + + myTG=RegularGrid(0,float(time_serie_SS),N) + TS=TimeSeries(myTG,NumericalSample(Xt)) + myWN=WhiteNoise(Distribution(Normal(0,1)),myTG) + myState=ARMAState(TS.getSample(),NumericalSample()) + p=12 + q=0 + d=1 + myFactory = ARMALikelihoodFactory ( p , q , d ) + myARMA = myFactory.build(TS) + + myARMA.setState(myState) + + AR = myARMA.getARCoefficients() + MA = myARMA.getMACoefficients() + + ts = myARMA.getRealization() + ts.setName('A realization') + myTSGraph=ts.drawMarginal(0) + myTSGraph.draw('Realization'+str(p)+","+str(q),640,480,GraphImplementation.PDF) + myARMAState=myARMA.getState() + + #Make a prediction of the future on next Nit instants + Nit = int(time_serie_TH) + myARMA2=ARMA(AR,MA,myWN,myARMAState) + possibleFuture=myARMA2.getFuture(Nit) + possibleFuture.setName('Possible future') + + Xt2=[] + for i in range (len(possibleFuture)): + Xt2.append(possibleFuture.getValueAtIndex(i)[0]) + Max=float(max(Xt2)) + Min=float(min(Xt2)) + h=float(Max-Min) + for i in range (len(possibleFuture)): + value= (Xt2[i]-Min+h/3)/(Max-Min+h/3) + possibleFuture.setValueAtIndex(i,NumericalPoint(1,value)) + + myFG=possibleFuture.drawMarginal(0) + myFG.draw('Future'+str(Nit),640,480,GraphImplementation.PDF) + + return possibleFuture + +def LoadTS(time_serie_file) : + TS=[] + for i in range(len(time_serie_file)) : + if time_serie_file[i] == -1 : + pass + else : + f=open(time_serie_file[i],"r") + lines=f.readlines() + N=len(lines) + Xt=[] + for j in range(N) : + try : + float(lines[i]) + except ValueError : + lines[i] = commaToPoint(lines[i]) + else : + pass + Xt.append([float(lines[j])]) + TS.append(Xt) + return TS + + +def KSDist(filename) : + f=open(filename,"r") + print "Creating Kernel Smoothing distribution from: "+str(filename) + lines=f.readlines() + N=len(lines) + Xt=[] + for i in range(N) : + if lines[i] == "\n" : + print "End of file" + break + else : + try : + float(lines[i]) + except ValueError : + lines[i] = commaToPoint(lines[i]) + else : + pass + Xt.append([float(lines[i])]) + NS=NumericalSample(Xt) + kernel=KernelSmoothing(Uniform()) + myBandwith = kernel.computeSilvermanBandwidth(NS) + KS=kernel.build(NS,myBandwith,1) + return KS + +def threshold (inputRandomVector, outputVariableOfInterest,pssefun,inputDistribution) : + # We create a quadraticCumul algorithm + myQuadraticCumul = QuadraticCumul(outputVariableOfInterest) + + # We compute the several elements provided by the quadratic cumul algorithm + # and evaluate the number of calculus needed + nbBefr = pssefun.getEvaluationCallsNumber() + + # Mean first order + meanFirstOrder = myQuadraticCumul.getMeanFirstOrder()[0] + nbAfter1 = pssefun.getEvaluationCallsNumber() + + # Mean second order + meanSecondOrder = myQuadraticCumul.getMeanSecondOrder()[0] + nbAfter2 = pssefun.getEvaluationCallsNumber() + + # Standard deviation + stdDeviation = sqrt(myQuadraticCumul.getCovariance()[0,0]) + nbAfter3 = pssefun.getEvaluationCallsNumber() + + print "First order mean=", myQuadraticCumul.getMeanFirstOrder()[0] + print "Evaluation calls number = ", nbAfter1 - nbBefr + print "Second order mean=", myQuadraticCumul.getMeanSecondOrder()[0] + print "Evaluation calls number = ", nbAfter2 - nbAfter1 + print "Standard deviation=", sqrt(myQuadraticCumul.getCovariance()[0,0]) + print "Evaluation calls number = ", nbAfter3 - nbAfter2 + + print "Importance factors=" + for i in range(inputRandomVector.getDimension()) : + print inputDistribution.getDescription()[i], " = ", myQuadraticCumul.getImportanceFactors()[i] + print "" + +def getUserDefined (val, prob): + try : + val = val.split(',') + prob = prob.split(',') + except AttributeError : + pass + dim = len (val) + coll = UserDefinedPairCollection() + for i in range (dim) : + UDpair=UserDefinedPair(NumericalPoint(1,float(val[i])),float(prob[i])) + coll.add(UDpair) + return UserDefined(coll) + +def getHistogram (step, prob) : + try : + step = step.split(',') + prob = prob.split(',') + except AttributeError : + pass + dim = len (step) + myHistogram = HistogramPairCollection(dim) + for i in range (dim) : + myHistogram[i]=HistogramPair(float(step[i]),float(prob[i])) + return myHistogram + +def getUserLaw (description) : + law_num=int(description[0]) + time_serie=0 + time_serie_file='' + time_serie_SS=0 + time_serie_TH=0 + if law_num == 1 : + law=Normal(float(description[1]),float(description[2])) + elif law_num == 2 : + law=Uniform(float(description[1]),float(description[2])) + elif law_num == 3 : + law=Exponential(float(description[1]),float(description[2])) + elif law_num == 4 : + law=Weibull(float(description[1]),float(description[2]),float(description[3])) + elif law_num == 5 : + law=TruncatedNormal(float(description[1]),float(description[2]),float(description[3]),float(description[4])) + elif law_num == 6 : + law=UserDefined(getUserDefined (description[1], description[2])) + elif law_num == 7 : + law=Histogram(0.0, getHistogram (description[1], description[2])) + elif law_num == 10 : + law=KSDist(description[1]) + elif law_num == 20 : + law = Uniform(0.999999,1) + time_serie=1 + time_serie_file=description[1] + """time_serie_SS=description[2] + time_serie_TH=description[3]""" + else : + law = Uniform(0.999999,1) + return law, [time_serie, time_serie_file] #[time_serie, time_serie_file, time_serie_SS, time_serie_TH] + +def contingency_automatic (dfxPath, acccPath, rate) : + psspy.accc_with_dsp_3( 0.5,[0,0,0,1,1,2,0,0,0,0,0],r"""ALL""",dfxPath,acccPath,"","","") + psspy.accc_single_run_report_4([1,int(rate),int(rate),1,1,0,1,0,0,0,0,0],[0,0,0,0,6000],[ 0.5, 5.0, 100.0,0.0,0.0,0.0, 99999.],acccPath) + + rslt_summary=pssarrays.accc_summary(acccPath) + if int(rate) == 1 : + rate = rslt_summary.rating.a + elif int(rate) == 2 : + rate = rslt_summary.rating.b + elif int(rate) == 3 : + rate = rslt_summary.rating.c + else : + print "NO RATE CHOOSEN" + + Labels=rlst.colabel + contin_load=[] + for label in Labels : + t=[] + rslt=pssarrays.accc_solution(acccPath,contingency,label,0.5,5.0) + ampFlow=rslt.ampflow + for i in range (len(rA)) : + t.append(ampFlow[i]/rate[i]) + contin_load.append(t) + return contin_load + +def commaToPoint (string) : + stringReplaced = string.replace(',','.') + return stringReplaced \ No newline at end of file diff --git a/OldCodes/PSEN_Eficas/PSEN_Cata.py b/OldCodes/PSEN_Eficas/PSEN_Cata.py new file mode 100644 index 00000000..19f1ffef --- /dev/null +++ b/OldCodes/PSEN_Eficas/PSEN_Cata.py @@ -0,0 +1,2498 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# -------------------------------------------------- +# debut entete +# -------------------------------------------------- + +#from Accas import ASSD, JDC_CATA, AU_MOINS_UN, PROC, SIMP, FACT, OPER, MACRO, BLOC, A_VALIDATOR +from Accas import * +import opsPSEN + +class loi ( ASSD ) : pass +class variable ( ASSD ) : pass +class sd_charge ( ASSD ) : pass +class sd_generateur ( ASSD ) : pass +class sd_ligne ( ASSD ) : pass +class sd_transfo ( ASSD ) : pass +class sd_moteur (ASSD) : pass +#class sd_busbar ( sd_generateur,sd_charge ) : pass + +import types +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + if type(valeur) == types.StringType: + return None + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + __repr__=info + __str__=info + +class Matrice: + def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None): + self.nbLigs=nbLigs + self.nbCols=nbCols + self.methodeCalculTaille=methodeCalculTaille + self.formatSortie=formatSortie + self.valSup=valSup + self.valMin=valMin + self.structure=structure + + def __convert__(self,valeur): + # Attention ne verifie pas grand chose + if type(valeur) != types.ListType : + return None + return valeur + + def info(self): + return "Matrice %s x %s" % (self.nbLigs, self.nbCols) + + __repr__=info + __str__=info + + +#CONTEXT.debug = 1 +JdC = JDC_CATA ( code = 'PSEN', + execmodul = None, + regles = ( AU_MOINS_UN ( 'PSSE_PARAMETERS' ), + AU_MOINS_UN ( 'DIRECTORY' ), + AU_MOINS_UN ( 'DISTRIBUTION' ), + AU_MOINS_UN ( 'SIMULATION' ), + AU_PLUS_UN ( 'PSSE_PARAMETERS' ), + AU_PLUS_UN ( 'DIRECTORY' ), + AU_PLUS_UN ( 'SIMULATION' ), + AU_PLUS_UN ( 'CORRELATION' ), + AU_PLUS_UN ( 'N_1_GENERATORS' ), + AU_PLUS_UN ( 'N_1_LINES' ), + AU_PLUS_UN ( 'N_1_LOADS' ), + AU_PLUS_UN ( 'N_1_MOTORS' ), + AU_PLUS_UN ( 'N_1_TRANSFORMERS' ), + + ), + ) # Fin JDC_CATA + + +# -------------------------------------------------- +# fin entete +# -------------------------------------------------- + +MONGENER = OPER ( nom = "MONGENER", + sd_prod = sd_generateur, + UIinfo = {"groupes": ("CACHE")}, + op = None, + fr = "Generateur", + ang = "Generator", + + ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",), +) +MONMOTEUR = OPER ( nom = "MONMOTEUR", + sd_prod = sd_moteur, + UIinfo = {"groupes": ("CACHE")}, + op = None, + fr = "Moteur", + ang = "Motor", + + ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",), +) +MACHARGE = OPER ( nom = "MACHARGE", + sd_prod = sd_charge, + UIinfo = {"groupes": ("CACHE")}, + op = None, + fr = "Charge", + ang = "Load", + + ID = SIMP ( statut = 'o', typ = "TXM", fr = "nom charge", ang = "load name",), +) +MALIGNE = OPER ( nom = "MALIGNE", + sd_prod = sd_ligne, + UIinfo = {"groupes": ("CACHE")}, + op = None, + fr = "Ligne", + ang = "Line", + + ID = SIMP ( statut = 'o', typ = "TXM", fr = "nom ligne", ang = "line name",), +) +MONTRANSFO = OPER ( nom = "MONTRANSFO", + sd_prod = sd_transfo, + UIinfo = {"groupes": ("CACHE")}, + op = None, + fr = "Transformateur", + ang = "Transformer", + + ID = SIMP ( statut = 'o', typ = "TXM", fr = "nom transformateur", ang = "transformer name",), +) + + + +PSSE_PARAMETERS = PROC ( nom = "PSSE_PARAMETERS", + op=None, + docu = "", + ALGORITHM = SIMP ( statut = "o", + typ='TXM', + into=["Optimum Power Flow","Economic Dispatch and Power Flow"], + defaut="Optimum Power Flow", + ), + I_MAX = SIMP ( statut = "o", + typ='TXM', + into=['RateA','RateB','RateC'], + defaut='RateA', + ), + LOCK_TAPS = SIMP ( statut = "o", + typ=bool, + defaut=True, + ), + + b_OPF = BLOC (condition = "ALGORITHM == 'Optimum Power Flow'", + FUEL_COST = SIMP ( statut = "o", + typ=bool, + defaut=True, + ), + LOADSHEDDING_COST = SIMP ( statut = "o", + typ=bool, + defaut=False, + ), + MVAR_COST = SIMP ( statut = "o", + typ=bool, + defaut=False, + ), + ITERATION_LIMIT = SIMP ( statut = "o", + typ = "I", + val_min=1, + defaut=20, + ), + QGEN_CONTROL = SIMP ( statut = "o", + typ = bool, + defaut = True, + ), + b_QgenControl = BLOC (condition = "QGEN_CONTROL == True", + SAVE_CASE_BEFORE_QCONTROL = SIMP ( statut = "o", + typ = bool, + defaut = False, + fr = "Sauvegarder des fichiers de cas avant d'avoir deconnecte les groupes ne produisant pas de la puissance active", + ang = "Save network case files before having disconnected groups that dont generate active power.", + ), + ), + ), + + b_ECD = BLOC (condition = "ALGORITHM == 'Economic Dispatch and Power Flow'", + ecd_file=SIMP(statut="o", typ = ('Fichier', 'Economic Dispatch Files (*.ecd);;All Files (*)',),), + ), + +## P_MIN= SIMP ( statut = "o", +## typ=bool, +## defaut=True, +## ), +) + +SIMULATION = PROC ( nom = "SIMULATION", + op = None, + docu = "", + regles =(EXCLUS('NUMBER_PACKAGE','CONVERGENCE'), UN_PARMI('NUMBER_PACKAGE','CONVERGENCE'),), + + SIZE_PACKAGE = SIMP ( statut = "o", + typ = "I", + val_min=10, + defaut=100, + ), + NUMBER_PACKAGE = SIMP ( statut = "f", + typ = "I", + val_min=1, + ), + CONVERGENCE = SIMP ( statut = "f", + typ="I", + into=[1], + ), + +## STUDY = SIMP ( statut = "o", +## typ = "TXM", +## into = ( 'N-1', 'Load', 'Wind-1', 'Wind-2', 'PV' ), +## max=5, +## fr = "Affichage du niveau de wrapper de la bibliotheque Open TURNS", +## ang = "Open TURNS library debug level print", +## ), +) + + +#================================ +# Definition du modele physique +#================================ + + + +CORRELATION = PROC ( nom = 'CORRELATION', + op = None, + docu = "", + fr = "Correlation entre variables", + ang = "Variable correlation", + +#### Copula = SIMP ( statut = "o", +#### typ = 'TXM', +#### into = ( "Independent", "Normal" ), +#### defaut = "Independent", +#### fr = "Type de la copule", +#### ang = "Copula kind", +#### ), +## +## # Matrix = BLOC ( condition = "Copula in ( 'Normal', )", +## + CorrelationMatrix = SIMP ( statut = "o", + typ = Matrice(nbLigs=None, + nbCols=None, + methodeCalculTaille='NbDeDistributions', + structure="symetrique"), + fr = "Matrice de correlation entre les variables d'entree", + ang = "Correlation matrix for input variables", + #val_max=1.0, + #val_min=-1.0 + ), +## #), # Fin BLOC Matrix +## +## +) + +DIRECTORY = MACRO ( nom = 'DIRECTORY', + op=None, + fr = "Chargement des directoires et fichiers", + ang = "Load directories and files necessary to run PSEN", + sd_prod = opsPSEN.INCLUDE, + op_init = opsPSEN.INCLUDE_context, + #sd_prod=None, + fichier_ini = 1, + + PSSE_path=SIMP(statut="o",typ='Repertoire',defaut='C:\Program Files\PTI\PSSE33\PSSBIN'), + sav_file=SIMP(statut="o", typ = ('Fichier', 'Network Case Files (*.sav);;All Files (*)',),), + results_folder=SIMP(statut="o",typ='Repertoire'), + #lines_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),), + #groups_file=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),), + #generationsystem_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),), + +) + + + +#================================ +# Importation des fichiers csv N-1 +#================================ + +N_1_LINES = PROC( nom="N_1_LINES", + op = None, + docu = "", + fr = "N-1 lignes", + ang = "N-1 lines", + Activated = SIMP ( statut='o', typ=bool, defaut=True), +## FileName = SIMP ( statut = "o", +## typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), +## fr = "chemin du fichier csv des probabilites des defauts lignes", +## ang = "csv file path with probabilities of line outages", +## ), + Probability = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Probabilite d'indisponibilite de la ligne", + ang = "Probability that the line is not available", + validators=VerifTypeTuple((sd_ligne,'R')),), + ) + +N_1_TRANSFORMERS = PROC( nom="N_1_TRANSFORMERS", + op = None, + docu = "", + fr = "N-1 transformateurs", + ang = "N-1 transformers", + Activated = SIMP ( statut='o', typ=bool, defaut=True), +## FileName = SIMP ( statut = "o", +## typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), +## fr = "chemin du fichier csv des probabilites des defauts transformateur", +## ang = "csv file path with probabilities of transformer outages", +## ), + Probability = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Probabilite d'indisponibilite de la ligne", + ang = "Probability that the line is not available", + validators=VerifTypeTuple((sd_transfo,'R')),), + ) +N_1_GENERATORS = PROC( nom="N_1_GENERATORS", + op = None, + docu = "", + fr = "N-1 generateurs", + ang = "N-1 generators", + Activated = SIMP ( statut='o', typ=bool, defaut=True), +## FileName = SIMP ( statut = "o", +## typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), +## fr = "chemin du fichier csv des probabilites des defauts generateurs", +## ang = "csv file path with probabilities of generator outages", +## ), + Probability = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Probabilite d'indisponibilite du generateur", + ang = "Probability that the generator is not available", + validators=VerifTypeTuple((sd_generateur,'R')),), + ) +N_1_MOTORS = PROC( nom="N_1_MOTORS", + op = None, + docu = "", + fr = "N-1 moteurs", + ang = "N-1 motors", + Activated = SIMP ( statut='o', typ=bool, defaut=True), +## FileName = SIMP ( statut = "o", +## typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), +## fr = "chemin du fichier csv des probabilites des defauts generateurs", +## ang = "csv file path with probabilities of generator outages", +## ), + Probability = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Probabilite d'indisponibilite du moteur", + ang = "Probability that the motor is not available", + validators=VerifTypeTuple((sd_moteur,'R')),), + ) +N_1_LOADS = PROC( nom="N_1_LOADS", + op = None, + docu = "", + fr = "N-1 charges", + ang = "N-1 loads", + Activated = SIMP ( statut='o', typ=bool, defaut=True), +## FileName = SIMP ( statut = "o", +## typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), +## fr = "chemin du fichier csv des probabilites des defauts charges", +## ang = "csv file path with probabilities of load outages", +## ), + Probability = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Probabilite d'indisponibilite du generateur", + ang = "Probability that the generator is not available", + validators=VerifTypeTuple((sd_charge,'R')),), + ) + + + + +#================================ +# Definition des LOIS +#================================ + +# Nota : les variables de type OPER doivent etre en majuscules ! +# Nota : les variables de type OPER doivent etre de premier niveau (pas imbriquees dans un autre type) +DISTRIBUTION = OPER ( nom = "DISTRIBUTION", + sd_prod = loi, + op = 68, + fr = "Definitions des lois marginales utilisees par les variables d'entree", + +#==== +# Choisir generateur ou charge +#==== + +## TypeMachine = SIMP ( statut='o', typ='TXM', +## into = ('charge','vent1','vent2','pv','N-1',), +## ), + Activated = SIMP ( statut='o', typ=bool, defaut=True), + ComponentType = SIMP (statut='o', typ='TXM', + into = ('Generator','Load','Motor','Line','Transformer'),), + b_gener = BLOC (condition = "ComponentType == 'Generator'", + + Type = SIMP (statut= "o", typ = "TXM", + into = ("Generator Power Level", "Generator Availability"), + fr = "Choisir si c'est le niveau de puissance ou la disponibilit� du generateur qui sera tiree", + ang= "Choose whether the power level or the availability of the generator will be set by the law", + defaut = "Generator Power Level", + ), + + Sampling = SIMP (statut= "o", typ = "TXM", + into = ("Same sample for all generators", "One sample per generator"), + fr = "Choisir si une seule tirage sera fait pour tous les generateurs ou si des tirages differents seront faits pour chaque generateur", + ang= "Choose whether one drawing/sample will be performed for all of the generators or whether a different drawing/sample will be performed for each generator.", + defaut = "Same sample for all generators", + ), + + Generator = SIMP(statut='o',typ=sd_generateur,max="**", homo="SansOrdreNiDoublon",docu="sd_generateur"), + +#==== +# Type de distribution +#==== + + b_gener_level = BLOC (condition= "Type == 'Generator Power Level'", + + Law = SIMP ( statut = "o", typ = "TXM", + into = ( "Exponential", + "Histogram", + "Normal", + #"Rayleigh", + "PDF_from_file", + "TruncatedNormal", + "TimeSeries_from_file", + "Uniform", + "UserDefined", + "Weibull", + ), + fr = "Choix du type de la loi marginale", + ang = "1D marginal distribution", + ), + + +#==== +# Definition des parametres selon le type de la loi +#==== + + + EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ", + + Lambda = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Lambda | Lambda > 0", + ang = "Lambda parameter | Lambda > 0", + ), + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + + ), # Fin BLOC EXPONENTIAL + + + HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ", + + First = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du supoport de la loi", + ang = "Support lower bound", + ), + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Liste de couples : largeur de classe, hauteur de classe", + ang = "Class bandwidth, class height couple list", + validators=VerifTypeTuple(('R','R')), + ), + + ), # Fin BLOC HISTOGRAM + + + NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi", + ang = "Mean value", + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart type de la loi", + ang = "Standard deviation", + ), + + ), # Fin BLOC NORMAL + + + RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ", + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0", + ), + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + ), # Fin BLOC RAYLEIGH + + PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Nom du fichier .csv", + ang = ".csv file name", + ), + ), + + + + TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ", + + MuN = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi Normale non tronqu�e", + ang = "Mean value of the associated non truncated normal distribution", + ), + + SigmaN = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart-type de la loi Normale non tronqu�e", + ang = "Standard deviation of the associated non truncated normal distribution", + ), + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure de la loi | A < B", + ang = "Lower bound | A < B", + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure de la loi | A < B", + ang = "Upper bound | A < B", + ), + + ), # Fin BLOC TRUNCATEDNORMAL + + + TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Fichier CSV d'une serie temporelle", + ang = "CSV file of a time series", + ), + ), + + + UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ", + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi | A < B", + ang = "Support lower bound | A < B", + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure du support de la loi | A < B", + ang = "Support upper bound | A < B", + ), + + ), # Fin BLOC UNIFORM + + + USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Liste de couples : (valeur, prob.)", + ang = "List of pairs : (value, prob.)", + validators=VerifTypeTuple(('R','R')), + ), + + ), # Fin BLOC USERDEFINED + + + WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "AlphaBeta", "MuSigma" ), + defaut = "AlphaBeta", + fr = "Parametrage de la loi weibull", + ang = "Weibull distribution parameter set", + ), + + AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", + + Alpha = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Alpha de la loi | Alpha > 0", + ang = "Alpha parameter | Alpha > 0", + ), + + Beta = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Beta de la loi | Beta > 0", + ang = "Beta parameter | Beta > 0", + ), + + ), # Fin BLOC AlphaBeta_Parameters + + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi", + ang = "Mean value", + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart type de la loi", + ang = "Standard deviation", + ), + + ), # Fin BLOC MuSigma_Parameters + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + + ), # Fin BLOC WEIBULL + + + Transfer_Function = FACT(statut='f', + + TF_Input = SIMP ( statut='o', + typ = 'TXM', + fr = 'Entrer une fonction de transfert � partir d''un fichier .pow (vitesse de vent - puissance eolienne)\n \ + ou entrer une liste de tuples (valeur tiree - puissance normalisee)', + ang = 'Enter wind speed - turbine production transfer function as a .pow file, \n \ + or enter a generic list of (law output value, normalized power output) tuples', + into = ('.pow file', 'tuples list'), + ), + b_file = BLOC(condition = "TF_Input == '.pow file'", + File_Name = SIMP ( statut = "o", + typ = ('Fichier', 'Pow files (*.pow);;All Files (*)',), + fr = "Nom du fichier de transfer .pow", + ang = ".pow file name", + ), + Wind_Speed_Measurement_Height = SIMP ( statut = 'o', + typ = "R", + max = 1, + fr = 'Hauteur (en metres) a laquelle les mesures de vitesse du vent ont ete prises', + ang = 'Height of wind speed measurements (m)', + sug = 10, + val_min = 0, + ), + Hub_Height = SIMP (statut = 'o', + typ = "R", + fr = 'hauteur de moyeu de l''eolienne', + ang = 'wind turbine hub height', + sug = 80, + val_min = 0,), + AlphaWS = SIMP (statut = 'o', + typ = "R", + fr = 'l''alpha pour extrapoler les mesures de vitesse du vent a la hauteur du moyeu ', + ang = 'alpha used to extrapolate wind speed measurements to hub height', + defaut = 1./7, + val_min = 0, + val_max = 1, + ), + Percent_Losses = SIMP (statut = 'o', + typ = "R", + fr = 'pourcentage de pertes entre la sortie theorique d''une turbine et la sortie de la centrale', + ang = 'percent losses between theoretical power output of a single turbine and the output of the farm', + defaut = 5, + val_min = 0, + val_max = 100, + ), + ), #fin du bloc FileName + + b_tuples = BLOC(condition = "TF_Input == 'tuples list'", + + TF_Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + min = 2, + fr = "Liste de couples : valeur tiree, puissance normalisee sortie", + ang = "List of couples : value set by law, normalized power output", + validators=VerifTypeTuple(('R','R')), + ), + ), #fin du block Tuples List + + ), #fin du FACT Transfer Function + + ), #fin du bloc generator level + + + b_gener_avail = BLOC (condition= "Type == 'Generator Availability'", + + Law = SIMP ( statut = "o", typ = "TXM", + into = ( #"Exponential", + #"Histogram", + #"Normal", + #"Rayleigh", + #"PDF_from_file", + #"TruncatedNormal", + "TimeSeries_from_file", + #"Uniform", + "UserDefined", + #"Weibull", + ), + fr = "Choix du type de la loi marginale", + ang = "1D marginal distribution", + defaut="UserDefined", + ), + + +#==== +# Definition des parametres selon le type de la loi +#==== + + + TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Fichier CSV d'une serie temporelle", + ang = "CSV file of a time series", + ), + ), + + + USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Liste de couples : (valeur, prob.)", + ang = "List of pairs : (value, prob.)", + validators=VerifTypeTuple(('R','R')), + defaut=((0,0.0),(1,1.0)), + ), + + ), # Fin BLOC USERDEFINED + + + ), #fin du bloc generator avail + + + ), #fin du bloc generateur + +#Bloc Charge + b_charge = BLOC (condition = "ComponentType == 'Load'", + + +#==== +# Type de distribution +#==== + + Type = SIMP (statut= "o", typ = "TXM", + into = ("Load Level", "Load Availability"), + fr = "Choisir si c'est le niveau de charge ou la disponibilit� de la charge qui sera tiree", + ang= "Choose whether the power level or the availability of the load will be set by the law", + defaut = "Load Level", + ), + + Sampling = SIMP (statut= "o", typ = "TXM", + into = ("Same sample for all loads", "One sample per load"), + fr = "Choisir si une seule tirage sera fait pour tous les charges ou si des tirages differents seront faits pour chaque charge", + ang= "Choose whether one drawing/sample will be performed for all of the loads or whether a different drawing/sample will be performed for each load.", + defaut = "Same sample for all loads", + ), + + Load = SIMP(statut='o',typ=sd_charge,max="**", homo="SansOrdreNiDoublon",), + + + b_charge_level = BLOC (condition = "Type == 'Load Level'", + + Law = SIMP ( statut = "o", typ = "TXM", + into = ( "Exponential", + "Histogram", + "Normal", + #"Rayleigh", + "PDF_from_file", + "TruncatedNormal", + "TimeSeries_from_file", + "Uniform", + "UserDefined", + "Weibull", + ), + fr = "Choix du type de la loi marginale", + ang = "1D marginal distribution", + ), + + +#==== +# Definition des parametres selon le type de la loi +#==== + + + EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ", + + Lambda = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Lambda | Lambda > 0", + ang = "Lambda parameter | Lambda > 0", + ), + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + + ), # Fin BLOC EXPONENTIAL + + + HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ", + + First = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du supoport de la loi", + ang = "Support lower bound", + ), + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Liste de couples : largeur de classe, hauteur de classe", + ang = "Class bandwidth, class height couple list", + validators=VerifTypeTuple(('R','R')), + ), + + ), # Fin BLOC HISTOGRAM + + + NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi", + ang = "Mean value", + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart type de la loi", + ang = "Standard deviation", + ), + + ), # Fin BLOC NORMAL + + + RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ", + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0", + ), + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + ), # Fin BLOC RAYLEIGH + + PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Nom du fichier .csv", + ang = ".csv file name", + ), + ), + + + + TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ", + + MuN = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi Normale non tronqu�e", + ang = "Mean value of the associated non truncated normal distribution", + ), + + SigmaN = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart-type de la loi Normale non tronqu�e", + ang = "Standard deviation of the associated non truncated normal distribution", + ), + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure de la loi | A < B", + ang = "Lower bound | A < B", + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure de la loi | A < B", + ang = "Upper bound | A < B", + ), + + ), # Fin BLOC TRUNCATEDNORMAL + + + TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Fichier CSV d'une serie temporelle", + ang = "CSV file of a time series", + ), + ), + + + UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ", + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi | A < B", + ang = "Support lower bound | A < B", + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure du support de la loi | A < B", + ang = "Support upper bound | A < B", + ), + + ), # Fin BLOC UNIFORM + + + USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Liste de couples : (valeur, probabilite)", + ang = "List of pairs : (value, probability)", + validators=VerifTypeTuple(('R','R')), + ), + + ), # Fin BLOC USERDEFINED + + + WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "AlphaBeta", "MuSigma" ), + defaut = "AlphaBeta", + fr = "Parametrage de la loi weibull", + ang = "Weibull distribution parameter set", + ), + + AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", + + Alpha = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Alpha de la loi | Alpha > 0", + ang = "Alpha parameter | Alpha > 0", + ), + + Beta = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Beta de la loi | Beta > 0", + ang = "Beta parameter | Beta > 0", + ), + + ), # Fin BLOC AlphaBeta_Parameters + + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi", + ang = "Mean value", + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart type de la loi", + ang = "Standard deviation", + ), + + ), # Fin BLOC MuSigma_Parameters + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + + ), # Fin BLOC WEIBULL + + ), #fin du block Load Level + + + b_charge_avail = BLOC (condition = "Type == 'Load Availability'", + + Law = SIMP ( statut = "o", typ = "TXM", + into = ( #"Exponential", + #"Histogram", + #"Normal", + #"Rayleigh", + #"PDF_from_file", + #"TruncatedNormal", + "TimeSeries_from_file", + #"Uniform", + "UserDefined", + #"Weibull", + ), + fr = "Choix du type de la loi marginale", + ang = "1D marginal distribution", + defaut = "UserDefined", + ), + + +#==== +# Definition des parametres selon le type de la loi +#==== + + TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Fichier CSV d'une serie temporelle", + ang = "CSV file of a time series", + ), + ), + + + + USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Liste de couples : (valeur, probabilite)", + ang = "List of pairs : (value, probability)", + validators=VerifTypeTuple(('R','R')), + defaut=((0,0.0),(1,1.0)), + ), + + ), # Fin BLOC USERDEFINED + + + ), #fin du block Load Avail + + + ), #fin du bloc charge + + + +#Bloc Moteur + b_moteur = BLOC (condition = "ComponentType == 'Motor'", + + +#==== +# Type de distribution +#==== + + Type = SIMP (statut= "o", typ = "TXM", + into = ("Motor Level", "Motor Availability"), + fr = "Choisir si c'est le niveau de charge du moteur ou la disponibilit� du moteur qui sera tiree", + ang= "Choose whether the power level or the availability of the motor will be set by the law", + defaut = "Motor Level", + ), + + Sampling = SIMP (statut= "o", typ = "TXM", + into = ("Same sample for all motors", "One sample per motor"), + fr = "Choisir si une seule tirage sera fait pour tous les moteurs ou si des tirages differents seront faits pour chaque moteur", + ang= "Choose whether one drawing/sample will be performed for all of the motors or whether a different drawing/sample will be performed for each motor.", + defaut = "Same sample for all motors", + ), + + Motor = SIMP(statut='o',typ=sd_moteur,max="**", homo="SansOrdreNiDoublon",), + + + b_moteur_level = BLOC (condition = "Type == 'Motor Level'", + + Law = SIMP ( statut = "o", typ = "TXM", + into = ( "Exponential", + "Histogram", + "Normal", + #"Rayleigh", + "PDF_from_file", + "TruncatedNormal", + "TimeSeries_from_file", + "Uniform", + "UserDefined", + "Weibull", + ), + fr = "Choix du type de la loi marginale", + ang = "1D marginal distribution", + ), + + +#==== +# Definition des parametres selon le type de la loi +#==== + + + EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ", + + Lambda = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Lambda | Lambda > 0", + ang = "Lambda parameter | Lambda > 0", + ), + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + + ), # Fin BLOC EXPONENTIAL + + + HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ", + + First = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du supoport de la loi", + ang = "Support lower bound", + ), + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Liste de couples : largeur de classe, hauteur de classe", + ang = "Class bandwidth, class height couple list", + validators=VerifTypeTuple(('R','R')), + ), + + ), # Fin BLOC HISTOGRAM + + + NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi", + ang = "Mean value", + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart type de la loi", + ang = "Standard deviation", + ), + + ), # Fin BLOC NORMAL + + + RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ", + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0", + ), + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + ), # Fin BLOC RAYLEIGH + + PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Nom du fichier .csv", + ang = ".csv file name", + ), + ), + + + + TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ", + + MuN = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi Normale non tronqu�e", + ang = "Mean value of the associated non truncated normal distribution", + ), + + SigmaN = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart-type de la loi Normale non tronqu�e", + ang = "Standard deviation of the associated non truncated normal distribution", + ), + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure de la loi | A < B", + ang = "Lower bound | A < B", + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure de la loi | A < B", + ang = "Upper bound | A < B", + ), + + ), # Fin BLOC TRUNCATEDNORMAL + + + TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Fichier CSV d'une serie temporelle", + ang = "CSV file of a time series", + ), + ), + + + UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ", + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi | A < B", + ang = "Support lower bound | A < B", + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure du support de la loi | A < B", + ang = "Support upper bound | A < B", + ), + + ), # Fin BLOC UNIFORM + + + USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Liste de couples : (valeur, probabilite)", + ang = "List of pairs : (value, probability)", + validators=VerifTypeTuple(('R','R')), + ), + + ), # Fin BLOC USERDEFINED + + + WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "AlphaBeta", "MuSigma" ), + defaut = "AlphaBeta", + fr = "Parametrage de la loi weibull", + ang = "Weibull distribution parameter set", + ), + + AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", + + Alpha = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Alpha de la loi | Alpha > 0", + ang = "Alpha parameter | Alpha > 0", + ), + + Beta = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Beta de la loi | Beta > 0", + ang = "Beta parameter | Beta > 0", + ), + + ), # Fin BLOC AlphaBeta_Parameters + + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi", + ang = "Mean value", + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart type de la loi", + ang = "Standard deviation", + ), + + ), # Fin BLOC MuSigma_Parameters + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + + ), # Fin BLOC WEIBULL + + ), #fin du block Load Level + + + b_moteur_avail = BLOC (condition = "Type == 'Motor Availability'", + + Law = SIMP ( statut = "o", typ = "TXM", + into = ( #"Exponential", + #"Histogram", + #"Normal", + #"Rayleigh", + #"PDF_from_file", + #"TruncatedNormal", + "TimeSeries_from_file", + #"Uniform", + "UserDefined", + #"Weibull", + ), + fr = "Choix du type de la loi marginale", + ang = "1D marginal distribution", + defaut = "UserDefined", + ), + + +#==== +# Definition des parametres selon le type de la loi +#==== + + TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Fichier CSV d'une serie temporelle", + ang = "CSV file of a time series", + ), + ), + + + + USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Liste de couples : (valeur, probabilite)", + ang = "List of pairs : (value, probability)", + validators=VerifTypeTuple(('R','R')), + defaut=((0,0.0),(1,1.0)), + ), + + ), # Fin BLOC USERDEFINED + + + ), #fin du block Load Avail + + + ), #fin du bloc moteur + + + b_ligne = BLOC (condition = "ComponentType == 'Line'", + + +#==== +# Type de distribution +#==== + + Type = SIMP (statut= "o", typ = "TXM", + into = ("Line Availability",), + fr = "La disponibilite de la ligne sera tiree", + ang= "Line availability will be set by the law", + defaut = "Line Availability", + ), + + Sampling = SIMP (statut= "o", typ = "TXM", + into = ("Same sample for all lines", "One sample per line"), + fr = "Choisir si une seule tirage sera fait pour tous les lignes ou si des tirages differents seront faits pour chaque ligne", + ang= "Choose whether one drawing/sample will be performed for all of the lines or whether a different drawing/sample will be performed for each line.", + defaut = "Same sample for all lines", + ), + + Line = SIMP(statut='o',typ=sd_ligne,max="**", homo="SansOrdreNiDoublon"), + + Law = SIMP ( statut = "o", typ = "TXM", + into = ( #"Exponential", + #"Histogram", + #"Normal", + #"Rayleigh", + #"PDF_from_file", + #"TruncatedNormal", + "TimeSeries_from_file", + #"Uniform", + "UserDefined", + #"Weibull", + ), + defaut = "UserDefined", + fr = "Choix du type de la loi marginale", + ang = "1D marginal distribution", + ), + + +#==== +# Definition des parametres selon le type de la loi +#==== + + + EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ", + + Lambda = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Lambda | Lambda > 0", + ang = "Lambda parameter | Lambda > 0", + ), + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + + ), # Fin BLOC EXPONENTIAL + + + HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ", + + First = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du supoport de la loi", + ang = "Support lower bound", + ), + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Liste de couples : largeur de classe, hauteur de classe", + ang = "Class bandwidth, class height couple list", + validators=VerifTypeTuple(('R','R')), + ), + + ), # Fin BLOC HISTOGRAM + + + NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi", + ang = "Mean value", + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart type de la loi", + ang = "Standard deviation", + ), + + ), # Fin BLOC NORMAL + + + RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ", + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0", + ), + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + ), # Fin BLOC RAYLEIGH + + PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Nom du fichier .csv", + ang = ".csv file name", + ), + ), + + + + TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ", + + MuN = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi Normale non tronqu�e", + ang = "Mean value of the associated non truncated normal distribution", + ), + + SigmaN = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart-type de la loi Normale non tronqu�e", + ang = "Standard deviation of the associated non truncated normal distribution", + ), + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure de la loi | A < B", + ang = "Lower bound | A < B", + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure de la loi | A < B", + ang = "Upper bound | A < B", + ), + + ), # Fin BLOC TRUNCATEDNORMAL + + + TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Fichier CSV d'une serie temporelle", + ang = "CSV file of a time series", + ), + ), + + + UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ", + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi | A < B", + ang = "Support lower bound | A < B", + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure du support de la loi | A < B", + ang = "Support upper bound | A < B", + ), + + ), # Fin BLOC UNIFORM + + + USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Liste de couples : (valeur, probabilite)", + ang = "List of pairs : (value, probability)", + validators=VerifTypeTuple(('R','R')), + defaut=((0,0.0),(1,1.0)), + ), + + ), # Fin BLOC USERDEFINED + + + WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "AlphaBeta", "MuSigma" ), + defaut = "AlphaBeta", + fr = "Parametrage de la loi weibull", + ang = "Weibull distribution parameter set", + ), + + AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", + + Alpha = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Alpha de la loi | Alpha > 0", + ang = "Alpha parameter | Alpha > 0", + ), + + Beta = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Beta de la loi | Beta > 0", + ang = "Beta parameter | Beta > 0", + ), + + ), # Fin BLOC AlphaBeta_Parameters + + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi", + ang = "Mean value", + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart type de la loi", + ang = "Standard deviation", + ), + + ), # Fin BLOC MuSigma_Parameters + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + + ), # Fin BLOC WEIBULL + + ), #fin du bloc ligne + + b_transfo = BLOC (condition = "ComponentType == 'Transformer'", + + +#==== +# Type de distribution +#==== + + Type = SIMP (statut= "o", typ = "TXM", + into = ("Transformer Availability",), + fr = "La disponibilite du transformateur sera tiree", + ang= "Transformer availability will be set by the law", + defaut = "Transformer Availability" + ), + + Sampling = SIMP (statut= "o", typ = "TXM", + into = ("Same sample for all transformers", "One sample per transformer"), + fr = "Choisir si une seule tirage sera fait pour tous les transforamteurs ou si des tirages differents seront faits pour chaque transformateur", + ang= "Choose whether one drawing/sample will be performed for all of the tranformers or whether a different drawing/sample will be performed for each transformer.", + defaut = "Same sample for all transformers", + ), + + Transformer = SIMP(statut='o',typ=sd_transfo,max="**", homo="SansOrdreNiDoublon"), + + Law = SIMP ( statut = "o", typ = "TXM", + into = ( #"Beta", + #"Exponential", + #"Gamma", + #"Geometric", + #"Gumbel", + #"Histogram", + #"Laplace", + #"Logistic", + #"LogNormal", + #"MultiNomial", + #"NonCentralStudent", + #"Normal", + #"Poisson", + #"Rayleigh", + #"Student", + #"PDF_from_file", + #"Triangular", + #"TruncatedNormal", + "TimeSeries_from_file", + #"Uniform", + "UserDefined", + #"Weibull", + ), + defaut="UserDefined", + fr = "Choix du type de la loi marginale", + ang = "1D marginal distribution", + ), + + +#==== +# Definition des parametres selon le type de la loi +#==== + +## NONPARAM = BLOC ( condition = " Law in ( 'NonParametrique', ) ", +## +## FileName = SIMP ( statut = "o", +## typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), +## fr = "Nom du modele physique", +## ang = "Physical model identifier", +## ), +## ), + +# BETA = BLOC ( condition = " Law in ( 'Beta', ) ", +# +# Settings = SIMP ( statut = "o", +# typ = "TXM", +# max = 1, +# into = ( "RT", "MuSigma" ), +# defaut = "RT", +# fr = "Parametrage de la loi beta", +# ang = "Beta distribution parameter set", +# ), +# +# RT_Parameters = BLOC ( condition = " Settings in ( 'RT', ) ", +# +# R = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre R de la loi | R > 0", +# ang = "R parameter | R > 0", +# ), +# +# # T > R +# T = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre T de la loi | T > R", +# ang = "T parameter | T > R", +# ), +# +# ), # Fin BLOC RT_Parameters +# +# +# MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", +# +# Mu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Moyenne de la loi", +# ang = "Mean value", +# ), +# +# Sigma = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Ecart type de la loi", +# ang = "Standard deviation", +# ), +# +# ), # Fin BLOC MuSigma_Parameters +# +# +# A = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne inferieure du support de la loi", +# ang = "Support lower bound", +# ), +# +# # B > A +# B = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne superieure du support de la loi", +# ang = "Support upper bound", +# ), +# +# ), # Fin BLOC BETA + + + + EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ", + + Lambda = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Lambda | Lambda > 0", + ang = "Lambda parameter | Lambda > 0", + ), + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + + ), # Fin BLOC EXPONENTIAL + + + +# GAMMA = BLOC ( condition = " Law in ( 'Gamma', ) ", +# +# Settings = SIMP ( statut = "o", +# typ = "TXM", +# max = 1, +# into = ( "KLambda", "MuSigma" ), +# defaut = "KLambda", +# fr = "Parametrage de la loi gamma", +# ang = "Gamma distribution parameter set", +# ), +# +# KLambda_Parameters = BLOC ( condition = " Settings in ( 'KLambda', ) ", +# +# K = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre K de la loi | K > 0", +# ang = "K parameter | K > 0", +# ), +# +# Lambda = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre Lambda de la loi | Lambda > 0", +# ang = "Lambda parameter | Lambda > 0", +# ), +# +# ), # Fin BLOC KLambda_Parameters +# +# +# MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", +# +# Mu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Moyenne de la loi", +# ang = "Mean value", +# ), +# +# Sigma = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Ecart type de la loi", +# ang = "Standard deviation", +# ), +# +# ), # Fin BLOC MuSigma_Parameters +# +# Gamma = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne inferieure du supoport de la loi", +# ang = "Support lower bound", +# ), +# +# +# ), # Fin BLOC GAMMA + + +# +# GEOMETRIC = BLOC ( condition = " Law in ( 'Geometric', ) ", +# +# P = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# val_max = 1., +# fr = "Parametre P | 0 < P < 1", +# ang = "P parameter | 0 < P < 1", +# ), +# +# ), # Fin BLOC GEOMETRIC +# +# +# +# GUMBEL = BLOC ( condition = " Law in ( 'Gumbel', ) ", +# +# Settings = SIMP ( statut = "o", +# typ = "TXM", +# max = 1, +# into = ( "AlphaBeta", "MuSigma" ), +# defaut = "AlphaBeta", +# fr = "Parametrage de la loi gumbel", +# ang = "Gumbel distribution parameter set", +# ), +# +# AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", +# +# Alpha = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre Alpha de la loi | Alpha > 0", +# ang = "Alpha parameter | Alpha > 0", +# ), +# +# Beta = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Parametre Beta de la loi", +# ang = "Beta parameter", +# ), +# +# ), # Fin BLOC AlphaBeta_Parameters +# +# +# MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", +# +# Mu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Moyenne de la loi", +# ang = "Mean value", +# ), +# +# Sigma = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Ecart type de la loi", +# ang = "Standard deviation", +# ), +# +# ), # Fin BLOC MuSigma_Parameters +# +# ), # Fin BLOC GUMBEL + + + + HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ", + + First = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du supoport de la loi", + ang = "Support lower bound", + ), + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Liste de couples : largeur de classe, hauteur de classe", + ang = "Class bandwidth, class height couple list", + validators=VerifTypeTuple(('R','R')), + ), + + ), # Fin BLOC HISTOGRAM + + + +# LAPLACE = BLOC ( condition = " Law in ( 'Laplace', ) ", +# +# Lambda = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre Lambda | Lambda > 0", +# ang = "Lambda parameter | Lambda > 0", +# ), +# +# Mu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Moyenne de la loi", +# ang = "Mean value", +# ), +# +# ), # Fin BLOC LAPLACE +# +# LOGNORMAL = BLOC ( condition = " Law in ( 'LogNormal', ) ", +# +# Settings = SIMP ( statut = "o", +# typ = "TXM", +# max = 1, +# into = ( "MuSigmaLog", "MuSigma", "MuSigmaOverMu" ), +# defaut = "MuSigmaLog", +# fr = "Parametrage de la loi lognormale", +# ang = "Lognormal distribution parameter set", +# ), +# +# MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", +# +# Mu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Moyenne de la loi", +# ang = "Mean value", +# ), +# +# Sigma = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Ecart type de la loi", +# ang = "Standard deviation", +# ), +# +# ), # Fin BLOC MuSigma_Parameters +# +# MuSigmaOverMu_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaOverMu', ) ", +# +# Mu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Moyenne de la loi", +# ang = "Mean value", +# ), +# +# SigmaOverMu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Rapport ecart type / moyenne de la loi", +# ang = "Standard deviation / mean value ratio", +# ), +# +# ), # Fin BLOC MuSigmaOverMu_Parameters +# +# MuSigmaLog_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaLog', ) ", +# +# MuLog = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Moyenne du log", +# ang = "Log mean value", +# ), +# +# SigmaLog = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Ecart type du log", +# ang = "Log standard deviation", +# ), +# +# ), # Fin BLOC MuSigmaLog_Parameters +# +# Gamma = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne inferieure du support de la loi", +# ang = "Support lower bound", +# ), +# +# ), # Fin BLOC LOGNORMAL +# +# +# +# LOGISTIC = BLOC ( condition = " Law in ( 'Logistic', ) ", +# +# Alpha = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne inferieure du supoport de la loi", +# ang = "Support lower bound", +# ), +# +# Beta = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre Beta de la loi | Beta > 0", +# ang = "Beta parameter | Beta > 0", +# ), +# +# ), # Fin BLOC LOGISTIC +# +# +# +# MULTINOMIAL = BLOC ( condition = " Law in ( 'MultiNomial', ) ", +# +# N = SIMP ( statut = "o", +# typ = "I", +# max = 1, +# fr = "Parametre N de la loi | N > 0", +# ang = "N parameter | N > 0", +# ), +# +# # Il faut definir une collection de couples ( x,p ) +# Values = SIMP ( statut = 'o', +# typ = "R", +# max = '**', +# fr = "Liste de probabilit�s", +# ang = "Probability list", +# validators=VerifTypeTuple(('R','R')), +# ), +# +# ), # Fin BLOC MULTINOMIAL +# +# +# NONCENTRALSTUDENT = BLOC ( condition = " Law in ( 'NonCentralStudent', ) ", +# +# Nu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Parametre Nu de la loi | Nu > 0", +# ang = "Nu parameter | Nu > 0", +# ), +# +# Delta = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Parametre Delta de la loi | Delta > 0", +# ang = "Delta parameter | Delta > 0", +# ), +# +# Gamma = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Parametre Gamma de centrage de la loi", +# ang = "Gamma parameter", +# ), +# +# ), # Fin BLOC NONCENTRALSTUDENT + + + NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi", + ang = "Mean value", + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart type de la loi", + ang = "Standard deviation", + ), + + ), # Fin BLOC NORMAL + + +# +# POISSON = BLOC ( condition = " Law in ( 'Poisson', ) ", +# +# Lambda = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre Lambda de la loi | Lambda > 0", +# ang = "Lambda parameter | Lambda > 0", +# ), +# +# ), # Fin BLOC POISSON +# +# +# +# RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ", +# +# Sigma = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Parametre Sigma de la loi | Sigma > 0", +# ang = "Sigma parameter | Sigma > 0", +# ), +# +# Gamma = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne inferieure du support de la loi", +# ang = "Support lower bound", +# ), +# ), # Fin BLOC RAYLEIGH + + PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Nom du fichier .csv", + ang = ".csv file name", + ), + ), + +# STUDENT = BLOC ( condition = " Law in ( 'Student', ) ", +# +# Mu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Parametre Mu de la loi", +# ang = "Mu parameter", +# ), +# +# Nu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 2., +# fr = "Parametre Nu de la loi | Nu > 2", +# ang = "Nu parameter | Nu > 2", +# ), +# +# Sigma = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Parametre Sigma de la loi", +# ang = "Sigma parameter", +# ), +# +# ), # Fin BLOC STUDENT +# +# +# +# TRIANGULAR = BLOC ( condition = " Law in ( 'Triangular', ) ", +# +# A = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne inferieure du support de la loi | A < M < B", +# ang = "Support lower bound | A < M < B", +# ), +# +# M = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Mode de la loi | A < M < B", +# ang = "Mode | A < M < B", +# ), +# +# B = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne superieure du support de la loi | A < M < B", +# ang = "Support upper bound | A < M < B", +# ), +# +# ), # Fin BLOC TRIANGULAR +# +# + + TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ", + + MuN = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi Normale non tronqu�e", + ang = "Mean value of the associated non truncated normal distribution", + ), + + SigmaN = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart-type de la loi Normale non tronqu�e", + ang = "Standard deviation of the associated non truncated normal distribution", + ), + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure de la loi | A < B", + ang = "Lower bound | A < B", + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure de la loi | A < B", + ang = "Upper bound | A < B", + ), + + ), # Fin BLOC TRUNCATEDNORMAL + + + TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Fichier CSV d'une serie temporelle", + ang = "CSV file of a time series", + ), + ), + + + UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ", + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi | A < B", + ang = "Support lower bound | A < B", + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure du support de la loi | A < B", + ang = "Support upper bound | A < B", + ), + + ), # Fin BLOC UNIFORM + + + USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = Tuple(2), + max = '**', + fr = "Liste de couples : (valeur, probabilite)", + ang = "List of pairs : (value, probability)", + validators=VerifTypeTuple(('R','R')), + defaut=((0,0.0),(1,1.0)), + ), + + ), # Fin BLOC USERDEFINED + + + WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "AlphaBeta", "MuSigma" ), + defaut = "AlphaBeta", + fr = "Parametrage de la loi weibull", + ang = "Weibull distribution parameter set", + ), + + AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", + + Alpha = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Alpha de la loi | Alpha > 0", + ang = "Alpha parameter | Alpha > 0", + ), + + Beta = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Beta de la loi | Beta > 0", + ang = "Beta parameter | Beta > 0", + ), + + ), # Fin BLOC AlphaBeta_Parameters + + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Moyenne de la loi", + ang = "Mean value", + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Ecart type de la loi", + ang = "Standard deviation", + ), + + ), # Fin BLOC MuSigma_Parameters + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure du support de la loi", + ang = "Support lower bound", + ), + + ), # Fin BLOC WEIBULL + + + + ), #fin du bloc transformer + + +) + +Classement_Commandes_Ds_Arbre=('DIRECTORY', 'DISTRIBUTION', 'CORRELATION',) + +Ordre_Des_Commandes = ( 'DIRECTORY', 'PSSE_PARAMETERS', 'SIMULATION', 'DISTRIBUTION', 'CORRELATION', + 'N_1_GENERATORS', 'N_1_LINES', 'N_1_TRANSFORMERS', 'N_1_LOADS',) diff --git a/OldCodes/PSEN_Eficas/configuration_PSEN.py b/OldCodes/PSEN_Eficas/configuration_PSEN.py new file mode 100755 index 00000000..4ab64b85 --- /dev/null +++ b/OldCodes/PSEN_Eficas/configuration_PSEN.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== +""" + Ce module sert pour charger les paramètres de configuration d'EFICAS +""" +# Modules Python +from InterfaceQT4 import configuration +import os + + +class CONFIG(configuration.CONFIG_BASE): + + #----------------------------------- + def __init__(self,appli,repIni): + #----------------------------------- + + self.labels_user=['catalogues','lang'] + self.labels_eficas=['lang','rep_cata','catalogues'] + + configuration.CONFIG_BASE.__init__(self,appli,'.Eficas_monCode') + + +def make_config(appli,rep): + return CONFIG(appli,rep) + diff --git a/OldCodes/PSEN_Eficas/mesScripts.py b/OldCodes/PSEN_Eficas/mesScripts.py new file mode 100755 index 00000000..15f80ed6 --- /dev/null +++ b/OldCodes/PSEN_Eficas/mesScripts.py @@ -0,0 +1,35 @@ +def view_zone(listeparam) : + item=listeparam[0] + import visu_geom + visu_zone = visu_geom.VisuGeom(from_eficas=True, + eficas_item=item, + ligne_arbre=False) + visu_zone.visualize() + +def view_ligne_arbre(listeparam) : + item=listeparam[0] + import visu_geom + visu_arbre = visu_geom.VisuGeom(from_eficas=True, + eficas_item=item, + ligne_arbre=True) + visu_arbre.visualize() + +def import_zone(listeparam,appli) : + item=listeparam[0] + # simulation de la recuperation zone + #import eficasSalome + #eficasSalome.runEficas(code='MT',fichier='/home/I29518/test_zone.comm') + appli.viewmanager.handleOpen(fichier='/home/A96028/Install_EficasV1/EficasV1/MT/MT_include.comm') + +def import_zone2(listeparam,appli) : + editor=listeparam[0] + itemWidget=listeparam[1] + texte="sansnom=ZONE(NOEUDS=(_F(NOM='N1', X=0.0,), _F(NOM='N2', X=0.19,),), ELEMENTS=(_F(NOM='E1', DEBUT='N1', FIN='N2', RAFFINAGE='NON', MATERIAU=MAT_R01, SECTION_MASSE=_F(TYPE_SECTION='CONSTANTE', DIAM_EXTERN_DEBUT=0.1, DIAM_INTERN_DEBUT=0,), SECTION_RIGIDITE=_F(TYPE_SECTION='CONSTANTE', DIAM_EXTERN_DEBUT=0.1, DIAM_INTERN_DEBUT=0.0,),), _F(NOM='E2', DEBUT='N2', FIN='N3', RAFFINAGE='NON', MATERIAU=MAT_R01, SECTION_MASSE=_F(TYPE_SECTION='VARIABLE', DIAM_EXTERN_DEBUT=0.1, DIAM_INTERN_DEBUT=0, DIAM_EXTERN_SORTIE=0.2, DIAM_INTERN_SORTIE=0.0,), SECTION_RIGIDITE=_F(TYPE_SECTION='VARIABLE', DIAM_EXTERN_DEBUT=0.1, DIAM_INTERN_DEBUT=0.0, DIAM_EXTERN_SORTIE=0.2, DIAM_INTERN_SORTIE=0.0,),),),);" + editor.updateJdc(itemWidget,texte) + +def Source(): + print "jjjjjjjjjjjjjjjjjjj" + +dict_commandes={ + 'GENDOF':(Source,"Source",(),False,True,"affiche un message"), + } diff --git a/OldCodes/PSEN_Eficas/mesScripts_PSEN.py b/OldCodes/PSEN_Eficas/mesScripts_PSEN.py new file mode 100644 index 00000000..3e795416 --- /dev/null +++ b/OldCodes/PSEN_Eficas/mesScripts_PSEN.py @@ -0,0 +1,113 @@ +def exportToCsv(listeparam) : + texte="" + editor= listeparam[0] + item = listeparam[1] + fn=None + try : + from PyQt4.QtGui import QFileDialog, QMessageBox + fichier = QFileDialog.getOpenFileName() + if fichier == None : return + except : + try : + from PyQt5.QtWidgets import QFileDialog, QMessageBox + fichier = QFileDialog.getOpenFileName() + if fichier[0] == None : return + fichier=fichier[0] + except: + pass + + nouvelleVal=[] + prob=item.object.get_child('Probability') + valeur=prob.get_valeur() + texte="" + for v in valeur : + texte+=v[0].nom+";"+str(v[1]).replace('.',',')+"\n" + + try : + fn=open(fichier,'wb') + fn.write(texte) + fn.close() + except Exception, why: + QMessageBox.critical(editor, ("Save file failed"), + ('unable to save ')+str(fn) + str(why)) + + +def importFromCsv(listeparam) : + texte="" + editor= listeparam[0] + item = listeparam[1] + node = listeparam[2] + fn=None + try : + from PyQt4.QtGui import QFileDialog + fichier = QFileDialog.getOpenFileName() + if fichier == None : return + fn=open(fichier) + except : + try : + from PyQt5.QtWidgets import QFileDialog + fichier = QFileDialog.getOpenFileName() + if fichier[0] == None : return + fn=open(fichier[0]) + except: + pass + #fn=open('Classeur1.csv') + if not fn : return + nouvelleVal=[] + prob=item.object.get_child('Probability') + monType=prob.definition.validators.typeDesTuples[0] + listeObjet=item.object.etape.parent.get_sd_avant_du_bon_type(item.object.etape,(monType,)) + for ligne in fn.readlines(): + try : + nom,valeur = ligne.split(';') + except : + texte += "not able to process: "+ ligne + continue + if nom not in listeObjet : + texte += nom + " : ignored (not known in Eficas) \n " + continue + try : + concept=item.jdc.get_concept(nom) + except : + texte += nom + ": ignored (not known in Eficas) \n " + continue + try : + valNum=valeur.replace (',','.') + valeur=eval (valNum, {}) + except : + texte += valeur + " : unable to eval \n " + continue + nouvelleVal.append((concept,valeur)) + # exec nom in self.jdc + + if nouvelleVal != [] : prob.set_valeur(nouvelleVal) + if texte != "" : + try : + from PyQt5.QtWidgets import QMessageBox + except : + from PyQt4.QtGui import QMessageBox + QMessageBox.information( None,'unable to append values',texte,) + + node.affichePanneau() + + print "et ici" + +# le dictionnaire des commandes a la structure suivante : +# la clef est la commande qui va proposer l action +# puis un tuple qui contient +# - la fonction a appeler +# - le label dans le menu du clic droit +# - un tuple contenant les parametres attendus par la fonction +# - appelable depuis Salome uniquement -) +# - appelable depuis un item valide uniquement +# - toolTip +dict_commandes={ + 'N_1_GENERATORS':( + (exportToCsv,"exportToCsv",('editor','item'),False,False,"export values to cvs File"), + (importFromCsv,"importFromCsv",('editor','item','self'),False,False,"import values from cvs File"), + ), + 'N_1_LINES':( + (exportToCsv,"exportToCsv",('editor','item'),False,False,"export values to cvs File"), + (importFromCsv,"importFromCsv",('editor','item','self'),False,False,"import values from cvs File"), + ) + } diff --git a/OldCodes/PSEN_Eficas/opsPSEN.py b/OldCodes/PSEN_Eficas/opsPSEN.py new file mode 100755 index 00000000..f1e19fe7 --- /dev/null +++ b/OldCodes/PSEN_Eficas/opsPSEN.py @@ -0,0 +1,113 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +#from ExtractGeneratorLoadLineandTransfoDico import ExtractGeneratorLoadLineandTransfoDico +from ExtractGeneratorLoadLineandTransfoDico import ExtractGeneratorLoadLineandTransfoDico2 + +def INCLUDE(self,PSSE_path,sav_file,**args): + """ + Fonction sd_prod pour la macro INCLUDE + """ + + if sav_file==None: return + reevalue=0 + listeADeTruire=[] + listeNouveau=[] + toClean=False + if hasattr(self,'fichier_ini'): + reevalue=1 + if self.fichier_ini == sav_file : return + self.fichier_ini=sav_file + if hasattr(self,'old_context_fichier_init' ): + toClean=True + for concept in self.old_context_fichier_init.values(): + #self.jdc.delete_concept(concept) + listeADeTruire.append(concept) + self.jdc_aux=None + self.contexte_fichier_init={} + #self.reevalue_sd_jdc() + self.jdc.reset_context() + + self.fichier_ini=sav_file + self.contexte_fichier_init = {} + self.fichier_unite = 999 + self.fichier_err = None + self.fichier_text="" + + unite = 999 + + #try : + if 1: + MachineDico,LoadDico,LineDico,TransfoDico, MotorDico = ExtractGeneratorLoadLineandTransfoDico2(sav_file,PSSE_path) + else : + #except : + if self.jdc.appli is not None: + self.jdc.appli.affiche_alerte("Error", 'An error happened in ExtractGeneratorandLoadList execution ') + self.g_context = {} + self.etapes = [] + self.jdc_aux = None + self.fichier_err = str(exc) + self.contexte_fichier_init = {} + + + for nom in MachineDico.keys(): + self.fichier_text += "%s=MONGENER(ID='%s',);\n" % (nom, 'a') + listeNouveau.append(nom) + + for nom in LoadDico.keys(): + self.fichier_text += "%s=MACHARGE(ID='%s',);\n" % (nom, 'a') + listeNouveau.append(nom) + + for nom in LineDico.keys(): + self.fichier_text += "%s=MALIGNE(ID='%s',);\n" % (nom,'a') + listeNouveau.append(nom) + + for nom in TransfoDico.keys(): + self.fichier_text += "%s=MONTRANSFO(ID='%s',);\n" % (nom,'a') + listeNouveau.append(nom) + + for nom in MotorDico.keys(): + self.fichier_text += "%s=MONMOTEUR(ID='%s',);\n" % (nom,'a') + listeNouveau.append(nom) + + import Extensions.jdc_include + self.JdC_aux = Extensions.jdc_include.JDC_CATA_INCLUDE(code='PSEN', execmodul=None) + self.make_contexte_include(None, self.fichier_text) + self.old_context_fichier_init = self.contexte_fichier_init + self.parent.record_unit(unite, self) + + self.jdc.MachineDico=MachineDico + self.jdc.LoadDico=LoadDico + self.jdc.LineDico=LineDico + self.jdc.TransfoDico=TransfoDico + self.jdc.MotorDico = MotorDico + + if toClean: + for concept in listeADeTruire : + if concept.nom not in listeNouveau: self.jdc.delete_concept(concept) + self.reevalue_sd_jdc() + +def INCLUDE_context(self,d): + """ + Fonction op_init pour macro INCLUDE + """ + for k,v in self.g_context.items(): + d[k]=v + diff --git a/OldCodes/PSEN_Eficas/prefs.py b/OldCodes/PSEN_Eficas/prefs.py new file mode 100755 index 00000000..c9a624a9 --- /dev/null +++ b/OldCodes/PSEN_Eficas/prefs.py @@ -0,0 +1,22 @@ +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +code="PSEN" +import sys, os +if os.path.dirname(os.path.abspath(__file__)) not in sys.path : + sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/OldCodes/PSEN_Eficas/prefs_PSEN.py b/OldCodes/PSEN_Eficas/prefs_PSEN.py new file mode 100755 index 00000000..4d2dcc26 --- /dev/null +++ b/OldCodes/PSEN_Eficas/prefs_PSEN.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +import os,sys +# repIni sert a localiser le fichier editeur.ini +# Obligatoire +repIni=os.path.dirname(os.path.abspath(__file__)) +INSTALLDIR=os.path.join(repIni,'..') +sys.path[:0]=[INSTALLDIR] + + +# lang indique la langue utilisee pour les chaines d'aide : fr ou ang +lang='ang' #'fr' + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +encoding='iso-8859-1' +docPath=repIni + + +# +catalogues=( + ('PSEN','default',os.path.join(repIni,'PSEN_Cata.py'),'PSEN','python'), +) diff --git a/OldCodes/PSEN_Eficas/properties.py b/OldCodes/PSEN_Eficas/properties.py new file mode 100755 index 00000000..1d328a46 --- /dev/null +++ b/OldCodes/PSEN_Eficas/properties.py @@ -0,0 +1,24 @@ +#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR +# RESPONSABLE D6BHHHH J-P.LEFEBVRE +# ====================================================================== +# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# ====================================================================== +# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR +# DE LA VERSION DU CODE_ASTER ASSOCIE +#---------------------------------------------------------------------- +version = "1.2" +date = "25/05/2010" +exploit = False diff --git a/OldCodes/PSEN_Eficas/qtEficas_PSEN.py b/OldCodes/PSEN_Eficas/qtEficas_PSEN.py new file mode 100755 index 00000000..2dc71ab3 --- /dev/null +++ b/OldCodes/PSEN_Eficas/qtEficas_PSEN.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour Code_Aster +""" +# Modules Python +# Modules Eficas + +import sys,os +#sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) +import prefs +name='prefs_'+prefs.code +__import__(name) + + +from InterfaceQT4 import eficas_go +eficas_go.lance_eficas(code=prefs.code) diff --git a/OldCodes/PSEN_N1/PSEN_Cata_N1.py b/OldCodes/PSEN_N1/PSEN_Cata_N1.py index 6d926367..d25b464f 100644 --- a/OldCodes/PSEN_N1/PSEN_Cata_N1.py +++ b/OldCodes/PSEN_N1/PSEN_Cata_N1.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/PSEN_N1/opsPSEN_N1.py b/OldCodes/PSEN_N1/opsPSEN_N1.py index 9ea600a6..9a36e235 100644 --- a/OldCodes/PSEN_N1/opsPSEN_N1.py +++ b/OldCodes/PSEN_N1/opsPSEN_N1.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/PSEN_N1/prefs.py b/OldCodes/PSEN_N1/prefs.py index 647d0ae9..58beb3b1 100644 --- a/OldCodes/PSEN_N1/prefs.py +++ b/OldCodes/PSEN_N1/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/PSEN_N1/qtEficas_PSEN_N1.py b/OldCodes/PSEN_N1/qtEficas_PSEN_N1.py index 6863fe03..c3b3c899 100755 --- a/OldCodes/PSEN_N1/qtEficas_PSEN_N1.py +++ b/OldCodes/PSEN_N1/qtEficas_PSEN_N1.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/ProcessOutputs_Eficas/EssaiMulti.py b/OldCodes/ProcessOutputs_Eficas/EssaiMulti.py new file mode 100755 index 00000000..87f9905b --- /dev/null +++ b/OldCodes/ProcessOutputs_Eficas/EssaiMulti.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import os +import sys +from multiprocessing import Process +from multiprocessing import Lock +from multiprocessing import Pool + +def worker(num): + """thread worker function""" + print 'Worker:', num + return + +def test1(): + for i in range(5): + p = Process(target=worker, args=(i,)) + p.start() + p.join() + +def info(title): + print(title) + print('parent process:', os.getppid()) + print('process id:', os.getpid()) + +def f(name): + info('function f') + print('hello', name) + +def test2(): + info('test2') + p = Process(target=f, args=('pascale',)) + p.start() + p.join() + +def f(l, i): + l.acquire() + try: + print('hello world', i) + finally: + l.release() + + +def test3(lock): + for num in range(10): + Process(target=f, args=(lock, num)).start() + + # sorties evt desordonnees + for i in range(50): + p = Process(target=worker, args=(i,)).start() + +def g(x): + return x*x + + +def test4(): + import traceback + traceback.print_stack() + num_cores = 4 + FolderPath='tmp' + + monPool=Pool(maxtasksperchild=1) #create a multiprocessing.Pool object + for l in range(num_cores): + print(" lct on core "+str(l) ) + p= monPool.apply_async(g,(l,)) + + res = monPool.apply_async(g, (20,)) # runs in *only* one process + print res.get(timeout=1) # prints "400" + + # evaluate "os.getpid()" asynchronously + res = monPool.apply_async(os.getpid, ()) # runs in *only* one process + print res.get(timeout=1) # prints the PID of that process + + # launching multiple evaluations asynchronously *may* use more processes + multiple_results = [monPool.apply_async(os.getpid, ()) for i in range(4)] + print [res.get(timeout=1) for res in multiple_results] + + + +if __name__ == '__main__': + #test1() + + #test2() + + #lock = Lock() + #test3(lock) + print ('je suis dans main du run') + test4() + diff --git a/OldCodes/ProcessOutputs_Eficas/ExtractGeneratorLoadLineandTransfoDico.py b/OldCodes/ProcessOutputs_Eficas/ExtractGeneratorLoadLineandTransfoDico.py new file mode 100644 index 00000000..d9188102 --- /dev/null +++ b/OldCodes/ProcessOutputs_Eficas/ExtractGeneratorLoadLineandTransfoDico.py @@ -0,0 +1,620 @@ +import os +import sys +import numpy as np +import copy + +#import Storage + + +def getNominalkV(NetworkFile): + print "begin getNominalkV for ", NetworkFile + + print "version en dur" + BusList=(1,2,3,4,6) + LinesList=(7,8,9,10) + TransfosList=('Transfos_A', 'Transfos_B', 'Transfos_C', 'Transfos_D') + return BusList, LinesList, TransfosList + + import psspy + import redirect + + psspy.psseinit(80000) + redirect.psse2py() + psspy.progress_output(6) + + psspy.case(NetworkFile) + print "before buses" + # Buses + + sid = -1 + flag = 2 + ierr, ret = psspy.abusreal(sid, flag, ['BASE']) + Storage.BusBase = ret[0] + + ierr, carray = psspy.abuschar(sid, flag, ['NAME']) + Storage.BusBaseList = {} + for i in range(len(carray[0])): + Storage.BusBaseList[carray[0][i]] = ret[0][i] + + BusList = [] + for item in Storage.BusBase: + if item not in BusList: + BusList.append(item) + BusList = sorted(BusList) + + print "after buses" + + # Lines + + owner = 1 + ties = 1 + flag = 2 + entry = 1 + string = ['FROMNAME', 'TONAME'] + ierr, carray = psspy.abrnchar(sid, owner, ties, flag, entry, string) + + for i in range(len(carray[0])): + nom = Storage.BusBaseList[carray[0][i]] + name = carray[0][i] + '-' + carray[1][i] + Storage.LinesBaseList[name] = nom + Storage.LinesBase.append(nom) + + LinesList = [] + for item in Storage.LinesBase: + if item not in LinesList: + LinesList.append(item) + LinesList = sorted(LinesList) + + print "after lines" + + # Transfos + + owner = 1 + ties = 1 + flag = 6 + entry = 1 + string = ['FROMNAME', 'TONAME'] + ierr, carray = psspy.abrnchar(sid, owner, ties, flag, entry, string) + + for i in range(len(carray[0])): + nom1 = Storage.BusBaseList[carray[0][i]] + nom2 = Storage.BusBaseList[carray[1][i]] + name = carray[0][i] + '-' + carray[1][i] + Storage.TransfoBaseList[name] = [nom1, nom2] + Storage.TransfoBase.append([nom1, nom2]) + + TransfosList = [] + for item in Storage.TransfoBase: + string = str(item[0]) + ' - ' + str(item[1]) + if string not in TransfosList: + TransfosList.append(string) + TransfosList = sorted(TransfosList) + + print "after transfos" + + # Generators + + sid = -1 #all buses + flag = 1 #all in service loads/generators (4 all loads/generators) + + string = ['NUMBER'] + ierr,iarray = psspy.amachint(sid,flag,string) + + string = ['NAME','ID'] + ierr,carray = psspy.amachchar(sid,flag,string) + + for i in range(len(iarray[0])): + idname = "GR" + carray[1][i] + machinename = carray[0][i].strip()+ "__" + idname + machinename = machinename.replace(" ","_") + machinename = machinename.replace("-","_") + machinename = machinename.replace(".","_") + machinename = machinename.replace("&","and") + try: + int(machinename[0]) + machinename = "_" + machinename + except: + pass + Storage.GenBaseList[machinename] = iarray[0][i] + + return BusList, LinesList, TransfosList + +#PN --> inutiles +#def getBusNominalkV(NetworkFile): +# import psspy +# import redirect +# +# psspy.psseinit(80000) +# redirect.psse2py() +# psspy.progress_output(6) +# +# psspy.case(NetworkFile) +# +# sid = -1 +# flag = 2 +# ierr, ret = psspy.abusreal(sid, flag, ['BASE']) +# Storage.BusBase = ret[0] +# +# ierr, carray = psspy.abuschar(sid, flag, ['NAME']) +# buses = {} +# for i in range(len(carray[0])): +# buses[carray[0][i]] = ret[0][i] +# Storage.BusNames = buses +# ret = [] +# for item in Storage.BusBase: +# if item not in ret: +# ret.append(item) +# return sorted(ret) + +#def updateConts(): +# Storage.ContFullList = [] +# tmp = Storage.BusBaseList.keys() +# tmp.sort() +# for key in tmp: +# Storage.ContFullList.append(key) +# tmp = Storage.GenBaseList.keys() +# tmp.sort() +# for key in tmp: +# Storage.ContFullList.append(key) +# tmp = Storage.LinesBaseList.keys() +# tmp.sort() +# for key in tmp: +# Storage.ContFullList.append(key) +# tmp = Storage.TransfoBaseList.keys() +# tmp.sort() +# for key in tmp: +# Storage.ContFullList.append(key) +# print Storage.ContFullList +# return Storage.ContFullList +# +#def newContingency(MatList): +# Storage.CustomContingencies.append(MatList) +# +#def checkIfBorder(graph, key, depth, tmplist): +# if key in tmplist: +# return True +# if depth == 0: +# return False +# NonBorders = 0 +# for item in graph[key]: +# if not checkIfBorder(graph, item, depth - 1, tmplist): +# NonBorders += 1 +# if NonBorders < 2: # A generator is considered as isolated if it has less than two non-borders neighbours +# if key not in tmplist: +# tmplist.append(key) +# return True +# return False +# +#def getTrueLines(NetworkFile): +# import psspy +# import redirect +# +# psspy.psseinit(80000) +# redirect.psse2py() +# psspy.progress_output(6) +# +# psspy.case(NetworkFile) +# +# sid = -1 +# owner = 1 +# ties = 1 +# flag = 4 # 6 for two-winding transfos +# entry = 1 #each branch once, not both directions +# string = ['FROMNAME', 'TONAME', 'ID'] +# ierr, iarray = psspy.abrnchar(sid, owner, ties, flag, entry, string) +# string = ['FROMNUMBER', 'TONUMBER'] +# ierr, carray = psspy.abrnint(sid, owner, ties, flag, entry, string) +# +# lst = [] +# tmplist = [] +# try: +# for i in range(len(carray[0])): +# if carray[0][i] not in lst and carray[0][i] not in tmplist: +# tmplist.append(carray[0][i]) +# elif carray[0][i] not in lst and carray[0][i] in tmplist: +# tmplist.remove(carray[0][i]) +# lst.append(carray[0][i]) +# if carray[1][i] not in lst and carray[1][i] not in tmplist: +# tmplist.append(carray[1][i]) +# elif carray[1][i] not in lst and carray[1][i] in tmplist: +# tmplist.remove(carray[1][i]) +# lst.append(carray[1][i]) +# except: +# pass +# +# # Create the graph +# graph = {} +# for i in range(len(carray[0])): +# try: +# if graph[carray[0][i]]: +# pass +# except: +# graph[carray[0][i]] = [] +# if carray[1][i] not in graph[carray[0][i]]: +# graph[carray[0][i]].append(carray[1][i]) +# try: +# if graph[carray[1][i]]: +# pass +# except: +# graph[carray[1][i]] = [] +# if carray[0][i] not in graph[carray[1][i]]: +# graph[carray[1][i]].append(carray[0][i]) +# +# # Search it twice, to ensure everything is mapped +# for key in sorted(graph.keys()): +# checkIfBorder(graph, key, Storage.RecursiveDepth, tmplist) +# for key in reversed(sorted(graph.keys())): +# checkIfBorder(graph, key, Storage.RecursiveDepth, tmplist) +# +# Storage.IsolatedGenList = [] +# # Unfold it +# for i in range(len(carray[0])): +# if carray[0][i] in tmplist: +# if iarray[0][i] not in Storage.IsolatedGenList: +# Storage.IsolatedGenList.append(iarray[0][i]) +# if carray[1][i] in tmplist: +# if iarray[1][i] not in Storage.IsolatedGenList: +# Storage.IsolatedGenList.append(iarray[1][i]) +# +# lines = [] +# outLines = [] +# for i in range(len(iarray[0])): +# name = iarray[0][i] + '-' + iarray[1][i] +# if '@' in iarray[2][i] or '*' in iarray[2][i]: +# outLines.append(name) +# elif iarray[0][i] not in Storage.IsolatedGenList and iarray[1][i] not in Storage.IsolatedGenList: +# lines.append(name) +# else: +# outLines.append(name) +# Storage.TrueLines = lines +# return lines +# +#NoBreakersandSwitches = True +# +#def ExtractGeneratorLoadLineandTransfoDico(NetworkFile,PSSE_PATH): +# import os +# import sys +# import numpy as np +# +# print NetworkFile +# print PSSE_PATH +# sys.path.append(PSSE_PATH) +# os.environ['PATH'] += ';' + PSSE_PATH + ';' +# +# import psspy +# import redirect +# +# ###initialization PSSE +# psspy.psseinit(10000) +# _i=psspy.getdefaultint() +# _f=psspy.getdefaultreal() +# _s=psspy.getdefaultchar() +# redirect.psse2py() +# +# # Silent execution of PSSe +# islct=6 # 6=no output; 1=standard +# psspy.progress_output(islct) +# +# #open Network File +# psspy.case(NetworkFile) +# +# # Extract Buses +# sid = -1 # all buses +# flag = 2 +# string = ['NUMBER'] +# ierr, iarray = psspy.abusint(sid, flag, string) +# +# string = ['NAME', 'EXNAME'] +# ierr, carray = psspy.abuschar(sid, flag, string) +# +# string = ['BASE'] +# ierr, ret = psspy.abusreal(sid, flag, string) +# +# BusDico = {} +# BusNominal = {} +# for i in range(len(iarray[0])): +# BusNum = iarray[0][i] +# BusDico[str(BusNum)] = carray[0][i].strip() +# BusNominal[BusDico[str(BusNum)]] = ret[0][i] +# +# #Extract Loads +# sid = -1 #all buses +# flag = 1 #all in service loads/generators (4 all loads/generators) +# +# +# string = ['NUMBER'] +# ierr,iarray = psspy.aloadint(sid,flag,string) +# +# string = ['NAME','ID','EXNAME'] +# ierr,carray = psspy.aloadchar(sid,flag,string) +# +# string = ['mvaact'] +# ierr, xdata = psspy.aloadcplx(sid, flag, string) +# +# LoadDico = {} # [Bus name, load ID, extended bus name, bus number] +# for i in range(len(iarray[0])): +# idname = "Lo" + carray[1][i].strip() +## try: #id is an integer +## idname = "Lo" + str(int(carray[1][i])) +## except: #id is not an integer +## idname = "Lo" + carray[1][i] +# loadname = carray[0][i].strip()+ "__" + idname +# loadname = loadname.replace(" ","_") +# loadname = loadname.replace("-","_") +# loadname = loadname.replace(".","_") +# loadname = loadname.replace("&","and") +# try: +# int(loadname[0]) +# loadname="_" + loadname +# except: +# pass +# LoadDico[loadname]= {} +# LoadDico[loadname]['NAME'] = carray[0][i].strip() +# LoadDico[loadname]['ID'] = carray[1][i] +# LoadDico[loadname]['EXNAME'] =carray[2][i] +# LoadDico[loadname]['NUMBER']=iarray[0][i] +# LoadDico[loadname]['P']=np.real(xdata)[0][i] +# LoadDico[loadname]['Q']=np.imag(xdata)[0][i] +# +# #Extract Generators +# sid = -1 #all buses +# flag = 1 #all in service loads/generators (4 all loads/generators) +# +# string = ['NUMBER'] +# ierr,iarray = psspy.amachint(sid,flag,string) +# +# string = ['NAME','ID','EXNAME'] +# ierr,carray = psspy.amachchar(sid,flag,string) +# +# rstrings = ['pgen','qgen','mbase','pmax','qmax','pmin','qmin'] +# ierr, rarray = psspy.amachreal(sid, flag, rstrings) +# +# MachineDico = {} # [Bus name, machine ID, extended bus name, bus number] +# for i in range(len(iarray[0])): +# idname = "Gr" + carray[1][i].strip() +### try: +### idname = "Gr" + str(int(carray[1][i])) +### except: +### idname = "Gr" + carray[1][i] +# machinename = carray[0][i].strip()+ "__" + idname +# machinename = machinename.replace(" ","_") +# machinename = machinename.replace("-","_") +# machinename = machinename.replace(".","_") +# machinename = machinename.replace("&","and") +# try: +# int(machinename[0]) +# machinename="_" + machinename +# except: +# pass +# MachineDico[machinename]={} +# MachineDico[machinename]['NAME'] = carray[0][i].strip() +# MachineDico[machinename]['ID'] = carray[1][i] +# MachineDico[machinename]['EXNAME'] =carray[2][i] +# MachineDico[machinename]['NUMBER']=iarray[0][i] +# MachineDico[machinename]['P']=rarray[0][i] +# MachineDico[machinename]['Q']=rarray[1][i] +# MachineDico[machinename]['PMAX']=rarray[3][i] +# MachineDico[machinename]['QMAX']=rarray[4][i] +# MachineDico[machinename]['PMIN']=rarray[5][i] +# MachineDico[machinename]['QMIN']=rarray[6][i] +# +# #Extract Motors +# sid = -1 #all buses +# flag = 1 #all in service loads/generators (4 all loads/generators) +# +# string = ['NUMBER','PSETCODE','BASECODE'] +# ierr,iarray = psspy.aindmacint(sid,flag,string) +# +# string = ['NAME','ID','EXNAME'] +# ierr,carray = psspy.aindmacchar(sid,flag,string) +# +# rstrings = ['psetpoint','mbase','p','q'] +# ierr, rarray = psspy.aindmacreal(sid, flag, rstrings) +# +# +# MotorDico = {} # [Bus name, machine ID, extended bus name, bus number] +# for i in range(len(iarray[0])): +# idname = "Mo" + carray[1][i].strip() +### try: +### idname = "Gr" + str(int(carray[1][i])) +### except: +### idname = "Gr" + carray[1][i] +# motorname = carray[0][i].strip()+ "__" + idname +# motorname = motorname.replace(" ","_") +# motorname = motorname.replace("-","_") +# motorname = motorname.replace(".","_") +# motorname = motorname.replace("&","and") +# try: +# int(motorname[0]) +# motorname="_" + motorname +# except: +# pass +# MotorDico[motorname]={} +# MotorDico[motorname]['NAME'] = carray[0][i].strip() +# MotorDico[motorname]['ID'] = carray[1][i] +# MotorDico[motorname]['EXNAME'] =carray[2][i] +# MotorDico[motorname]['NUMBER']=iarray[0][i] +# MotorDico[motorname]['PSETCODE']=iarray[1][i] +# MotorDico[motorname]['BASECODE']=iarray[2][i] +# MotorDico[motorname]['PSETPOINT']=rarray[0][i] +# MotorDico[motorname]['MBASE']=rarray[1][i] +# MotorDico[motorname]['P']=rarray[2][i] +# MotorDico[motorname]['Q']=rarray[3][i] +# +# +# #Extract Lignes +# sid = -1 +# owner = 1 +# ties = 1 +# flag = 2 #6 for two-winding transfos +# entry = 1 #each branch once, not both directions +# string = ['FROMNUMBER','TONUMBER'] +# ierr,iarray = psspy.abrnint(sid,owner,ties,flag,entry,string) +# string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] +# ierr,carray = psspy.abrnchar(sid,owner,ties,flag,entry,string) +# +# LineDico = {} #[linename, Bus name 1, Bus name 2, ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] +# for i in range(len(iarray[0])): +# idname = carray[4][i].strip() +# #idname = carray[4][i] +# if '@' in idname: +# idname = idname.replace('@','Br') +# elif '*' in idname: +# idname = idname.replace('*','Sw') +# else: +# try: +# idname = 'Li' + str(int(idname)) +# except: +# idname = 'Li' + idname +# linename =carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname +# linename = linename.replace(" ","_") +# linename = linename.replace("-","_") +# linename = linename.replace(".","_") +# linename = linename.replace("&","and") +# try: +# int(linename[0]) +# linename="_" + linename +# except: +# pass +# if NoBreakersandSwitches: +# if 'Br' not in idname and 'Sw' not in idname: +# LineDico[linename]={} +# LineDico[linename]['FROMNAME']=carray[0][i].strip() +# LineDico[linename]['TONAME']=carray[1][i].strip() +# LineDico[linename]['ID']=carray[4][i] +# LineDico[linename]['FROMEXNAME']=carray[2][i] +# LineDico[linename]['TOEXNAME']=carray[3][i] +# LineDico[linename]['FROMNUMBER']=iarray[0][i] +# LineDico[linename]['TONUMBER']=iarray[1][i] +# +# #Extract Branches +# sid = -1 +# owner = 1 +# ties = 1 +# flag = 4 # lines & transfos +# entry = 1 #each branch once, not both directions +# string = ['FROMNUMBER','TONUMBER'] +# ierr, iarray = psspy.abrnint(sid, owner, ties, flag, entry, string) +# string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] +# ierr, carray = psspy.abrnchar(sid, owner, ties, flag, entry, string) +# +# BranchesDico = {} #[linename, Bus name 1, Bus name 2, ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] +# for i in range(len(iarray[0])): +# idname = carray[4][i] +# if '@' in idname: +# idname = idname.replace('@','Br') +# elif '*' in idname: +# idname = idname.replace('*','Sw') +# else: +# idname = 'LI' + idname +# linename = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname +# linename = linename.replace(" ","_") +# linename = linename.replace("-","_") +# linename = linename.replace(".","_") +# linename = linename.replace("&","and") +# try: +# int(linename[0]) +# linename = "_" + linename +# except: +# pass +# if linename[-1] == '_': +# linename = linename[:-1] +# BranchesDico[linename] = {} +# BranchesDico[linename]['FROMNAME'] = carray[0][i].strip() +# BranchesDico[linename]['TONAME'] = carray[1][i].strip() +# BranchesDico[linename]['ID'] = carray[4][i] +# BranchesDico[linename]['FROMEXNAME'] = carray[2][i] +# BranchesDico[linename]['TOEXNAME'] = carray[3][i] +# BranchesDico[linename]['FROMNUMBER'] = iarray[0][i] +# BranchesDico[linename]['TONUMBER'] = iarray[1][i] +# +# +# #Extract Transfos +# sid = -1 +# owner = 1 +# ties = 1 +# flag = 6 #two-winding transfos +# entry = 1 #each branch once, not both directions +# string = ['FROMNUMBER','TONUMBER'] +# ierr,iarray = psspy.abrnint(sid,owner,ties,flag,entry,string) +# string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] +# ierr,carray = psspy.abrnchar(sid,owner,ties,flag,entry,string) +# +# TfoDico = {} #[linename, Bus name 1, Bus name 2, machine ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] +# for i in range(len(iarray[0])): +# idname = 'Tr' + carray[4][i].strip() +### try: +### idname = 'Tr' + str(int(carray[4][i])) +### except: +### idname = 'Tr' + carray[4][i] +# tfoname = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname +# tfoname = tfoname.replace(" ","_") +# tfoname = tfoname.replace("-","_") +# tfoname = tfoname.replace(".","_") +# tfoname = tfoname.replace("&","and") +# try: +# int(tfoname[0]) +# tfoname="_" + tfoname +# except: +# pass +# TfoDico[tfoname]={} +# TfoDico[tfoname]['FROMNAME']=carray[0][i].strip() +# TfoDico[tfoname]['TONAME']=carray[1][i].strip() +# TfoDico[tfoname]['ID']=carray[4][i] +# TfoDico[tfoname]['FROMEXNAME']=carray[2][i] +# TfoDico[tfoname]['TOEXNAME']=carray[3][i] +# TfoDico[tfoname]['FROMNUMBER']=iarray[0][i] +# TfoDico[tfoname]['TONUMBER']=iarray[1][i] +# TfoDico[tfoname]['#WIND']=2 +# print "Read Transfos" +# +# #Extract 3 winding Transfos +# sid = -1 #assume a subsystem containing all buses in working case +# owner_3flow = 1 #1 = use bus ownership 2 = use tfo ownership +# ties_3flow = 3 #ignored bc sid is negative. 3 = interior subsystem and subsystem tie 3 winding transformers +# flag=3 #all 3 winding transfo windings +# string = ['wind1number','wind2number','wind3number'] +# ierr,iarray = psspy.awndint(sid,owner,ties,flag,entry,string) +# string = ['wind1name','wind2name','wind3name','wind1exname','wind2exname','wind3exname','id'] +# ierr,carray = psspy.awndchar(sid,owner,ties,flag,entry,string) +# +# #[Bus name 1, Bus name 2, Bus name 3, machine ID, extended bus name 1, extended bus name 2, extended bus name 3, bus number 1, bus number 2, bus number 3] +# for i in range(len(iarray[0])): +# idname = 'Tr' + carray[6][i].strip() +### try: +### idname = 'Tr' + str(int(carray[4][i])) +### except: +### idname = 'Tr' + carray[4][i] +# tfoname = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + carray[2][i].strip() + "__" + idname +# tfoname = tfoname.replace(" ","_") +# tfoname = tfoname.replace("-","_") +# tfoname = tfoname.replace(".","_") +# tfoname = tfoname.replace("&","and") +# try: +# int(tfoname[0]) +# tfoname="_" + tfoname +# except: +# pass +# TfoDico[tfoname]={} +# TfoDico[tfoname]['FROMNAME']=carray[0][i].strip() +# TfoDico[tfoname]['TONAME']=carray[1][i].strip() +# TfoDico[tfoname]['3NAME']=carray[2][i].strip() +# TfoDico[tfoname]['ID']=carray[6][i] +# TfoDico[tfoname]['FROMEXNAME']=carray[3][i] +# TfoDico[tfoname]['TOEXNAME']=carray[4][i] +# TfoDico[tfoname]['3EXNAME']=carray[5][i] +# TfoDico[tfoname]['FROMNUMBER']=iarray[0][i] +# TfoDico[tfoname]['TONUMBER']=iarray[1][i] +# TfoDico[tfoname]['3NUMBER']=iarray[2][i] +# TfoDico[tfoname]['#WIND']=3 +# print "Read 3-Winding Transfos" +# +# return MachineDico, LoadDico, LineDico, TfoDico, MotorDico, BusDico, BranchesDico, BusNominal +# +# +##NetworkFile = r'\\Atlas.edf.fr\co\dpit-cist-siege\Der.012\Dpt-Etudes-Reseaux.001\Outils DER - Divers (excel, codes python, etc.)\PSEN_V15\Example\Results\N_20160705_17h36m34\package0_N_20160705_17h36m34\BaseCase.sav' +##PSSE_PATH=r"C:\Program Files (x86)\PTI\PSSE33\PSSBIN" +##sys.path.append(PSSE_PATH) +##os.environ['PATH'] += ';' + PSSE_PATH + ';' +##getNominalkV(NetworkFile) +##updateConts() diff --git a/OldCodes/ProcessOutputs_Eficas/ExtractGeneratorLoadLineandTransfoDicoProcess.py b/OldCodes/ProcessOutputs_Eficas/ExtractGeneratorLoadLineandTransfoDicoProcess.py new file mode 100644 index 00000000..653e23f8 --- /dev/null +++ b/OldCodes/ProcessOutputs_Eficas/ExtractGeneratorLoadLineandTransfoDicoProcess.py @@ -0,0 +1,631 @@ +import os +import sys +import numpy as np +import copy + +path1 = os.path.abspath(os.path.join(os.path.abspath(__file__), '../','TreatOutputs')) +sys.path.append(path1) +import Options + + +def getNominalkV(NetworkFile): + + print "version en dur" + + BusList=[11.0, 30.0, 90.0] + LinesList=[30.0, 90.0] + TransfosList=['11.0 - 30.0', '11.0 - 90.0', '30.0 - 90.0', '90.0 - 30.0'] + return BusList, LinesList, TransfosList + + + + + + import psspy + import redirect + + psspy.psseinit(80000) + redirect.psse2py() + psspy.progress_output(6) + + psspy.case(NetworkFile) + # Buses + + sid = -1 + flag = 2 + ierr, ret = psspy.abusreal(sid, flag, ['BASE']) + Options.BusBase = ret[0] + + ierr, carray = psspy.abuschar(sid, flag, ['NAME']) + Options.BusBaseList = {} + for i in range(len(carray[0])): + Options.BusBaseList[carray[0][i]] = ret[0][i] + + BusList = [] + for item in Options.BusBase: + if item not in BusList: + BusList.append(item) + BusList = sorted(BusList) + + # Lines + + owner = 1 + ties = 1 + flag = 2 + entry = 1 + string = ['FROMNAME', 'TONAME'] + ierr, carray = psspy.abrnchar(sid, owner, ties, flag, entry, string) + + for i in range(len(carray[0])): + nom = Options.BusBaseList[carray[0][i]] + name = carray[0][i] + '-' + carray[1][i] + Options.LinesBaseList[name] = nom + Options.LinesBase.append(nom) + + LinesList = [] + for item in Options.LinesBase: + if item not in LinesList: + LinesList.append(item) + LinesList = sorted(LinesList) + + # Transfos + + owner = 1 + ties = 1 + flag = 6 + entry = 1 + string = ['FROMNAME', 'TONAME'] + ierr, carray = psspy.abrnchar(sid, owner, ties, flag, entry, string) + + for i in range(len(carray[0])): + nom1 = Options.BusBaseList[carray[0][i]] + nom2 = Options.BusBaseList[carray[1][i]] + name = carray[0][i] + '-' + carray[1][i] + Options.TransfoBaseList[name] = [nom1, nom2] + Options.TransfoBase.append([nom1, nom2]) + + TransfosList = [] + for item in Options.TransfoBase: + string = str(item[0]) + ' - ' + str(item[1]) + if string not in TransfosList: + TransfosList.append(string) + TransfosList = sorted(TransfosList) + + # Generators + + sid = -1 #all buses + flag = 1 #all in service loads/generators (4 all loads/generators) + + string = ['NUMBER'] + ierr,iarray = psspy.amachint(sid,flag,string) + + string = ['NAME','ID'] + ierr,carray = psspy.amachchar(sid,flag,string) + + for i in range(len(iarray[0])): + idname = "GR" + carray[1][i] + machinename = carray[0][i].strip()+ "__" + idname + machinename = machinename.replace(" ","_") + machinename = machinename.replace("-","_") + machinename = machinename.replace(".","_") + machinename = machinename.replace("&","and") + try: + int(machinename[0]) + machinename = "_" + machinename + except: + pass + Options.GenBaseList[machinename] = iarray[0][i] + + return BusList, LinesList, TransfosList + +def getBusNominalkV(NetworkFile): + import psspy + import redirect + + psspy.psseinit(80000) + redirect.psse2py() + psspy.progress_output(6) + + psspy.case(NetworkFile) + + sid = -1 + flag = 2 + ierr, ret = psspy.abusreal(sid, flag, ['BASE']) + Options.BusBase = ret[0] + + ierr, carray = psspy.abuschar(sid, flag, ['NAME']) + buses = {} + for i in range(len(carray[0])): + buses[carray[0][i]] = ret[0][i] + Options.BusNames = buses + ret = [] + for item in Options.BusBase: + if item not in ret: + ret.append(item) + return sorted(ret) + +def updateConts(): + Options.ContFullList = [] + tmp = Options.BusBaseList + tmp.sort() + for key in tmp: + Options.ContFullList.append(key) + tmp = Options.GenBaseList + tmp.sort() + for key in tmp: + Options.ContFullList.append(key) + tmp = Options.LinesBaseList + tmp.sort() + for key in tmp: + Options.ContFullList.append(key) + tmp = Options.TransfoBaseList + tmp.sort() + for key in tmp: + Options.ContFullList.append(key) + print Options.ContFullList + return Options.ContFullList + +def newContingency(MatList): + Options.CustomContingencies.append(MatList) + +def checkIfBorder(graph, key, depth, tmplist): + #print "in checkifBorder" + #print "depth ",depth + #print graph + if key in tmplist: + return True + if depth == 0: + return False + NonBorders = 0 + for item in graph[key]: + if not checkIfBorder(graph, item, depth - 1, tmplist): + NonBorders += 1 + if NonBorders < 2: # A generator is considered as isolated if it has less than two non-borders neighbours + if key not in tmplist: + tmplist.append(key) + return True + return False + +def getTrueLines(NetworkFile): + import psspy + import redirect + + psspy.psseinit(80000) + redirect.psse2py() + psspy.progress_output(6) + + psspy.case(NetworkFile) + + sid = -1 + owner = 1 + ties = 1 + flag = 4 # 6 for two-winding transfos + entry = 1 #each branch once, not both directions + string = ['FROMNAME', 'TONAME', 'ID'] + ierr, iarray = psspy.abrnchar(sid, owner, ties, flag, entry, string) + string = ['FROMNUMBER', 'TONUMBER'] + ierr, carray = psspy.abrnint(sid, owner, ties, flag, entry, string) + + lst = [] + tmplist = [] + try: + for i in range(len(carray[0])): + if carray[0][i] not in lst and carray[0][i] not in tmplist: + tmplist.append(carray[0][i]) + elif carray[0][i] not in lst and carray[0][i] in tmplist: + tmplist.remove(carray[0][i]) + lst.append(carray[0][i]) + if carray[1][i] not in lst and carray[1][i] not in tmplist: + tmplist.append(carray[1][i]) + elif carray[1][i] not in lst and carray[1][i] in tmplist: + tmplist.remove(carray[1][i]) + lst.append(carray[1][i]) + except: + pass + + # Create the graph + graph = {} + for i in range(len(carray[0])): + try: + if graph[carray[0][i]]: + pass + except: + graph[carray[0][i]] = [] + if carray[1][i] not in graph[carray[0][i]]: + graph[carray[0][i]].append(carray[1][i]) + try: + if graph[carray[1][i]]: + pass + except: + graph[carray[1][i]] = [] + if carray[0][i] not in graph[carray[1][i]]: + graph[carray[1][i]].append(carray[0][i]) + + + # Search it twice, to ensure everything is mapped + for key in sorted(graph): + #print key + checkIfBorder(graph, key, Options.RecursiveDepth, tmplist) + #print "out of Checkif 0" + #print "" + for key in reversed(sorted(graph)): + checkIfBorder(graph, key, Options.RecursiveDepth, tmplist) + + Options.IsolatedGenList = [] + # Unfold it + for i in range(len(carray[0])): + if carray[0][i] in tmplist: + if iarray[0][i] not in Options.IsolatedGenList: + Options.IsolatedGenList.append(iarray[0][i]) + if carray[1][i] in tmplist: + if iarray[1][i] not in Options.IsolatedGenList: + Options.IsolatedGenList.append(iarray[1][i]) + + lines = [] + outLines = [] + for i in range(len(iarray[0])): + name = iarray[0][i] + '-' + iarray[1][i] + if '@' in iarray[2][i] or '*' in iarray[2][i]: + outLines.append(name) + elif iarray[0][i] not in Options.IsolatedGenList and iarray[1][i] not in Options.IsolatedGenList: + lines.append(name) + else: + outLines.append(name) + Options.TrueLines = lines + + return lines + +NoBreakersandSwitches = True + +def ExtractGeneratorLoadLineandTransfoDico(NetworkFile,PSSE_PATH): + + print "version en dur" + MachineDico={'M1':'M1','M2':'M2','M3':'M3','M4':'M4','B6_BUS13__1':'AZ','CSPRING__1':'DD','GT12B__1':'ER','BSTMB__1':'JJ'} + LoadDico={'C1':'C1','C2':'C2','C3':'C3','C4':'C4'} + LineDico={'L1':'L1','L2':'L2','L3':'L3','L4':'L4'} + TfoDico={'T1':'T1','T2':'T2','T3':'T3','T4':'T4'} + MDico={'MZ1':'MZ1','MZ2':'MZ2','MZ3':'MZ3','MZ4':'MZ4'} + BranchesDico={'B11':'B1','B2':'B2','B3':'B3','B4':'B4'} + BusNomial={'Bus1':'Bus1','Bus2':'Bus2','Bus3':'Bus3','Bus4':'Bus4'} + + return MachineDico, LoadDico, LineDico, TfoDico, MotorDico, BusDico, BranchesDico, BusNominal + + + import os + import sys + import numpy as np + + sys.path.append(PSSE_PATH) + os.environ['PATH'] += ';' + PSSE_PATH + ';' + + import psspy + import redirect + + ###initialization PSSE + psspy.psseinit(10000) + _i=psspy.getdefaultint() + _f=psspy.getdefaultreal() + _s=psspy.getdefaultchar() + redirect.psse2py() + + # Silent execution of PSSe + islct=6 # 6=no output; 1=standard + psspy.progress_output(islct) + + #open Network File + psspy.case(NetworkFile) + + # Extract Buses + sid = -1 # all buses + flag = 2 + string = ['NUMBER'] + ierr, iarray = psspy.abusint(sid, flag, string) + + string = ['NAME', 'EXNAME'] + ierr, carray = psspy.abuschar(sid, flag, string) + + string = ['BASE'] + ierr, ret = psspy.abusreal(sid, flag, string) + + BusDico = {} + BusNominal = {} + for i in range(len(iarray[0])): + BusNum = iarray[0][i] + BusDico[str(BusNum)] = carray[0][i].strip() + BusNominal[BusDico[str(BusNum)]] = ret[0][i] + + #Extract Loads + sid = -1 #all buses + flag = 1 #all in service loads/generators (4 all loads/generators) + + + string = ['NUMBER'] + ierr,iarray = psspy.aloadint(sid,flag,string) + + string = ['NAME','ID','EXNAME'] + ierr,carray = psspy.aloadchar(sid,flag,string) + + string = ['mvaact'] + ierr, xdata = psspy.aloadcplx(sid, flag, string) + + LoadDico = {} # [Bus name, load ID, extended bus name, bus number] + for i in range(len(iarray[0])): + idname = "Lo" + carray[1][i].strip() +# try: #id is an integer +# idname = "Lo" + str(int(carray[1][i])) +# except: #id is not an integer +# idname = "Lo" + carray[1][i] + loadname = carray[0][i].strip()+ "__" + idname + loadname = loadname.replace(" ","_") + loadname = loadname.replace("-","_") + loadname = loadname.replace(".","_") + loadname = loadname.replace("&","and") + try: + int(loadname[0]) + loadname="_" + loadname + except: + pass + LoadDico[loadname]= {} + LoadDico[loadname]['NAME'] = carray[0][i].strip() + LoadDico[loadname]['ID'] = carray[1][i] + LoadDico[loadname]['EXNAME'] =carray[2][i] + LoadDico[loadname]['NUMBER']=iarray[0][i] + LoadDico[loadname]['P']=np.real(xdata)[0][i] + LoadDico[loadname]['Q']=np.imag(xdata)[0][i] + + #Extract Generators + sid = -1 #all buses + flag = 1 #all in service loads/generators (4 all loads/generators) + + string = ['NUMBER'] + ierr,iarray = psspy.amachint(sid,flag,string) + + string = ['NAME','ID','EXNAME'] + ierr,carray = psspy.amachchar(sid,flag,string) + + rstrings = ['pgen','qgen','mbase','pmax','qmax','pmin','qmin'] + ierr, rarray = psspy.amachreal(sid, flag, rstrings) + + MachineDico = {} # [Bus name, machine ID, extended bus name, bus number] + for i in range(len(iarray[0])): + idname = "Gr" + carray[1][i].strip() +## try: +## idname = "Gr" + str(int(carray[1][i])) +## except: +## idname = "Gr" + carray[1][i] + machinename = carray[0][i].strip()+ "__" + idname + machinename = machinename.replace(" ","_") + machinename = machinename.replace("-","_") + machinename = machinename.replace(".","_") + machinename = machinename.replace("&","and") + try: + int(machinename[0]) + machinename="_" + machinename + except: + pass + MachineDico[machinename]={} + MachineDico[machinename]['NAME'] = carray[0][i].strip() + MachineDico[machinename]['ID'] = carray[1][i] + MachineDico[machinename]['EXNAME'] =carray[2][i] + MachineDico[machinename]['NUMBER']=iarray[0][i] + MachineDico[machinename]['P']=rarray[0][i] + MachineDico[machinename]['Q']=rarray[1][i] + MachineDico[machinename]['PMAX']=rarray[3][i] + MachineDico[machinename]['QMAX']=rarray[4][i] + MachineDico[machinename]['PMIN']=rarray[5][i] + MachineDico[machinename]['QMIN']=rarray[6][i] + + #Extract Motors + sid = -1 #all buses + flag = 1 #all in service loads/generators (4 all loads/generators) + + string = ['NUMBER','PSETCODE','BASECODE'] + ierr,iarray = psspy.aindmacint(sid,flag,string) + + string = ['NAME','ID','EXNAME'] + ierr,carray = psspy.aindmacchar(sid,flag,string) + + rstrings = ['psetpoint','mbase','p','q'] + ierr, rarray = psspy.aindmacreal(sid, flag, rstrings) + + + MotorDico = {} # [Bus name, machine ID, extended bus name, bus number] + for i in range(len(iarray[0])): + idname = "Mo" + carray[1][i].strip() +## try: +## idname = "Gr" + str(int(carray[1][i])) +## except: +## idname = "Gr" + carray[1][i] + motorname = carray[0][i].strip()+ "__" + idname + motorname = motorname.replace(" ","_") + motorname = motorname.replace("-","_") + motorname = motorname.replace(".","_") + motorname = motorname.replace("&","and") + try: + int(motorname[0]) + motorname="_" + motorname + except: + pass + MotorDico[motorname]={} + MotorDico[motorname]['NAME'] = carray[0][i].strip() + MotorDico[motorname]['ID'] = carray[1][i] + MotorDico[motorname]['EXNAME'] =carray[2][i] + MotorDico[motorname]['NUMBER']=iarray[0][i] + MotorDico[motorname]['PSETCODE']=iarray[1][i] + MotorDico[motorname]['BASECODE']=iarray[2][i] + MotorDico[motorname]['PSETPOINT']=rarray[0][i] + MotorDico[motorname]['MBASE']=rarray[1][i] + MotorDico[motorname]['P']=rarray[2][i] + MotorDico[motorname]['Q']=rarray[3][i] + + + #Extract Lignes + sid = -1 + owner = 1 + ties = 1 + flag = 2 #6 for two-winding transfos + entry = 1 #each branch once, not both directions + string = ['FROMNUMBER','TONUMBER'] + ierr,iarray = psspy.abrnint(sid,owner,ties,flag,entry,string) + string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] + ierr,carray = psspy.abrnchar(sid,owner,ties,flag,entry,string) + + LineDico = {} #[linename, Bus name 1, Bus name 2, ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] + for i in range(len(iarray[0])): + idname = carray[4][i].strip() + #idname = carray[4][i] + if '@' in idname: + idname = idname.replace('@','Br') + elif '*' in idname: + idname = idname.replace('*','Sw') + else: + try: + idname = 'Li' + str(int(idname)) + except: + idname = 'Li' + idname + linename =carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname + linename = linename.replace(" ","_") + linename = linename.replace("-","_") + linename = linename.replace(".","_") + linename = linename.replace("&","and") + try: + int(linename[0]) + linename="_" + linename + except: + pass + if NoBreakersandSwitches: + if 'Br' not in idname and 'Sw' not in idname: + LineDico[linename]={} + LineDico[linename]['FROMNAME']=carray[0][i].strip() + LineDico[linename]['TONAME']=carray[1][i].strip() + LineDico[linename]['ID']=carray[4][i] + LineDico[linename]['FROMEXNAME']=carray[2][i] + LineDico[linename]['TOEXNAME']=carray[3][i] + LineDico[linename]['FROMNUMBER']=iarray[0][i] + LineDico[linename]['TONUMBER']=iarray[1][i] + + #Extract Branches + sid = -1 + owner = 1 + ties = 1 + flag = 4 # lines & transfos + entry = 1 #each branch once, not both directions + string = ['FROMNUMBER','TONUMBER'] + ierr, iarray = psspy.abrnint(sid, owner, ties, flag, entry, string) + string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] + ierr, carray = psspy.abrnchar(sid, owner, ties, flag, entry, string) + + BranchesDico = {} #[linename, Bus name 1, Bus name 2, ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] + for i in range(len(iarray[0])): + idname = carray[4][i] + if '@' in idname: + idname = idname.replace('@','Br') + elif '*' in idname: + idname = idname.replace('*','Sw') + else: + idname = 'LI' + idname + linename = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname + linename = linename.replace(" ","_") + linename = linename.replace("-","_") + linename = linename.replace(".","_") + linename = linename.replace("&","and") + try: + int(linename[0]) + linename = "_" + linename + except: + pass + if linename[-1] == '_': + linename = linename[:-1] + BranchesDico[linename] = {} + BranchesDico[linename]['FROMNAME'] = carray[0][i].strip() + BranchesDico[linename]['TONAME'] = carray[1][i].strip() + BranchesDico[linename]['ID'] = carray[4][i] + BranchesDico[linename]['FROMEXNAME'] = carray[2][i] + BranchesDico[linename]['TOEXNAME'] = carray[3][i] + BranchesDico[linename]['FROMNUMBER'] = iarray[0][i] + BranchesDico[linename]['TONUMBER'] = iarray[1][i] + + + #Extract Transfos + sid = -1 + owner = 1 + ties = 1 + flag = 6 #two-winding transfos + entry = 1 #each branch once, not both directions + string = ['FROMNUMBER','TONUMBER'] + ierr,iarray = psspy.abrnint(sid,owner,ties,flag,entry,string) + string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] + ierr,carray = psspy.abrnchar(sid,owner,ties,flag,entry,string) + + TfoDico = {} #[linename, Bus name 1, Bus name 2, machine ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] + for i in range(len(iarray[0])): + idname = 'Tr' + carray[4][i].strip() +## try: +## idname = 'Tr' + str(int(carray[4][i])) +## except: +## idname = 'Tr' + carray[4][i] + tfoname = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname + tfoname = tfoname.replace(" ","_") + tfoname = tfoname.replace("-","_") + tfoname = tfoname.replace(".","_") + tfoname = tfoname.replace("&","and") + try: + int(tfoname[0]) + tfoname="_" + tfoname + except: + pass + TfoDico[tfoname]={} + TfoDico[tfoname]['FROMNAME']=carray[0][i].strip() + TfoDico[tfoname]['TONAME']=carray[1][i].strip() + TfoDico[tfoname]['ID']=carray[4][i] + TfoDico[tfoname]['FROMEXNAME']=carray[2][i] + TfoDico[tfoname]['TOEXNAME']=carray[3][i] + TfoDico[tfoname]['FROMNUMBER']=iarray[0][i] + TfoDico[tfoname]['TONUMBER']=iarray[1][i] + TfoDico[tfoname]['#WIND']=2 + + #Extract 3 winding Transfos + sid = -1 #assume a subsystem containing all buses in working case + owner_3flow = 1 #1 = use bus ownership 2 = use tfo ownership + ties_3flow = 3 #ignored bc sid is negative. 3 = interior subsystem and subsystem tie 3 winding transformers + flag=3 #all 3 winding transfo windings + string = ['wind1number','wind2number','wind3number'] + ierr,iarray = psspy.awndint(sid,owner,ties,flag,entry,string) + string = ['wind1name','wind2name','wind3name','wind1exname','wind2exname','wind3exname','id'] + ierr,carray = psspy.awndchar(sid,owner,ties,flag,entry,string) + + #[Bus name 1, Bus name 2, Bus name 3, machine ID, extended bus name 1, extended bus name 2, extended bus name 3, bus number 1, bus number 2, bus number 3] + for i in range(len(iarray[0])): + idname = 'Tr' + carray[6][i].strip() +## try: +## idname = 'Tr' + str(int(carray[4][i])) +## except: +## idname = 'Tr' + carray[4][i] + tfoname = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + carray[2][i].strip() + "__" + idname + tfoname = tfoname.replace(" ","_") + tfoname = tfoname.replace("-","_") + tfoname = tfoname.replace(".","_") + tfoname = tfoname.replace("&","and") + try: + int(tfoname[0]) + tfoname="_" + tfoname + except: + pass + TfoDico[tfoname]={} + TfoDico[tfoname]['FROMNAME']=carray[0][i].strip() + TfoDico[tfoname]['TONAME']=carray[1][i].strip() + TfoDico[tfoname]['3NAME']=carray[2][i].strip() + TfoDico[tfoname]['ID']=carray[6][i] + TfoDico[tfoname]['FROMEXNAME']=carray[3][i] + TfoDico[tfoname]['TOEXNAME']=carray[4][i] + TfoDico[tfoname]['3EXNAME']=carray[5][i] + TfoDico[tfoname]['FROMNUMBER']=iarray[0][i] + TfoDico[tfoname]['TONUMBER']=iarray[1][i] + TfoDico[tfoname]['3NUMBER']=iarray[2][i] + TfoDico[tfoname]['#WIND']=3 + + #print MachineDico, LoadDico, LineDico, TfoDico, MotorDico, BusDico, BranchesDico, BusNominal + return MachineDico, LoadDico, LineDico, TfoDico, MotorDico, BusDico, BranchesDico, BusNominal + + + diff --git a/OldCodes/ProcessOutputs_Eficas/PSEN_Cata_N1.py b/OldCodes/ProcessOutputs_Eficas/PSEN_Cata_N1.py new file mode 100644 index 00000000..b05aea0e --- /dev/null +++ b/OldCodes/ProcessOutputs_Eficas/PSEN_Cata_N1.py @@ -0,0 +1,280 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# -------------------------------------------------- +# debut entete +# -------------------------------------------------- + +#from Accas import ASSD, JDC_CATA, AU_MOINS_UN, PROC, SIMP, FACT, OPER, MACRO, BLOC, A_VALIDATOR +from Accas import * +import opsPSEN_N1 +import pn +# +#class loi ( ASSD ) : pass +#class variable ( ASSD ) : pass +class sd_charge ( ASSD ) : pass +class sd_generateur ( ASSD ) : pass +class sd_ligne ( ASSD ) : pass +class sd_transfo ( ASSD ) : pass +class sd_moteur ( ASSD ) : pass +# + +# import types +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + import types + if type(valeur) == types.StringType: + return None + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + __repr__=info + __str__=info + +# class Matrice: +# def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None): +# self.nbLigs=nbLigs +# self.nbCols=nbCols +# self.methodeCalculTaille=methodeCalculTaille +# self.formatSortie=formatSortie +# self.valSup=valSup +# self.valMin=valMin +# self.structure=structure +# +# def __convert__(self,valeur): +# # Attention ne verifie pas grand chose +# if type(valeur) != types.ListType : +# return None +# return valeur +# +# def info(self): +# return "Matrice %s x %s" % (self.nbLigs, self.nbCols) +# +# __repr__=info +# __str__=info + + +#CONTEXT.debug = 1 +JdC = JDC_CATA ( code = 'PSEN', + execmodul = None, + regles = ( AU_MOINS_UN ( 'CASE_SELECTION', 'CONTINGENCY_PROCESSING' ), + AU_MOINS_UN ( 'CONTINGENCY_SELECTION','N_PROCESSING_OPTIONS','CONTINGENCY_PROCESSING' ), + PRESENT_PRESENT ( 'CONTINGENCY_SELECTION','CONTINGENCY_OPTIONS' ), + PRESENT_PRESENT ( 'CONTINGENCY_PROCESSING','CONTINGENCY_OPTIONS' ), + AU_MOINS_UN ( 'SIMULATION' ), + # AU_PLUS_UN ( 'PSSE_PARAMETERS' ), + AU_PLUS_UN ( 'CASE_SELECTION' ), + AU_PLUS_UN ( 'CONTINGENCY_OPTIONS' ), + AU_PLUS_UN ( 'CONTINGENCY_SELECTION' ), + AU_PLUS_UN ( 'CONTINGENCY_PROCESSING' ), + AU_PLUS_UN ( 'N_PROCESSING_OPTIONS' ), + # AU_PLUS_UN ( 'N_1_LINES' ), + # AU_PLUS_UN ( 'N_1_LOADS' ), + # AU_PLUS_UN ( 'N_1_TRANSFORMERS' ), + + ), + ) # Fin JDC_CATA + +MODIFICATION_CATALOGUE = MACRO ( nom = "MODIFICATION_CATALOGUE", + sd_prod = pn.modification_catalogue, + op_init= pn.modification_catalogue2, + op=None, + UIinfo={"groupes":("CACHE")}, + Fonction=SIMP(statut='o', typ='TXM', into=['ajoutDefinitionMC']), + Etape=SIMP(statut='o', typ='TXM',), + Genea=SIMP(statut='o', typ='TXM', min=0, max='**'), + NomSIMP=SIMP(statut='o', typ='TXM',), + TypeSIMP=SIMP(statut='o', typ='TXM',), + PhraseArguments=SIMP(statut='o', typ='TXM',),) + + +# -------------------------------------------------- +# fin entete +# -------------------------------------------------- +## TODO : RUN +CASE_SELECTION = MACRO ( nom = "CASE_SELECTION", + sd_prod = opsPSEN_N1.INCLUDE, + op_init = opsPSEN_N1.INCLUDE_context, + fichier_ini = 1, + op = None, + fr = "Selectionnez les cas a analyser", + ang = 'Select the cases to analyze', + PSSE_path = SIMP(statut="o",typ='Repertoire',defaut='C:\Program Files (x86)\PTI\PSSE33\PSSBIN'), + output_folder = SIMP(statut="o", typ="Repertoire"), + + + BusesList = SIMP(statut = 'f', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + LinesList = SIMP(statut = 'f', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + TransformersList = SIMP(statut = 'f', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + MaxDepth = SIMP(statut = 'o', typ = 'I', defaut = 5), + OutputNewCsv = SIMP ( statut = "o",typ=bool,defaut=False,), + ) +N_PROCESSING_OPTIONS = PROC ( nom = 'N_PROCESSING_OPTIONS', + op = None, + ang = "Select whether the program should be displaying data about the different categories.\nThe values displayed will be the min, max, and mean of each item, plus a chart.", + Output_bus_values = SIMP(statut = 'o', typ = bool, defaut = True), + Output_lines_values = SIMP(statut = 'o', typ = bool, defaut = True), + Output_transformer_values = SIMP(statut = 'o', typ = bool, defaut = True), + Threshold_selection_for_the_treated_cases = FACT( + statut = 'f', + Branches = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), + Transformers = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), + High_voltage = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), + Low_voltage = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), + ), + ) + + +CONTINGENCY_OPTIONS = PROC (nom = 'CONTINGENCY_OPTIONS', + op = None, + + GeneralOptions = FACT(statut='o', + Vmin = SIMP(statut = 'o', typ = 'R', defaut = 0.9, val_min = 0), + Vmax = SIMP(statut = 'o', typ = 'R', defaut = 1.1, val_min = 0), + ContingencyRate = SIMP(statut = 'o', typ = 'TXM', defaut = 'a', into=['a', 'b']), + FlowLimitLines = SIMP(statut = 'o', typ = 'I', defaut = 120, val_min = 0), + FlowLimitTransformers = SIMP(statut = 'o', typ = 'I', defaut = 120, val_min = 0), + Tolerance = SIMP(statut = 'o', typ = 'R', defaut = 0.5, val_min = 0), + TripLines = SIMP(statut = 'o', typ = bool, defaut = True), + TripTransfos = SIMP(statut = 'o', typ = bool, defaut = True), + TripGenerators = SIMP(statut = 'o', typ = bool, defaut = True), + TripBuses = SIMP(statut = 'o', typ = bool, defaut = False), + ), + + LoadFlowOptions = FACT(statut='o', + AdjustTaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Lock', '1 - Stepping', '2 - Direct'], defaut = '1 - Stepping'), + AdjustDCtaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable'], defaut = '1 - Enable'), + SolutionMethod = SIMP(statut = 'o', typ = 'TXM', into = ['0 - FDNS', '1 - FNSL', '2 - Optimized FDNS'], defaut = '1 - FNSL'), + AdjustSwitchedShunts = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable', '2 - Enable continuous mode'], defaut = '1 - Enable'), + DispatchMode = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Reserve', '2 - Pmax', '3 - Inertia', '4 - Droop'], defaut = '1 - Reserve'), + FlatStart = SIMP(statut = 'o', typ = bool, defaut = False), + VarLimits = SIMP(statut = 'o', typ = 'I', defaut = 99,ang = 'if set to -1, var limits will not be applied'), + ), + +# OutputOptions = FACT(statut='o', +# consigne1 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Output PSSE multiple contingency report to Shell?'), +# MultipleContingencyReport = SIMP(statut = 'o', typ = bool, defaut = True, ang = 'Output PSSE multiple contingency report to Shell?'), +# consigne2 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Write an Excel file for the results of each case file?'), +# WriteIndivExcels = SIMP(statut = 'o', typ = bool, defaut = True), +# consigne3 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Add a tab in Excel results file for the differences between the max flow rate (MVAR) and the actual flow rate in lines and transformers?'), +# WriteFlowDifs = SIMP(statut = 'o', typ = bool, defaut = True), +# ), + ) + + + + +CONTINGENCY_SELECTION = PROC(nom='CONTINGENCY_SELECTION',op = None, + SelectionMethod = SIMP(statut='o',typ='TXM',into=['CaseSelectionFromFile','SelectAllCases','SelectWorstCases'], + ), + + b_file = BLOC(condition="SelectionMethod=='CaseSelectionFromFile'", + CaseSelectionFromFiles = FACT( + statut = 'o', + case = FACT(statut='o',max='**', + case_name=SIMP(statut='o',typ='TXM'), + csv_file= SIMP(statut='o', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)',),),), +# regles=(AU_MOINS_UN('branch_cases','transformer_cases','high_voltage_cases','low_voltage_cases',),), +# branch_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), +# transformer_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde',),), +# high_voltage_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), +# low_voltage_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), + ), + +# CaseSelectionFromFile = FACT( +# statut = 'o', +# input_path = SIMP(statut="o",typ='Repertoire'), +# branch_cases = SIMP(statut='o', typ='TXM'), +# transformer_cases = SIMP(statut='o', typ='TXM'), +# high_cases = SIMP(statut='o', typ='TXM'), +# low_cases = SIMP(statut='o', typ='TXM'), +# ), + + ), + +# b_all = BLOC(condition="SelectionMethod=='SelectAllCases'", +# SelectAllCases = FACT( +# statut='o', +# all_cases = SIMP(statut='o', typ=bool, defaut = True), +# ), +# ), + + b_worst = BLOC(condition="SelectionMethod=='SelectWorstCases'", + SelectWorstCases = FACT( + regles = (AU_MOINS_UN('AvgLineLoad', 'AvgLineLoadPercent','AvgTransformerLoad','AvgTransformerLoadPercent','AvgHighVoltage', 'AvgHighVoltagePercent','AvgLowVoltage', 'AvgLowVoltagePercent'), + EXCLUS('AvgLineLoad', 'AvgLineLoadPercent'),EXCLUS('AvgTransformerLoad','AvgTransformerLoadPercent'),EXCLUS('AvgHighVoltage', 'AvgHighVoltagePercent'),EXCLUS('AvgLowVoltage', 'AvgLowVoltagePercent'),), + statut = 'o', + consigne = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Choose at least one of the potential selection criteria from the SelectWorstCases list on the right.'), + AvgLineLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), + AvgLineLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), + AvgTransformerLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), + AvgTransformerLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), + AvgHighVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), + AvgHighVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), + AvgLowVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), + AvgLowVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), + ), + ), + + + Automatic_N_2_Selection = FACT(statut='f', + + BusesList = SIMP(statut = 'o', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + LinesList = SIMP(statut = 'o', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + TransformersList = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + ), + + MultipleContingencyList = FACT (statut='f', + max="**", + ComponentList=SIMP(statut='o', typ = 'TXM', max='**', homo = 'SansOrdreNiDoublon',), + ), + + ) + +CONTINGENCY_PROCESSING = MACRO ( nom = 'CONTINGENCY_PROCESSING', + sd_prod = opsPSEN_N1.PROCESS, + op_init = opsPSEN_N1.PROCESS_context, + + #sd_prod=None, + + op = None, + fichier_ini = 1, + fr = "", + ang="", + XLS_file = SIMP(statut="o", typ = ('Fichier', 'XLS file (*.xls);;All Files (*)',),), + b_TabList = BLOC(condition="XLS_file != None and XLS_file != ''", + TabList = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), ), + +# b_highVoltage = BLOC(condition="'High Voltage 0' in TabList", +# HighVoltageBuses = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), +# HighVoltageContingencies = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), +# ), + + ) + +Ordre_Des_Commandes = ('CASE_SELECTION' , 'N_PROCESSING_OPTIONS' , 'CONTINGENCY_SELECTION', 'CONTINGENCY_OPTIONS' ,'CONTINGENCY_PROCESSING',) +Classement_Commandes_Ds_Arbre = ('CASE_SELECTION' , 'N_PROCESSING_OPTIONS' , 'CONTINGENCY_SELECTION', 'CONTINGENCY_OPTIONS' ,'CONTINGENCY_PROCESSING',) diff --git a/OldCodes/ProcessOutputs_Eficas/PSEN_Cata_N1.py.ok b/OldCodes/ProcessOutputs_Eficas/PSEN_Cata_N1.py.ok new file mode 100644 index 00000000..f2598161 --- /dev/null +++ b/OldCodes/ProcessOutputs_Eficas/PSEN_Cata_N1.py.ok @@ -0,0 +1,250 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2013 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# -------------------------------------------------- +# debut entete +# -------------------------------------------------- + +#from Accas import ASSD, JDC_CATA, AU_MOINS_UN, PROC, SIMP, FACT, OPER, MACRO, BLOC, A_VALIDATOR +from Accas import * +import opsPSEN_N1 +# +# + +# import types +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + if type(valeur) == types.StringType: + return None + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + __repr__=info + __str__=info + +# class Matrice: +# def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None): +# self.nbLigs=nbLigs +# self.nbCols=nbCols +# self.methodeCalculTaille=methodeCalculTaille +# self.formatSortie=formatSortie +# self.valSup=valSup +# self.valMin=valMin +# self.structure=structure +# +# def __convert__(self,valeur): +# # Attention ne verifie pas grand chose +# if type(valeur) != types.ListType : +# return None +# return valeur +# +# def info(self): +# return "Matrice %s x %s" % (self.nbLigs, self.nbCols) +# +# __repr__=info +# __str__=info + + +#CONTEXT.debug = 1 +JdC = JDC_CATA ( code = 'PSEN', + execmodul = None, + regles = ( AU_MOINS_UN ( 'CASE_SELECTION' ), + # AU_MOINS_UN ( 'DIRECTORY' ), + # AU_MOINS_UN ( 'DISTRIBUTION' ), + # AU_MOINS_UN ( 'SIMULATION' ), + # AU_PLUS_UN ( 'PSSE_PARAMETERS' ), + # AU_PLUS_UN ( 'DIRECTORY' ), + # AU_PLUS_UN ( 'SIMULATION' ), + # AU_PLUS_UN ( 'CORRELATION' ), + # AU_PLUS_UN ( 'N_1_GENERATORS' ), + # AU_PLUS_UN ( 'N_1_LINES' ), + # AU_PLUS_UN ( 'N_1_LOADS' ), + # AU_PLUS_UN ( 'N_1_TRANSFORMERS' ), + + ), + ) # Fin JDC_CATA + + +# -------------------------------------------------- +# fin entete +# -------------------------------------------------- +## TODO : RUN +CASE_SELECTION = MACRO ( nom = "CASE_SELECTION", + sd_prod = opsPSEN_N1.INCLUDE, + op_init = opsPSEN_N1.INCLUDE_context, + fichier_ini = 1, + op = None, + fr = "Sélectionnez les cas à analyser", + ang = 'Select the cases to analyze', + PSSE_path = SIMP(statut="o",typ='Repertoire',defaut='C:\Program Files (x86)\PTI\PSSE33\PSSBIN'), + output_folder = SIMP(statut="o", typ="Repertoire"), + + + BusesList = SIMP(statut = 'f', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + LinesList = SIMP(statut = 'f', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + TransformersList = SIMP(statut = 'f', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + MaxDepth = SIMP(statut = 'o', typ = 'I', defaut = 5), + OutputNewCsv = SIMP ( statut = "o",typ=bool,defaut=False,), + ) +N_PROCESSING_OPTIONS = PROC ( nom = 'N_PROCESSING_OPTIONS', + op = None, + ang = "Select whether the program should be displaying data ablout the different categories. The values displayed will be the min, max, and mean of each item, plus a chart.", + Output_bus_values = SIMP(statut = 'o', typ = bool, defaut = True), + Output_lines_values = SIMP(statut = 'o', typ = bool, defaut = True), + Output_transformer_values = SIMP(statut = 'o', typ = bool, defaut = True), + Threshold_selection_for_the_treated_cases = FACT( + statut = 'f', + Branches = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), + Transformers = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), + High_voltage = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), + Low_voltage = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), + ), + ) + + +CONTINGENCY_OPTIONS = PROC (nom = 'CONTINGENCY_OPTIONS', + op = None, + + GeneralOptions = FACT(statut='o', + Vmin = SIMP(statut = 'o', typ = 'R', defaut = 0.9, val_min = 0), + Vmax = SIMP(statut = 'o', typ = 'R', defaut = 1.1, val_min = 0), + ContingencyRate = SIMP(statut = 'o', typ = 'TXM', defaut = 'a', into=['a', 'b']), + FlowLimitLines = SIMP(statut = 'o', typ = 'I', defaut = 120, val_min = 0), + FlowLimitTransformers = SIMP(statut = 'o', typ = 'I', defaut = 120, val_min = 0), + Tolerance = SIMP(statut = 'o', typ = 'R', defaut = 0.5, val_min = 0), + TripLines = SIMP(statut = 'o', typ = bool, defaut = True), + TripTransfos = SIMP(statut = 'o', typ = bool, defaut = True), + TripGenerators = SIMP(statut = 'o', typ = bool, defaut = True), + ), + + LoadFlowOptions = FACT(statut='o', + AdjustTaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Lock', '1 - Stepping', '2 - Direct'], defaut = '1 - Stepping'), + AdjustDCtaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable'], defaut = '1 - Enable'), + SolutionMethod = SIMP(statut = 'o', typ = 'TXM', into = ['0 - FDNS', '1 - FNSL', '2 - Optimized FDNS'], defaut = '1 - FNSL'), + AdjustSwitchedShunts = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable', '2 - Enable continuous mode'], defaut = '1 - Enable'), + DispatchMode = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Reserve', '2 - Pmax', '3 - Inertia', '4 - Droop'], defaut = '1 - Reserve'), + FlatStart = SIMP(statut = 'o', typ = bool, defaut = False), + VarLimits = SIMP(statut = 'o', typ = 'I', defaut = 99,ang = 'if set to -1, var limits will not be applied'), + ), + + OutputOptions = FACT(statut='o', + consigne1 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Output PSSE multiple contingency report to Shell?'), + MultipleContingencyReport = SIMP(statut = 'o', typ = bool, defaut = True, ang = 'Output PSSE multiple contingency report to Shell?'), + consigne2 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Write an Excel file for the results of each case file?'), + WriteIndivExcels = SIMP(statut = 'o', typ = bool, defaut = True), + consigne3 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Add a tab in Excel results file for the differences between the max flow rate (MVAR) and the actual flow rate in lines and transformers?'), + WriteFlowDifs = SIMP(statut = 'o', typ = bool, defaut = True), + ), + ) + + + + +CONTINGENCY_SELECTION = PROC(nom='CONTINGENCY_SELECTION',op = None, + SelectionMethod = SIMP(statut='o',typ='TXM',into=['CaseSelectionFromFile','SelectAllCases','SelectWorstCases'], + ), + + b_file = BLOC(condition="SelectionMethod=='CaseSelectionFromFile'", + CaseSelectionFromFiles = FACT( + statut = 'o', + regles=(AU_MOINS_UN('branch_cases','transformer_cases','high_voltage_cases','low_voltage_cases',),), + branch_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), + transformer_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde',),), + high_voltage_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), + low_voltage_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), + ), + +# CaseSelectionFromFile = FACT( +# statut = 'o', +# input_path = SIMP(statut="o",typ='Repertoire'), +# branch_cases = SIMP(statut='o', typ='TXM'), +# transformer_cases = SIMP(statut='o', typ='TXM'), +# high_cases = SIMP(statut='o', typ='TXM'), +# low_cases = SIMP(statut='o', typ='TXM'), +# ), + + ), + +# b_all = BLOC(condition="SelectionMethod=='SelectAllCases'", +# SelectAllCases = FACT( +# statut='o', +# all_cases = SIMP(statut='o', typ=bool, defaut = True), +# ), +# ), + + b_worst = BLOC(condition="SelectionMethod=='SelectWorstCases'", + SelectWorstCases = FACT( + regles = (UN_PARMI('AvgBranchLoad', 'AvgBranchLoadPercent'), UN_PARMI('AvgTransformerLoad', 'AvgTransformerLoadPercent'), UN_PARMI('AvgHighVoltage', 'AvgHighVoltagePercent'), UN_PARMI('AvgLowVoltage', 'AvgLowVoltagePercent'),), + statut = 'o', + consigne = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Choose at least one of the potential selection criteria from the SelectWorstCases list on the right.'), + AvgBranchLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), + AvgBranchLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), + AvgTransformerLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), + AvgTransformerLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), + AvgHighVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), + AvgHighVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), + AvgLowVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), + AvgLowVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), + ), + ), + + + Automatic_N_2_Selection = FACT(statut='f', + + BusesList = SIMP(statut = 'o', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + LinesList = SIMP(statut = 'o', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + TransformersList = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + ), + + MultipleContingencyList = FACT (statut='f', + max="**", + ComponentList=SIMP(statut='o', typ = 'TXM', max='**', homo = 'SansOrdreNiDoublon',), + ), + + ) + +CONTINGENCY_PROCESSING = MACRO ( nom = 'CONTINGENCY_PROCESSING', + sd_prod = opsPSEN_N1.PROCESS, + op_init = opsPSEN_N1.PROCESS_context, + + #sd_prod=None, + + op = None, + fichier_ini = 1, + fr = "", + ang="", + XLS_file = SIMP(statut="o", typ = ('Fichier', 'XLS file (*.xls);;All Files (*)',),), + TabList = SIMP(statut = 'f', typ = 'TXM', min = 0, max = '**', homo = 'SansOrdreNiDoublon'), + +# b_highVoltage = BLOC(condition="'High Voltage 0' in TabList", +# HighVoltageBuses = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), +# HighVoltageContingencies = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), +# ), + + ) + +Ordre_Des_Commandes = ('CASE_SELECTION' , 'N_PROCESSING_OPTIONS' , 'CONTINGENCY_OPTIONS' , 'CONTINGENCY_SELECTION',) diff --git a/OldCodes/ProcessOutputs_Eficas/ProcessOutputs_Cata.py b/OldCodes/ProcessOutputs_Eficas/ProcessOutputs_Cata.py new file mode 100644 index 00000000..253232f6 --- /dev/null +++ b/OldCodes/ProcessOutputs_Eficas/ProcessOutputs_Cata.py @@ -0,0 +1,240 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# -------------------------------------------------- +# debut entete +# -------------------------------------------------- + +from Accas import * +import opsPSEN_N1 +import pn +# + +# import types +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + import types + if type(valeur) == types.StringType: + return None + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + __repr__=info + __str__=info + + +#CONTEXT.debug = 1 +JdC = JDC_CATA ( code = 'PSEN', + execmodul = None, + regles = ( AU_MOINS_UN ( 'CASE_SELECTION', 'CONTINGENCY_PROCESSING' ), + AU_MOINS_UN ( 'CONTINGENCY_SELECTION','N_PROCESSING_OPTIONS','CONTINGENCY_PROCESSING' ), + PRESENT_PRESENT ( 'CONTINGENCY_SELECTION','CONTINGENCY_OPTIONS' ), + # AU_MOINS_UN ( 'SIMULATION' ), + # AU_PLUS_UN ( 'PSSE_PARAMETERS' ), + AU_PLUS_UN ( 'CASE_SELECTION' ), + AU_PLUS_UN ( 'CONTINGENCY_OPTIONS' ), + AU_PLUS_UN ( 'CONTINGENCY_SELECTION' ), + AU_PLUS_UN ( 'CONTINGENCY_PROCESSING' ), + AU_PLUS_UN ( 'N_PROCESSING_OPTIONS' ), + # AU_PLUS_UN ( 'N_1_LINES' ), + # AU_PLUS_UN ( 'N_1_LOADS' ), + # AU_PLUS_UN ( 'N_1_TRANSFORMERS' ), + + ), + ) # Fin JDC_CATA + +MODIFICATION_CATALOGUE = MACRO ( nom = "MODIFICATION_CATALOGUE", + sd_prod = pn.modification_catalogue, + op_init= pn.modification_catalogue2, + op=None, + UIinfo={"groupes":("CACHE")}, + Fonction=SIMP(statut='o', typ='TXM', into=['ajoutDefinitionMC']), + Etape=SIMP(statut='o', typ='TXM',), + Genea=SIMP(statut='o', typ='TXM', min=0, max='**'), + NomSIMP=SIMP(statut='o', typ='TXM',), + TypeSIMP=SIMP(statut='o', typ='TXM',), + PhraseArguments=SIMP(statut='o', typ='TXM',), +) +# -------------------------------------------------- +# fin entete +# -------------------------------------------------- +## TODO : RUN +CASE_SELECTION = MACRO ( nom = "CASE_SELECTION", + sd_prod = opsPSEN_N1.INCLUDE, + op_init = opsPSEN_N1.INCLUDE_context, + fichier_ini = 1, + op = None, + fr = "Sélectionnez les cas à analyser", + ang = 'Select the cases to analyze', + PSSE_path = SIMP(statut="o",typ='Repertoire',defaut='C:\Program Files (x86)\PTI\PSSE33\PSSBIN'), + output_folder = SIMP(statut="o", typ="Repertoire"), + + + BusesList = SIMP(statut = 'f', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + LinesList = SIMP(statut = 'f', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + TransformersList = SIMP(statut = 'f', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + MaxDepth = SIMP(statut = 'o', typ = 'I', defaut = 5), + OutputNewCsv = SIMP ( statut = "o",typ=bool,defaut=False,), + ) +N_PROCESSING_OPTIONS = PROC ( nom = 'N_PROCESSING_OPTIONS', + op = None, + ang = "Select whether the program should be displaying data about the different categories.\nThe values displayed will be the min, max, and mean of each item, plus a chart.", + Output_bus_values = SIMP(statut = 'o', typ = bool, defaut = True), + Output_lines_values = SIMP(statut = 'o', typ = bool, defaut = True), + Output_transformer_values = SIMP(statut = 'o', typ = bool, defaut = True), + Threshold_selection_for_the_treated_cases = FACT( + statut = 'f', + Branches = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), + Transformers = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), + High_voltage = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), + Low_voltage = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), + ), + ) + + +CONTINGENCY_OPTIONS = PROC (nom = 'CONTINGENCY_OPTIONS', + op = None, + + GeneralOptions = FACT(statut='o', + Vmin = SIMP(statut = 'o', typ = 'R', defaut = 0.9, val_min = 0), + Vmax = SIMP(statut = 'o', typ = 'R', defaut = 1.1, val_min = 0), + ContingencyRate = SIMP(statut = 'o', typ = 'TXM', defaut = 'a', into=['a', 'b']), + FlowLimitLines = SIMP(statut = 'o', typ = 'I', defaut = 120, val_min = 0), + FlowLimitTransformers = SIMP(statut = 'o', typ = 'I', defaut = 120, val_min = 0), + Tolerance = SIMP(statut = 'o', typ = 'R', defaut = 0.5, val_min = 0), + TripLines = SIMP(statut = 'o', typ = bool, defaut = True), + TripTransfos = SIMP(statut = 'o', typ = bool, defaut = True), + TripGenerators = SIMP(statut = 'o', typ = bool, defaut = True), + ), + + LoadFlowOptions = FACT(statut='o', + AdjustTaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Lock', '1 - Stepping', '2 - Direct'], defaut = '1 - Stepping'), + AdjustDCtaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable'], defaut = '1 - Enable'), + SolutionMethod = SIMP(statut = 'o', typ = 'TXM', into = ['0 - FDNS', '1 - FNSL', '2 - Optimized FDNS'], defaut = '1 - FNSL'), + AdjustSwitchedShunts = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable', '2 - Enable continuous mode'], defaut = '1 - Enable'), + DispatchMode = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Reserve', '2 - Pmax', '3 - Inertia', '4 - Droop'], defaut = '1 - Reserve'), + FlatStart = SIMP(statut = 'o', typ = bool, defaut = False), + VarLimits = SIMP(statut = 'o', typ = 'I', defaut = 99,ang = 'if set to -1, var limits will not be applied'), + ), + +# OutputOptions = FACT(statut='o', +# consigne1 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Output PSSE multiple contingency report to Shell?'), +# MultipleContingencyReport = SIMP(statut = 'o', typ = bool, defaut = True, ang = 'Output PSSE multiple contingency report to Shell?'), +# consigne2 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Write an Excel file for the results of each case file?'), +# WriteIndivExcels = SIMP(statut = 'o', typ = bool, defaut = True), +# consigne3 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Add a tab in Excel results file for the differences between the max flow rate (MVAR) and the actual flow rate in lines and transformers?'), +# WriteFlowDifs = SIMP(statut = 'o', typ = bool, defaut = True), +# ), + ) + + + + +CONTINGENCY_SELECTION = PROC(nom='CONTINGENCY_SELECTION',op = None, + SelectionMethod = SIMP(statut='o',typ='TXM',into=['CaseSelectionFromFile','SelectAllCases','SelectWorstCases'], + ), + + b_file = BLOC(condition="SelectionMethod=='CaseSelectionFromFile'", + CaseSelectionFromFiles = FACT( + statut = 'o', + case = FACT(statut='o',max='**', + case_name=SIMP(statut='o',typ='TXM'), + csv_file= SIMP(statut='o', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)',),),), +# regles=(AU_MOINS_UN('branch_cases','transformer_cases','high_voltage_cases','low_voltage_cases',),), +# branch_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), +# transformer_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde',),), +# high_voltage_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), +# low_voltage_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), + ), +# ', +# CaseSelectionFromFile = FACT( +# statut = 'o', +# input_path = SIMP(statut="o",typ='Repertoire'), +# branch_cases = SIMP(statut='o', typ='TXM'), +# transformer_cases = SIMP(statut='o', typ='TXM'), +# high_cases = SIMP(statut='o', typ='TXM'), +# low_cases = SIMP(statut='o', typ='TXM'), +# ), + + ), + +# b_all = BLOC(condition="SelectionMethod=='SelectAllCases'", +# SelectAllCases = FACT( +# statut='o', +# all_cases = SIMP(statut='o', typ=bool, defaut = True), +# ), +# ), + + b_worst = BLOC(condition="SelectionMethod=='SelectWorstCases'", + SelectWorstCases = FACT( + regles = (AU_MOINS_UN('AvgBranchLoad', 'AvgBranchLoadPercent','AvgTransformerLoad','AvgTransformerLoadPercent','AvgHighVoltage', 'AvgHighVoltagePercent','AvgLowVoltage', 'AvgLowVoltagePercent'), + EXCLUS('AvgBranchLoad', 'AvgBranchLoadPercent'),EXCLUS('AvgTransformerLoad','AvgTransformerLoadPercent'),EXCLUS('AvgHighVoltage', 'AvgHighVoltagePercent'),EXCLUS('AvgLowVoltage', 'AvgLowVoltagePercent'),), + statut = 'o', + consigne = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Choose at least one of the potential selection criteria from the SelectWorstCases list on the right.'), + AvgBranchLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), + AvgBranchLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), + AvgTransformerLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), + AvgTransformerLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), + AvgHighVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), + AvgHighVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), + AvgLowVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), + AvgLowVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), + ), + ), + + + Automatic_N_2_Selection = FACT(statut='f', + + BusesList = SIMP(statut = 'o', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + LinesList = SIMP(statut = 'o', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + TransformersList = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + ), + + MultipleContingencyList = FACT (statut='f', + max="**", + ComponentList=SIMP(statut='o', typ = 'TXM', max='**', homo = 'SansOrdreNiDoublon',), + ), + + ) + +CONTINGENCY_PROCESSING = MACRO ( nom = 'CONTINGENCY_PROCESSING', + sd_prod = opsPSEN_N1.PROCESS, + op_init = opsPSEN_N1.PROCESS_context, + op = None, + fichier_ini = 1, + fr = "", + ang="", + XLS_file = SIMP(statut="f", typ = ('Fichier', 'XLS file (*.xls);;All Files (*)',),), + b_TabList = BLOC(condition="XLS_file != None and XLS_file != ''", + TabList = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), + + ), + + ) + +Ordre_Des_Commandes = ('CASE_SELECTION' , 'N_PROCESSING_OPTIONS' , 'CONTINGENCY_SELECTION', 'CONTINGENCY_OPTIONS' ,'CONTINGENCY_PROCESSING',) +Classement_Commandes_Ds_Arbre = ('CASE_SELECTION' , 'N_PROCESSING_OPTIONS' , 'CONTINGENCY_SELECTION', 'CONTINGENCY_OPTIONS' ,'CONTINGENCY_PROCESSING',) diff --git a/OldCodes/ProcessOutputs_Eficas/configuration_PSEN_N1.py b/OldCodes/ProcessOutputs_Eficas/configuration_PSEN_N1.py new file mode 100644 index 00000000..e17d4912 --- /dev/null +++ b/OldCodes/ProcessOutputs_Eficas/configuration_PSEN_N1.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== +""" + Ce module sert pour charger les paramètres de configuration d'EFICAS +""" +# Modules Python +from InterfaceQT4 import configuration +import os + + +class CONFIG(configuration.CONFIG_BASE): + ## test + #----------------------------------- + def __init__(self,appli,repIni): + #----------------------------------- + + self.labels_user=['catalogues','lang'] + self.labels_eficas=['lang','rep_cata','catalogues','affiche'] + + configuration.CONFIG_BASE.__init__(self,appli,'.Eficas_monCode') + + +def make_config(appli,rep): + return CONFIG(appli,rep) + diff --git a/OldCodes/ProcessOutputs_Eficas/mesScripts_PSEN_N1.py b/OldCodes/ProcessOutputs_Eficas/mesScripts_PSEN_N1.py new file mode 100644 index 00000000..12bf5db9 --- /dev/null +++ b/OldCodes/ProcessOutputs_Eficas/mesScripts_PSEN_N1.py @@ -0,0 +1,23 @@ +def EficasProcessXLS(listeparam) : + print "dans processXLS" + item=listeparam[0] + dico=item.process_N1() + print dico + + print "version pour Pascale --> decommenter les 2 lignes suivantes pour Laura" + #from Processor import processXLS + #processXLS(dico) + + +# le dictionnaire des commandes a la structure suivante : +# la clef est la commande qui va proposer l action +# puis un tuple qui contient +# - la fonction a appeler +# - le label dans le menu du clic droit +# - un tuple contenant les parametres attendus par la fonction +# - appelable depuis Salome uniquement -) +# - appelable depuis un item valide uniquement +# - toolTip +dict_commandes={ + 'CONTINGENCY_PROCESSING': ( (EficasProcessXLS,"process",('editor','item',),False,True,"process values "),), + } diff --git a/OldCodes/ProcessOutputs_Eficas/opsPSEN_N1.py b/OldCodes/ProcessOutputs_Eficas/opsPSEN_N1.py new file mode 100644 index 00000000..dd0ec57d --- /dev/null +++ b/OldCodes/ProcessOutputs_Eficas/opsPSEN_N1.py @@ -0,0 +1,195 @@ + +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +from ExtractGeneratorLoadLineandTransfoDicoProcess import * +import os + +path1 = os.path.abspath(os.path.join(os.path.abspath(__file__), '../','TreatOutputs')) +sys.path.append(path1) +import Options + +def INCLUDE(self,PSSE_path,**args): + """ + Fonction sd_prod pour la macro INCLUDE + """ + CaseFolder = args['output_folder'] + Options.RecursiveDepth = args['MaxDepth'] + if CaseFolder==None: + return + reevalue=0 + if hasattr(self,'fichier_ini'): + reevalue=1 + if self.fichier_ini == CaseFolder : return + if hasattr(self,'old_context_fichier_init' ): + for concept in self.old_context_fichier_init.values(): + self.jdc.delete_concept(concept) + self.jdc_aux=None + self.contexte_fichier_init={} + self.reevalue_sd_jdc() + self.jdc.reset_context() + + self.fichier_ini=CaseFolder + self.contexte_fichier_init = {} + self.fichier_unite = 999 + self.fichier_err = None + self.fichier_text="" + + unite = 999 + + CaseFile = '' + FolderList = os.listdir(CaseFolder) + for folder in FolderList: + if folder[0:7] == 'package' or folder[0:4]== 'core': + # Get BaseCase.sav inside the first package folder we find + FolderContents = os.listdir(os.path.join(CaseFolder, folder)) + for file in FolderContents: + if file == 'BaseCase.sav': + CaseFile = os.path.join(os.path.join(CaseFolder, folder), file) + break + break + + + #try: + if 1 : + BusList, LinesList, TransfosList = getNominalkV(CaseFile) + #print "version en dur : decommenter la ligne suivante" + #getTrueLines(CaseFile) + #except Exception, e: + # exc_type, exc_obj, exc_tb = sys.exec_info() + # print(e) + # print(exc_type, exc_tb.tb_lineno) + + + for e in self.jdc.etapes: + if e.nom == 'CASE_SELECTION' : + etape=e + break + self.jdc.editor.changeIntoMC(e, 'BusesList', BusList) + self.jdc.editor.changeIntoMC(e, 'LinesList', LinesList) + self.jdc.editor.changeIntoMC(e, 'TransformersList', TransfosList) + + self.jdc.editor.changeIntoDefMC('CONTINGENCY_SELECTION', ('Automatic_N_2_Selection', 'BusesList'), BusList) + self.jdc.editor.changeIntoDefMC('CONTINGENCY_SELECTION', ('Automatic_N_2_Selection', 'LinesList'), LinesList) + self.jdc.editor.changeIntoDefMC('CONTINGENCY_SELECTION', ('Automatic_N_2_Selection', 'TransformersList'), TransfosList) + + + try: + print "version en dur : decommenter la ligne suivante" + #a = updateConts() + self.jdc.editor.changeIntoDefMC('CONTINGENCY_SELECTION', ('MultipleContingencyList', 'ComponentList'), Options.ContFullList) + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exec_info() + print(e) + print(exc_type, exc_tb.tb_lineno) + + + + + +def INCLUDE_context(self,d): + """ + Fonction op_init pour macro INCLUDE + """ + for k,v in self.g_context.items(): + d[k]=v + + +def PROCESS_context(self,d): + print "dans le init du Process" + if self.get_child('XLS_file').valeur == "" or self.get_child('XLS_file').valeur== None : return + self.OngletsSelectionnes= self.get_child('b_TabList').get_child('TabList').valeur + print "fin de PROCESS_context" + +def PROCESS(self,XLS_file,**args): + + # self = Accas.A_MACRO_ETAPE.MACRO_ETAPE + self.sauve_args=args + if XLS_file == "" or XLS_file == None: return + #print XLS_file + #Storage.csvFileName = XLS_file + # c est la premiere fois + + if not (hasattr(self,'sheets')) : + #print 'attention en dur' + #from Processor_Storage import * + #print getSheets + #getSheets() + #ComponentList, ContingencyList = getComponentandContingencyList(Storage.sheets[0]) + #print ComponentList + #print ContingencyList + #Storage.selectedDoubleRow[Storage.sheets[0]]=['PV MATIMBA'] + #Storage.selectedDoubleCol[Storage.sheets[0]]=['MAZENOD_MHDAM_LI1_'] + #self.jdc.editor.changeIntoMC(self,'TabList',Storage.sheets) + #self.sheets=Storage.sheets + #self.OngletsValeurs=[] + + from Processor import getXLSinfo + self.sheets = getXLSinfo(XLS_file) + self.jdc.editor.changeIntoMC(self,'TabList',self.sheets.keys(),('b_TabList',)) + + self.MCAjoutes=[] + self.OngletsSelectionnes=[] + + else : + # On a selectionne un onglet + # On teste si on a modifie la liste des onglets + + nouveauxOngletsSelectionnes= self.get_child('b_TabList').get_child('TabList').valeur + if nouveauxOngletsSelectionnes==self.OngletsSelectionnes : return + if nouveauxOngletsSelectionnes==() or nouveauxOngletsSelectionnes == [] : + for MC in self.MCAjoutes : self.jdc.editor.deleteMC(self,MC,('b_TabList',)) + self.MCAjoutes=[] + self.OngletsSelectionnes=[] + self.jdc.editor.fenetreCentraleAffichee.reaffiche() + return + + for Onglet in nouveauxOngletsSelectionnes: + if Onglet in self.OngletsSelectionnes : continue + + MCFils='Component_List_For_'+Onglet + monInto=self.sheets[Onglet][0] + self.jdc.editor.ajoutDefinitionMC('CONTINGENCY_PROCESSING',('b_TabList',),MCFils,'TXM',min=0, max='**', into=monInto, homo= 'SansOrdreNiDoublon') + self.jdc.editor.ajoutMC(self,MCFils,[],('b_TabList',)) + self.MCAjoutes.append(MCFils) + + MCFils='Contingency_List_For_'+Onglet + monInto=self.sheets[Onglet][1] + self.jdc.editor.ajoutDefinitionMC('CONTINGENCY_PROCESSING',('b_TabList',),MCFils,'TXM',min=0, max='**', into=monInto, homo= 'SansOrdreNiDoublon') + self.jdc.editor.ajoutMC(self,MCFils,[],('b_TabList',)) + self.MCAjoutes.append(MCFils) + + + for Onglet in self.OngletsSelectionnes: + if Onglet in nouveauxOngletsSelectionnes : continue + + MCFils='Contingency_List_For_'+Onglet + self.jdc.editor.deleteMC(self,MCFils,('b_TabList',)) + self.jdc.editor.deleteDefinitionMC('CONTINGENCY_PROCESSING',('b_TabList',),MCFils) + self.MCAjoutes.remove(MCFils) + + MCFils='Component_List_For_'+Onglet + self.jdc.editor.deleteMC(self,MCFils,('b_TabList',)) + self.jdc.editor.deleteDefinitionMC('CONTINGENCY_PROCESSING',('b_TabList',),MCFils) + self.MCAjoutes.remove(MCFils) + + self.OngletsSelectionnes=nouveauxOngletsSelectionnes + self.jdc.editor.fenetreCentraleAffichee.reaffiche() + diff --git a/OldCodes/ProcessOutputs_Eficas/prefs.py b/OldCodes/ProcessOutputs_Eficas/prefs.py new file mode 100644 index 00000000..58beb3b1 --- /dev/null +++ b/OldCodes/ProcessOutputs_Eficas/prefs.py @@ -0,0 +1,22 @@ +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +code="PSEN_N1" +import sys, os +if os.path.dirname(os.path.abspath(__file__)) not in sys.path : + sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/OldCodes/ProcessOutputs_Eficas/prefs_PSEN_N1.py b/OldCodes/ProcessOutputs_Eficas/prefs_PSEN_N1.py new file mode 100644 index 00000000..ffebe865 --- /dev/null +++ b/OldCodes/ProcessOutputs_Eficas/prefs_PSEN_N1.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +import os,sys +# repIni sert a localiser le fichier editeur.ini +# Obligatoire +repIni=os.path.dirname(os.path.abspath(__file__)) +INSTALLDIR=os.path.join(repIni,'..') +sys.path[:0]=[INSTALLDIR] + + +# lang indique la langue utilisee pour les chaines d'aide : fr ou ang +lang='en' #'fr' + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +encoding='iso-8859-1' +docPath=repIni + +affiche='ordre' + +# +catalogues=( + ('PSEN_N1','default',os.path.join(repIni,'PSEN_Cata_N1.py'),'ProcessOutputs','python'), +) diff --git a/OldCodes/ProcessOutputs_Eficas/properties.py b/OldCodes/ProcessOutputs_Eficas/properties.py new file mode 100644 index 00000000..1d328a46 --- /dev/null +++ b/OldCodes/ProcessOutputs_Eficas/properties.py @@ -0,0 +1,24 @@ +#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR +# RESPONSABLE D6BHHHH J-P.LEFEBVRE +# ====================================================================== +# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# ====================================================================== +# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR +# DE LA VERSION DU CODE_ASTER ASSOCIE +#---------------------------------------------------------------------- +version = "1.2" +date = "25/05/2010" +exploit = False diff --git a/OldCodes/ProcessOutputs_Eficas/qtEficas_PSEN_N1.py b/OldCodes/ProcessOutputs_Eficas/qtEficas_PSEN_N1.py new file mode 100755 index 00000000..fea22342 --- /dev/null +++ b/OldCodes/ProcessOutputs_Eficas/qtEficas_PSEN_N1.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour Code_Aster +""" +# Modules Python +# Modules Eficas + +import sys,os +#sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) +import prefs +name='prefs_'+prefs.code +__import__(name) + +#acceder scripts de Lucie +path1 = os.path.abspath(os.path.join(os.path.abspath(__file__),'TreatOutputs')) +path1 = 'C:\\Logiciels DER\\PSEN_V15\\Code\\ProcessOutputs_Eficas\TreatOutputs' +sys.path.append(path1) + +print ('kjlkjlkjkl') +print ('kjlkjlkjkl') +print ('kjlkjlkjkl') +print ('kjlkjlkjkl') +print ('kjlkjlkjkl') +print ('kjlkjlkjkl') +print ('kjlkjlkjkl') + +from InterfaceQT4 import eficas_go +if __name__ == '__main__': eficas_go.lance_eficas(code=prefs.code) diff --git a/OldCodes/SPECA/SPECA_Cata_V1.py b/OldCodes/SPECA/SPECA_Cata_V1.py new file mode 100644 index 00000000..72771cf5 --- /dev/null +++ b/OldCodes/SPECA/SPECA_Cata_V1.py @@ -0,0 +1,542 @@ +## -*- coding: utf-8 -*- +# +## -------------------------------------------------- +## debut entete +## -------------------------------------------------- +# +from Accas import * + + +# rend disponible le type tuple (liste) +import types +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + if type(valeur) == types.StringType: + return None + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + __repr__=info + __str__=info + + + +# +#CONTEXT.debug = 1 + +VERSION_CATALOGUE="2.0.0"; + +JdC = JDC_CATA ( code = 'SPECA', + execmodul = None, + regles=(AU_MOINS_UN('SPECIFICATION_ANALYSE',), + AU_PLUS_UN('SPECIFICATION_ANALYSE',), + ), + )# Fin JDC_CATA + +## ----- SPECIFICATION DE L'ETUDE ----- ## +SPECIFICATION_ANALYSE= MACRO (nom = 'SPECIFICATION_ANALYSE', + op = None, + UIinfo = {"groupes":("Machine tournante",)}, + fr = "Specification des analyses", + TYPE_ANALYSE = SIMP(statut='o', typ='TXM',into=('STATIQUE', 'MODALE', 'HARMONIQUE', 'TRANSITOIRE', 'TRANSITOIRE_ACCIDENTEL','SYNTHESE')), + # pour V1.1 flexion uniquement + TYPE_COMPORTEMENT = BLOC(condition = "TYPE_ANALYSE in ('MODALE','HARMONIQUE','STATIQUE','TRANSITOIRE','TRANSITOIRE_ACCIDENTEL','SYNTHESE')", + FLEXION = SIMP(statut='o',typ='TXM',into=('OUI',),defaut='OUI',fr="Inclure la flexion ?"), + TORSION = SIMP(statut='f',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Inclure la torsion ?"), + COMPRESSION = SIMP(statut='f',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Inclure la compression ?"), + ), +### ----- CALCUL STATIQUE ----- ## + ANALYSE_STATIQUE = BLOC(condition = "TYPE_ANALYSE == 'STATIQUE' ", + + POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), + CHARGES = SIMP(statut='o',typ='TXM',into=('DELIGNAGE','FORCE','AUCUNE'),defaut=None,fr="Choix d'application d'une charge"), + DELIGNAGE = BLOC(condition = "CHARGES == 'DELIGNAGE' ",fr="Application d'un delignage", + PARAM_DELIGNAGE = FACT(statut='o',min=1,max='**',fr="Parametres du delignage", + NOM_PALIER = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom d'un palier deligne"), + #VALEURS = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des valeurs du delignage du palier"), + DX = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du DX du delignage du palier"), + DY = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du DY du delignage du palier"), + ), # fin PARAM_DELIGNAGE + ), # fin DELIGNAGE + # min=1,max=2, + FORCE = BLOC(condition = "CHARGES == 'FORCE' ",fr="Application d'une force", + PARAM_FORCE = FACT(statut='o',min=1,max='**',fr="Parametres de la force", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la coordonnee de la force"), + MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement de la magnitude de la force"), + FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), + ), # fin PARAM_FORCE + ), # fin FORCE + ## fin specification calcul statique + + ## POST-TRAITEMENTS DU CALCUL STATIQUE + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Choix du type de post-traitement", + TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','REAC_NODA','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), + DEPL = BLOC(condition="TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement",regles=UN_PARMI('POSITION','PALIER'), + POSITION = SIMP(statut='f',typ='R',defaut=None,fr="Renseignement de la coordonnee du deplacement"), + PALIER = SIMP(statut='f',max='**',typ='TXM',defaut=None,fr="Renseignement du nom du palier"), + ), # fin DEPL + CONTRAINTES = BLOC(condition="TYPE == 'CONTRAINTES' ",fr="Contraintes",regles=UN_PARMI('POSITION','ZONE','TOUT'), + POSITION = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), + ZONE = SIMP(statut='f',typ='TXM',defaut=None,fr="Renseignement de la zone de la contrainte"), + TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),fr="Choix de toutes les containtes"), + ), # fin CONTRAINTES + #REAC_NODA = BLOC(condition="TYPE == 'REAC_NODA' ", fr="Reaction nodale",regles=UN_PARMI('POSITION','ZONE','TOUT'), + #REAC_NODA = BLOC(condition="TYPE == 'REAC_NODA' ", fr="Reaction nodale",regles=UN_PARMI('POSITION','TOUT'), + REAC_NODA = BLOC(condition="TYPE == 'REAC_NODA' ", fr="Reaction nodale",regles=UN_PARMI('POSITION','PALIER'), + POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la reaction"), + #ZONE = SIMP(statut='f',typ='TXM',defaut=None,fr="Renseignement de l'etiquette de la zone de la reaction"), + PALIER = SIMP(statut='f',max='**',typ='TXM',defaut=None,fr="Renseignement du nom du palier"), + ), # fin REAC_NODA + ), # fin POST_TRAITEMENT + ## fin bloc POST_TRAITEMENTS + + ),# fin ANALYSE_STATIQUE + +### ----- CALCUL MODALE ----- ## + ANALYSE_MODALE = BLOC(condition = "TYPE_ANALYSE == 'MODALE' ", + BASE_CALCUL = SIMP(statut='o',typ="TXM",into=('MODALE','PHYSIQUE'),defaut=None,fr="Choix de la base du calcul modal"), + BASE_MODALE = BLOC(condition="BASE_CALCUL=='MODALE'",fr="Calcul sur base modale", + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES=SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de mode"), + FREQ_MAX=SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale"), + ), # fin BASE_MODALE + AMORTISSEMENT = SIMP(statut='o',typ='TXM',min=1,max=1,into=('OUI','NON'),defaut='OUI',fr="Choix de prise en compte de l'amortissment"), + GYROSCOPIE = SIMP(statut='o',typ='TXM',min=1,max=1,into=('OUI','NON'),defaut='OUI',fr="Choix de prise en compte de la gyroscopie"), + VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste des vitesses de rotation (tr/min)"), + OPTION_CALCUL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('PLUS_PETITE','CENTRE'),defaut=None,fr="Choix de l'option de calcul"), + # 20121018 EDF demande de retirer cette option : l'option bande ne fonctionne pas avec MODE_ITER_SIMULT + #OPTION_CALCUL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('BANDE','PLUS_PETITE','CENTRE'),defaut=None,fr="Choix de l'option de calcul"), + #BANDE = BLOC(condition="OPTION_CALCUL=='BANDE'",fr="Option BANDE", + # FREQ_MIN = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence minimale (Hz)"), + # FREQ_MAX = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale (Hz)"), + #), # fin BANDE + PLUS_PETITE = BLOC(condition="OPTION_CALCUL=='PLUS_PETITE'",fr="Option PLUS_PETITE", + NMAX_FREQ = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre maximal de frequence"), + ), # fin PLUS_PETITE + CENTRE = BLOC(condition="OPTION_CALCUL=='CENTRE'",fr="Option CENTRE", + FREQ = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence centrale (Hz)"), + NMAX_FREQ = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre maximal de frequence"), + ), # fin CENTRE + METHODE=SIMP(statut='f',typ='TXM',min=1,max=1,into=('QZ','SORENSEN'),defaut='SORENSEN',fr="Choix de la méthode de résolution"), + + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Choix du type de post-traitement", + TYPE = SIMP(statut='o',typ='TXM',defaut=None,into=('TABLEAU_PARAM_MODAUX','DIAG_CAMPBELL'),), + #TABLEAU_PARAM_MODAUX = SIMP(statut='f',typ='TXM',min=1,max=1,defaut=None,into=('SIMPLE','COMPLET'),fr="Choix du type de tableau"), + TABLEAU_PARAM_MODAUX = BLOC(condition = "TYPE == 'TABLEAU_PARAM_MODAUX'",fr="Choix du type de tableau", + TABLEAU = SIMP(statut='o',max=1,typ='TXM',defaut='SIMPLE',into=('SIMPLE','COMPLET'),), + ), # fin TABLEAU_PARAM_MODAUX + DIAG_CAMPBELL = BLOC(condition = "TYPE == 'DIAG_CAMPBELL'", fr = "Choix des options du diagramme de Campbell", + PRECESSION = SIMP(statut='o',typ='TXM',max=1,defaut=None,into=('SOMME','PLUS_GRANDE_ORBITE'),), + SUIVI = SIMP(statut='o',typ='TXM',max=1,defaut=None,into=('SANS_TRI','TRI_PREC','TRI_FORM_MOD'),), + # 20121018 ajout de NB_MODES a la demande de Ionel Nistor + NB_MODES = SIMP(statut='o',typ='I',max=1,defaut=None,fr="Nombre de modes affiches dans le diagramme, doit etre inferieur au nombre de modes calcules"), + ), # fin DIAG_CAMPBELL + #DIAG_CAMPBELL = SIMP(statut='f',typ='TXM',min=1,max=1,defaut=None,into=('OUI','NON'),fr="Choix de calcul du diagramme de Campbell (uniquement si plusieurs vitesses de rotation ont ete renseignees)",), + ), # fin POST_TRAITEMENTS + + + ), # fin ANALYSE_MODALE + +## ----- CALCUL HARMONIQUE ----- ## + ANALYSE_HARMONIQUE = BLOC(condition = "TYPE_ANALYSE == 'HARMONIQUE' ",fr="Analyse harmonique", + + ## specification calcul harmonique + BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('PHYSIQUE','MODALE'),defaut=None,fr="Choix de la base du calcul harmonique"), + BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Calcul harmonique sur base modale", + #MODALE = FACT(statut='o', + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de mode"), + FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale"), + #),# fin MODALE + ),# fin BASE_MODALE + AMORTISSEMENT_P = BLOC(condition = "BASE_CALCUL == 'PHYSIQUE' ", + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + ), # fin AMORTISSEMENT_P + AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + # cft modif 20130603 + #AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + # LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), + #),# fin AMOR_REDUIT + AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + #AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), + AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes"), + ),# fin AMOR_MODALE + ), # fin AMORTISSEMENT_M + VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste des vitesses de rotation"), + # 20121018 retrait de defaut_fn a la demande de EDF + #CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','HARMONIQUE','DEFAUT_FN','EXTERNE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), + #CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','DELIGNAGE','HARMONIQUE','EXTERNE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), + CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','HARMONIQUE','EXTERNE','AUCUNE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), + BALOURD = BLOC(condition = "CHARGES == 'BALOURD' ",fr="Charge balourd appliquee", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge balourd"), + MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la magnitude de la charge balourd (en kg.m)"), + FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge balourd (autant de valeurs que de vitesses de rotation)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (en degres)"), + ),# fin BALOURD + # 20121106 retrait de delgnage a le demande de EDF + #DELIGNAGE = BLOC(condition = "CHARGES == 'DELIGNAGE' ",fr="Application d'un delignage", + #PARAM_DELIGNAGE = FACT(statut='o',min=1,max='**',fr="Parametres du delignage", + #PALIERS = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom d'un palier deligne"), + #VALEURS = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des valeurs du delignage du palier"), + #), # fin PARAM_DELIGNAGE + #), # fin DELIGNAGE + HARMONIQUE = BLOC(condition = "CHARGES == 'HARMONIQUE' ",fr="Charge harmonique appliquee", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge harmonique"), + PUIS_PULS = SIMP(statut='o',typ='I',min=1,max=1,into=(0,1,2),defaut=None,fr="Renseignement de la puissance de pulsation de la charge harmonique"), + PULSATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la pulsation d'excitation harmonique (en rad/s)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la magnitude de la charge harmonique, (unite : N.s^i (avec i = PUIS_PULS))"), + FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge harmonique (autant de valeurs que de vitesses de rotation)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (en degres)"), + TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY'),defaut=None,fr="Renseignement du type de DDL excite sur lequel porte la charge"), + ), # fin HARMONIQUE + # 20121018 retrait de defaut_fn a la demande de EDF + #DEFAUT_FN = BLOC(condition = "CHARGES == 'DEFAUT_FN' ",fr="Charge defaut de fibre neutre appliquee", + #POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du defaut de fibre neutre"), + #TR_Y = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du vecteur de translation en Y du defaut de fibre neutre"), + #TR_Z = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du vecteur de translation en Z du defaut de fibre neutre"), + #ROT_Y = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du moment de rotation en Y du defaut de fibre neutre"), + #ROT_Z = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du moment de rotation en Z du defaut de fibre neutre"), + #), # fin DEFAUT_FN + EXTERNE = BLOC(condition = "CHARGES == 'EXTERNE' ",fr="Charge externe appliquee", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge externe"), + FONC_APPLI = SIMP(typ=('Fichier','Charge Externe (*.csv)'),docu='',min=1,max=1,statut='o',defaut=None,fr="Renseignement de la fonction appliquee à la charge externe (fichier cvs)"), + ), # fin EXTERNE + ## fin secification calcul harmonique + + # test cft 20120531 + ## POST-TRAITEMENTS DU CALCUL HARMONIQUE + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Choix du type de post-traitement", + #TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), + # 2012119 retrait de DEPL_ABS + #TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_RELA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), + # 20130513 ajout de REAC_NODA + TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_RELA','REAC_NODA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), + DEPL = BLOC(condition = "TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement",regles=UN_PARMI('POSITION','PALIER'), + POSITION = SIMP(statut='f',typ='R',defaut=None,fr="Renseignement de la coordonnee du deplacement"), + PALIER = SIMP(statut='f',max='**',typ='TXM',defaut=None,fr="Renseignement du nom du palier"), + ), # fin DEPL + # pas d'options pour EFFORTS_PAL et REAC_NODA + #EFFORTS_PAL = BLOC(condition = "TYPE == 'EFFORTS_PAL'", fr = "Efforts paliers", + #PALIER = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), + #), # fin EFFORTS_PAL + # BASE_CALCUL == 'MODALE' + CONTRAINTES = BLOC(condition="TYPE == 'CONTRAINTES' ",fr="Contraintes",regles=UN_PARMI('POSITION','ZONE','TOUT'), + POSITION = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), + ZONE = SIMP(statut='f',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la zone de la contrainte"), + TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),min=1,max=1,fr="Renseignement de la contrainte"), + ), # fin CONTRAINTES + ), + ## fin bloc POST_TRAITEMENTS + + ),# fin ANALYSE_HARMONIQUE + +### ----- CALCUL TRANSITOIRE ----- ## + ANALYSE_TRANSISTOIRE = BLOC(condition = "TYPE_ANALYSE == 'TRANSITOIRE' ",fr="Analyse transitoire", + POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), + VITESSE = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,into=('CONSTANTE','VARIABLE'),fr="Renseignement du type de vitesse de rotation"), + BASE_C = BLOC(condition ="VITESSE == 'CONSTANTE'", + BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('PHYSIQUE','MODALE'),defaut=None,fr="Choix de la base du calcul transitoire"), + BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Calcul transitoire sur base modale", + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de mode"), + FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale"), + ),# fin BASE_MODALE + AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + # cft modif 20130603 + #AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + # LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), + #),# fin AMOR_REDUIT + AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes"), + ),# fin AMOR_MODALE + ), # fin AMORTISSEMENT_M + ), # fin BASE_C + BASE_V = BLOC(condition ="VITESSE == 'VARIABLE'", + BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('MODALE'),defaut='MODALE',fr="Choix de la base du calcul transitoire"), + BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Calcul transitoire sur base modale", + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de mode"), + FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale"), + ),# fin BASE_MODALE + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + # cft modif 20130603 + #AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + # LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), + #),# fin AMOR_REDUIT + AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + #AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), + AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes"), + ),# fin AMOR_MODALE + ), # fin BASE_C + #BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Calcul transitoire sur base modale", + # regles=UN_PARMI('NB_MODES','FREQ_MAX'), + # NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de mode"), + # FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale"), + #),# fin BASE_MODALE + # cft modif 20130603 + + #AMORTISSEMENT_P = BLOC(condition = "BASE_CALCUL == 'PHYSIQUE' ", + # AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + #), # fin AMORTISSEMENT_P + #AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", + # AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + # # cft modif 20130603 + # #AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + # # LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), + # #),# fin AMOR_REDUIT + # AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + # AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), + # ),# fin AMOR_MODALE + #), # fin AMORTISSEMENT_M + + + #AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL','REDUIT'),defaut=None,fr="Choix du type d'amortissement"), + #AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + # LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), + #),# fin AMOR_REDUIT + #AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + # AMOR_REDUIT = SIMP(statut='o', typ='R', min=1,max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), + #),# fin AMOR_MODALE + #VITESSE = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,into=('CONSTANTE','VARIABLE'),fr="Renseignement du type de vitesse de rotation"), + VITESSE_CONSTANTE = BLOC(condition = "VITESSE == 'CONSTANTE' ", fr="Vitesse de rotation constante", + VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation"), + ),# fin VITESSE_CONSTANTE + VITESSE_VARIABLE = BLOC(condition = "VITESSE == 'VARIABLE' ", fr="Vitesse de rotation variable", regles=UN_PARMI('LINEAIRE','EXPONENTIELLE','FORMULE'), + LINEAIRE = FACT(statut='f',min=1,max=1,fr="Renseignement de la fonction lineaire de la vitesse de rotation", + VITESSE_INITIALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation initiale (en tr/min)",), + VITESSE_FINALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation finale (en tr/min)",), + DEPHASAGE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la postion angulaire (en degre)"), + PAS_MAJ = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement du pas (ou liste) de mise a jour des matrices des paliers (en tours)"), + ),# fin LINEAIRE + EXPONENTIELLE = FACT(statut='f',min=1,max=1,fr="Renseignement de la fonction exponentielle de la vitesse de rotation", + VITESSE_INITIALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation initiale (en tr/min)",), + VITESSE_FINALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation finale (en tr/min)",), + DEPHASAGE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la postion angulaire (en degre)"), + LAMBDA = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du parametre de l'exponentielle"), + PAS_MAJ = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement du pas (ou liste) de mise a jour des matrices des paliers (en tours)"), + ),# fin VITESSE_EXPONENTIELLE + FORMULE = FACT(statut='f',min=1,max=1,fr="Renseignement de la fonction de la vitesse de rotation", + FICHIER = SIMP(statut='o',typ=('Fichier','Formule vitesse rotation (*.*)'),min=1,max=1,defaut=None,fr="Renseignement du fichier contenant les fonctions de la vitesse de rotation"), + OM = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule de position angulaire (max 8 caractere)"), + PHI = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule de vitesse angulaire (max 8 caractere)"), + ACC = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule d'acceleration angulaire (max 8 caractere)"), + PAS_MAJ = SIMP(statut='f',typ='R',min=1,max='**',defaut=None,fr="Renseignement du pas (ou liste) de mise a jour des matrices des paliers (en tours)"), + ),# fin VITESSE_EXPONENTIELLE + ),# fin VITESSE_VARIABLE + #POIDS_PROPRE = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Choix d'application du poids propre (pesanteur)"), + # 20121018 retrait de defaut_fn a la demande de EDF + #CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','DEFAUT_FN','DELIGNAGE','EXTERNE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), + # 20121119 retrait de delignage + #CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','DELIGNAGE','EXTERNE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), + CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','FORCE','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), + BALOURD = BLOC(condition = "CHARGES == 'BALOURD' ",fr="Charge balourd appliquee", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge balourd"), + MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la magnitude de la charge balourd (en kg.m)"), + FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge balourd (autant de valeurs que de vitesses de rotation)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (en degres)"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseigner l'instant pour déclencher le balourd"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseigner le temps pour la montée jusqu'à la valeur finale du balourd"), + ),# fin BALOURD + FORCE = BLOC(condition = "CHARGES == 'FORCE' ",fr="Application d'une force", + PARAM_FORCE = FACT(statut='o',min=1,max='**',fr="Parametres de la force", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la coordonnee de la force"), + MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement de la magnitude de la force"), + FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), + ), # fin PARAM_FORCE + ), # fin FORCE + HARMONIQUE = BLOC(condition = "CHARGES == 'HARMONIQUE' ",fr="Charge harmonique appliquee", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge harmonique"), + PUIS_PULS = SIMP(statut='o',typ='I',min=1,max=1,into=(0,1,2),defaut=None,fr="Renseignement de la puissance de pulsation de la charge harmonique"), + PULSATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la pulsation d'excitation harmonique (en rad/s)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la magnitude de la charge harmonique, (unite : N.s^i (avec i = PUIS_PULS)"), + FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge harmonique (autant de valeurs que de vitesses de rotation)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (en degres)"), + TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY'),defaut=None,fr="Renseignement du type de DDL excite sur lequel porte la charge"), + ), # fin HARMONIQUE + # 20121018 retrait de defaut_fn a la demande de EDF + #DEFAUT_FN = BLOC(condition = "CHARGES == 'DEFAUT_FN' ",fr="Charge defaut de fibre neutre appliquee", + #POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du defaut de fibre neutre"), + #TR_Y = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du vecteur de translation en Y du defaut de fibre neutre"), + #TR_Z = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du vecteur de translation en Z du defaut de fibre neutre"), + #ROT_Y = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du moment de rotation en Y du defaut de fibre neutre"), + #ROT_Z = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du moment de rotation en Z du defaut de fibre neutre"), + #), # fin DEFAUT_FN + # 20121119 retrait de delignage + #DELIGNAGE = BLOC(condition = "CHARGES == 'DELIGNAGE' ",fr="Application d'un delignage", + #PARAM_DELIGNAGE = FACT(statut='o',min=1,max='**',fr="Parametres du delignage", + #PALIERS = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom d'un palier deligne"), + #VALEURS = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des valeurs du delignage du palier"), + #), # fin PARAM_DELIGNAGE + #), # fin DELIGNAGE + # retrait force fichier externe + #EXTERNE = BLOC(condition = "CHARGES == 'EXTERNE' ",fr="Charge externe appliquee", + #POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge externe"), + #FONC_APPLI = SIMP(typ=('Fichier','Charge Externe (*.csv)'),docu='',min=1,max=1,statut='o',defaut=None,fr="Renseignement de la fonction appliquee à la charge externe (fichier cvs)"), + #), # fin EXTERNE + ETAT_INIT = FACT(statut='o',fr="Renseignement de l'etat initial", + #RESULTAT = SIMP(statut='o',typ=('sd_resultat'),max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), + RESULTAT = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), + INST_INIT = SIMP(statut='f',typ='R',max=1,defaut=0.0,fr="Renseignement de l'instant initial"), + ), # fin ETAT_INIT + PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS','LISTE'),defaut=None,fr="Choix du type de parametrage temporel"), + #PAS = BLOC(condition = "VITESSE == 'VARIABLE'",fr="Renseignement des parametres des pas", + PAS = BLOC(condition = "PARAM_TEMPS == 'PAS'",fr="Renseignement des parametres des pas", + TEMPS_PAS = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps (en s)"), + INST_INI = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de l'instant initial du pas"), + INST_FIN = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de l'instant final du pas"), + ), # fin TEMPS_PAS + LIST_INST = BLOC(condition = "PARAM_TEMPS == 'LISTE'",fr="Renseignement d'une liste de pas", + LISTE = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement d'une liste de pas"), + ), # fin LIST_INST + PAS_ARCHIVAGE = SIMP(statut='o',typ='I',max=1,defaut=None,fr="Renseignement du pas d'archivage",), + SCHEMA_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('NEWMARK','EULER','WILSON','ADAPT_ORDRE1','ADAPT_ORDRE2','DIFF_CENTRE'),defaut='NEWMARK',fr="Choix d'un schema temporel"), + NEWMARK = BLOC(condition = "SCHEMA_TEMPS == 'NEWMARK' ",fr="Choix de la methode de NEWMARK", + BETA = SIMP(statut='f',typ='R',max=1,defaut=0.25,fr="Renseignement de la valeur beta pour la methode de NEWMARK"), + GAMMA = SIMP(statut='f',typ='R',max=1,defaut=0.25,fr="Renseignement de la valeur gamma pour la methode de NEWMARK"), + ),# fin NEWMARK + WILSON = BLOC(condition = "SCHEMA_TEMPS == 'WILSON' ",fr="Choix de la methode de WILSON", + THETA = SIMP(statut='f',typ='R',max=1,defaut=1.4,fr="Renseignement de la valeur theta pour la methode de WILSON"), + ), # fin WILSON + #Ionel le 19122012, FISSURE n'est pas dans la V1 + #FISSURE = BLOC(condition = "BASE_CALCUL == 'MODALE' ",fr="Choix de calcul avec fissure", + # EMPLACEMENT = FACT(statut='o',fr="Renseignement de l'emplacement de la fissure", + # regles=UN_PARMI('POSITION','NOEUD'), + # POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la fissure"), + # NOEUD = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du noeud de la fissure"), + # ), # fin EMPLACEMENT + # VITE_ROTA = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de ?? "), + # ANGL_INIT = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de ?? "), + # K_PHI = SIMP(statut='o',typ=('Fichier','K.PHI (*.*)'),docu='',min=1,max=1,defaut=None,fr="Renseignement de la loi de comportement en raideur de la fissure"), + # DK_DPHI = SIMP(statut='o',typ=('Fichier','DK.DPHI (*.*)'),docu='',min=1,max=1,defaut=None,fr="Renseignement de la deivee de la loi de comportement en raideur de la fissure"), + #), # fin FISSURE + + ## POST_TRAITEMENTS de l'analyse transitoire + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Choix des post-traitements", + TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), + DEPL = BLOC(condition = "TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement",regles=UN_PARMI('POSITION','PALIER'), + #POSITION_DEPL = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du deplacement"), + POSITION = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du deplacement"), + PALIER = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), + ), # fin DEPL + # 20121119 pas de mots-cles specifique pour efforts_paliers + #EFFORTS_PAL = BLOC(condition = "TYPE == 'EFFORTS_PAL'", fr = "Efforts paliers", + #PALIER = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), + #), # fin EFFORTS_PAL + CONTRAINTES = BLOC(condition = "TYPE == 'CONTRAINTES' ",fr="Contraintes", + regles=UN_PARMI('POSITION','ZONE','TOUT'), + POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), + ZONE = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette de la zone de la contrainte"), + TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),max=1,fr="tout"), + ), # fin CONTRAINTES + ), # fin POST_TRAITEMENTS + + ), # fin ANALYSE_TRANSISTOIRE + + +### ----- CALCUL COUPLE CODE_ASTER/EYDOS ----- ## + ANALYSE_TRANSITOIRE_ACCIDENTEL = BLOC(condition = "TYPE_ANALYSE == 'TRANSITOIRE_ACCIDENTEL' ",fr="Analyse transitoire accidentelle", + #BASE_MODALE = FACT(statut='o', fr="Choix des parametres de la base modale", + POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), + BASE_MODALE = BLOC(condition = "True", fr="Choix des parametres de la base modale", + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de mode"), + FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale"), + ),# fin BASE_MODALE + # cft 20131217 suppression amortissement reduit + #AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL','REDUIT'),defaut=None,fr="Choix du type d'amortissement"), + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + #LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), + LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements modaux reduits (en %), la taille de la liste doit etre egale au nombre de modes"), + ),# fin AMOR_REDUIT + VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation"), + #POIDS_PROPRE = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Choix d'application du poids propre (pesanteur)"), + # 20121018 retrait de defaut_fn a la demande de EDF + #CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','DEFAUT_FN','DELIGNAGE','EXTERNE','EFFORTS_PALIERS'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), + #CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','DELIGNAGE','EXTERNE','EFFORTS_PALIERS'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), + CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','EXTERNE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), + BALOURD = BLOC(condition = "CHARGES == 'BALOURD' ",fr="Charge balourd appliquee", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge balourd"), + MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la magnitude de la charge balourd (en kg.m)"), + FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge balourd (autant de valeurs que de vitesses de rotation)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (en degres)"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseigner l'instant pour déclencher le balourd"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseigner le temps pour la montée jusqu'à la valeur finale du balourd"), + ),# fin BALOURD + # a commenter + # 20121018 retrait de defaut_fn a la demande de EDF + #DEFAUT_FN = BLOC(condition = "CHARGES == 'DEFAUT_FN' ",fr="Charge defaut de fibre neutre appliquee", + #POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du defaut de fibre neutre"), + #TR_Y = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du vecteur de translation en Y du defaut de fibre neutre"), + #TR_Z = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du vecteur de translation en Z du defaut de fibre neutre"), + #ROT_Y = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du moment de rotation en Y du defaut de fibre neutre"), + #ROT_Z = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du moment de rotation en Z du defaut de fibre neutre"), + #), # fin DEFAUT_FN + #DELIGNAGE = BLOC(condition = "CHARGES == 'DELIGNAGE' ",fr="Application d'un delignage", + #PARAM_DELIGNAGE = FACT(statut='o',min=1,max='**',fr="Parametres du delignage", + #PALIERS = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom d'un palier deligne"), + #VALEURS = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des valeurs du delignage du palier"), + #), # fin PARAM_DELIGNAGE + #), # fin DELIGNAGE + EXTERNE = BLOC(condition = "CHARGES == 'EXTERNE' ",fr="Charge externe appliquee", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge externe"), + FONC_APPLI = SIMP(typ=('Fichier','Charge Externe (*.csv)'),docu='',min=1,max=1,statut='o',defaut=None,fr="Renseignement de la fonction appliquee à la charge externe (fichier cvs)"), + ), # fin EXTERNE + #EFFORTS_PALIERS = BLOC(condition = "CHARGES == 'EFFORTS_PALIERS' ",fr="Application d'un effort palier", + #PALIER = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier de l'effort"), + #VALEURS = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignment de la valeur de l'effort sur le palier"), + #), # fin EFFORTS_PALIERS + ETAT_INIT = FACT(statut='o',fr="Renseignement de l'etat initial", + #RESULTAT = SIMP(statut='o',typ=('sd_resultat'),max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), + # 20121126 + #RESULTAT = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), + INST_INIT = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de l'instant initial"), + ), # fin ETAT_INIT + #PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS','LIST_INST'),defaut=None,fr="Choix du type de parametrage temporel"), + # 20121126 + PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS'),defaut="PAS",fr="Choix du type de parametrage temporel",), + PAS = BLOC(condition = "PARAM_TEMPS == 'PAS' ",fr="Renseignement des parametres des pas", + PAS_ASTER = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps Aster (en s)",), + PAS_EDYOS = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps Edyos (en s)",), + INST_FIN = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de l'instant final (en s)",), + ), # fin TEMPS_PAS + #LIST_INST = BLOC(condition = "PARAM_TEMPS == 'LIST_INST' ",fr="Renseignement d'une liste de pas", + #LISTE = SIMP(statut='f',typ='R',min=1,max='**',defaut=None,fr="Renseignement d'une liste de pas"), + #), # fin LIST_INST + PAS_ARCHIVAGE = SIMP(statut='o',typ='I',max=1,defaut=None,fr="Renseignement du pas d'archivage",), + PARA_MEM = SIMP(statut='f',typ='I',max=1,defaut=6400,fr="Renseigner la taille de la memoire en Mo",), + PARA_CPU = SIMP(statut='f',typ='I',max=1,defaut=10000,fr="Renseigner le temps CPU max en secondes",), + SCHEMA_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('EULER','ADAPT_ORDRE1','ADAPT_ORDRE2'),defaut='ADAPT_ORDRE2',fr="Choix d'un schema temporel"), + + ## POST_TRAITEMENTS de l'analyse transitoire + POST_TRAITEMENTS = FACT(statut='o',fr="Choix des post-traitements", + TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), + DEPL = BLOC(condition = "TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du deplacement"), + PALIER = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), + ), # fin DEPL + # pas d'info à rentrer pour les efforts palier (post-traitement sur tout les paliers) + #EFFORTS_PAL = BLOC(condition = "TYPE == 'EFFORTS_PAL'", fr = "Efforts paliers", + #PALIER = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), + #), # fin EFFORTS_PAL + CONTRAINTES = BLOC(condition = "TYPE == 'CONTRAINTES' ",fr="Contraintes", + regles=UN_PARMI('POSITION','ZONE','TOUT'), + POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), + ZONE = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette de la zone de la contrainte"), + TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),max=1,fr="tout"), + ), # fin CONTRAINTES + ), # fin POST_TRAITEMENTS + + + ), # fin ANALYSE_TRANSITOIRE_ACCIDENTEL + +)# fin SPECIFICATION_ANALYSE diff --git a/OldCodes/SPECA/SPECA_Cata_V2016.py b/OldCodes/SPECA/SPECA_Cata_V2016.py new file mode 100644 index 00000000..fddaecb4 --- /dev/null +++ b/OldCodes/SPECA/SPECA_Cata_V2016.py @@ -0,0 +1,415 @@ +## -*- coding: utf-8 -*- +# +## -------------------------------------------------- +## debut entete +## -------------------------------------------------- +# +from Accas import * + + +# rend disponible le type tuple (liste) +import types +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + if type(valeur) == types.StringType: + return None + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + __repr__=info + __str__=info + + + +# +#CONTEXT.debug = 1 + +VERSION_CATALOGUE="2016.0.0"; + +JdC = JDC_CATA ( code = 'SPECA', + execmodul = None, + regles=(AU_MOINS_UN('SPECIFICATION_ANALYSE',), + AU_PLUS_UN('SPECIFICATION_ANALYSE',), + ), + )# Fin JDC_CATA + +## ----- SPECIFICATION DE L'ETUDE ----- ## +SPECIFICATION_ANALYSE= MACRO (nom = 'SPECIFICATION_ANALYSE', + op = None, + UIinfo = {"groupes":("Machine tournante",)}, + fr = "Specification des analyses", + TYPE_ANALYSE = SIMP(statut='o', typ='TXM',into=('STATIQUE', 'MODALE', 'HARMONIQUE', 'TRANSITOIRE', 'TRANSITOIRE_ACCIDENTEL','SYNTHESE')), + # pour V1.1 flexion uniquement + #TYPE_COMPORTEMENT = SIMP(statut='o', typ='TXM',into=('FLEXION',),defaut='FLEXION',fr="Renseignement du type de comportement voulu"), + TYPE_COMPORTEMENT = BLOC(condition = "TYPE_ANALYSE in ('MODALE','HARMONIQUE','STATIQUE','TRANSITOIRE','TRANSITOIRE_ACCIDENTEL')", + FLEXION = SIMP(statut='o',typ='TXM',into=('OUI',),defaut='OUI',fr="Prise en compte la flexion de la ligne d'arbres: obligatoire"), + TORSION = SIMP(statut='f',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Choix de la prise en compte la torsion de la ligne d'arbres"), + COMPRESSION = SIMP(statut='f',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Choix de la prise en compte la traction/compression de la ligne d'arbres"), + ), + + SURCHARGE=BLOC(condition = "TYPE_ANALYSE in ('MODALE','HARMONIQUE','STATIQUE','TRANSITOIRE','TRANSITOIRE_ACCIDENTEL','SYNTHESE')",statut="f", + TEMPLATE=SIMP( statut="f", + typ=("Fichier","Fichier Template (*.tpl)"), + min=1,max=1, + fr="Utiliser un template d'analyse modifie" + ), + PARAMETRES= FACT(statut='f',min=1,max='**',fr="Definition et renseignement des parametres utilises dans le template surcharge", + CLE=SIMP(statut='o',typ='TXM',defaut=None,fr="Nom du parametre dans le template"), + TYPE=SIMP(statut='o',typ='TXM',into=('ENTIER','REEL','CHAINE','FICHIER','REPERTOIRE'),fr="Nature du parametre a renseigner"), + ENTIER=BLOC(condition="TYPE=='ENTIER'", + VALUE=SIMP(statut='o',typ='I',defaut=0,fr="Renseignement d'un nombre entier"), + ), + REEL=BLOC(condition="TYPE=='REEL'", + VALUE=SIMP(statut='o',typ='R',defaut=0.0,fr="Renseignement d'un nombre reel"), + ), + CHAINE=BLOC(condition="TYPE=='CHAINE'", + VALUE=SIMP(statut='o',typ='TXM',defaut='',fr="Renseignement d'une chaine de caracteres"), + ), + FICHIER=BLOC(condition="TYPE=='FICHIER'", + VALUE=SIMP(statut='o',typ=("Fichier","All files (*.*)"),fr="Renseignement d'un fichier") + ), + REPERTOIRE =BLOC(condition="TYPE=='REPERTOIRE'", + VALUE=SIMP(statut='o',typ="Repertoire",fr="Renseignement d'un repertoire") + ), + + ), + ), + + + +### ----- CALCUL STATIQUE ----- ## + ANALYSE_STATIQUE = BLOC(condition = "TYPE_ANALYSE == 'STATIQUE' ",fr="Analyse statique (vitesse de rotation nulle de la ligne d'arbres)", + CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", + TYPE = SIMP(statut='o',typ='TXM',into=('POIDS','FORCE','MOMENT','DELIGNAGE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), + POIDS = BLOC(condition = "TYPE == 'POIDS' ",fr="Prise en compte du champ de pesanteur", + GRAVITE = SIMP(statut='o',typ='R',defaut=9.81,fr="Renseignement de l'intensite de la gravite (m/s^2)"), + DIRECTION = SIMP(statut='o',typ='R',min=3,max=3,defaut=(1,0,0),fr="Renseignement de la direction de la force de gravite"), + ), # fin POIDS + FORCE = BLOC(condition = "TYPE == 'FORCE' ",fr="Application d'une force ponctuelle", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique la force (m)"), + AMPLITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant la force (N)"), + #FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), + ), # fin FORCE + MOMENT = BLOC(condition = "TYPE == 'MOMENT' ",fr="Application d'un moment ponctuel", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), + AMPLITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), + ), # fin MOMENT + DELIGNAGE = BLOC(condition = "TYPE == 'DELIGNAGE' ",fr="Application d'un delignage sur un ou plusieurs paliers", + NOM_PALIER = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom du palier deligne"), + DX = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du delignage suivant X du palier (m)"), + DY = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du delignage suivant Y du palier (m)"), + ), # fin Delignage + ), #fin CHARGES + + # POST-TRAITEMENTS DU CALCUL STATIQUE + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", + CONTRAINTES = SIMP(statut='o',typ='TXM',into=('OUI', 'NON'),defaut='NON',fr="Export des contraintes en tout noeud de la ligne d'arbres"), + ), #fin POST_TRAITEMENTS + ),# fin ANALYSE_STATIQUE + +### ----- CALCUL MODALE ----- ## + ANALYSE_MODALE = BLOC(condition = "TYPE_ANALYSE == 'MODALE' ",fr="Analyse modale de la ligne d'arbres", + BASE_CALCUL = SIMP(statut='o',typ="TXM",into=('MODALE','PHYSIQUE'),defaut=None,fr="Choix du type de resolution de l'analyse modale (sur base physique ou sur base modale)"), + BASE_MODALE = BLOC(condition="BASE_CALCUL=='MODALE'",fr="Resolution sur base modale", + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES=SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), + FREQ_MAX=SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), + ), # fin BASE_MODALE + AMORTISSEMENT = SIMP(statut='o',typ='TXM',min=1,max=1,into=('OUI','NON'),defaut='OUI',fr="Choix de la prise en compte de l'amortissment"), + GYROSCOPIE = SIMP(statut='o',typ='TXM',min=1,max=1,into=('OUI','NON'),defaut='OUI',fr="Choix de la prise en compte de la gyroscopie"), + VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste des vitesses de rotation etudiees (tr/min)"), + OPTION_CALCUL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('PLUS_PETITE','CENTRE'),defaut=None,fr="Choix de l'option de calcul"), + PLUS_PETITE = BLOC(condition="OPTION_CALCUL=='PLUS_PETITE'",fr="Calcul des n premieres frequences", + NMAX_FREQ = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre maximal de frequences a calculer"), + ), # fin PLUS_PETITE + CENTRE = BLOC(condition="OPTION_CALCUL=='CENTRE'",fr="Calcul d'un nombre n de frequences autour d'une frequence donnee", + FREQ = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence centrale (Hz)"), + NMAX_FREQ = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre maximal de frequences"), + ), # fin CENTRE + METHODE=SIMP(statut='f',typ='TXM',min=1,max=1,into=('QZ','SORENSEN'),defaut='SORENSEN',fr="Choix de la methode de resolution"), + + # POST-TRAITEMENTS DU CALCUL MODAL + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", + TYPE = SIMP(statut='o',typ='TXM',into=('AUCUN','DIAG_CAMPBELL'), defaut = 'AUCUN'), + DIAG_CAMPBELL = BLOC(condition="TYPE == 'DIAG_CAMPBELL'",fr="Choix des options du diagramme de Campbell", + PRECESSION = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,into=('SOMME','PLUS_GRANDE_ORBITE'),fr="Critere de determination de la precession"), + SUIVI= SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,into=('SANS_TRI','TRI_PREC','TRI_FORM_MOD'),fr="Methode de suivi des modes"), + NB_MODES = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Nombre de modes affiches dans le diagramme, doit etre inferieur au nombre de modes calcules (NMAX_FREQ)"), + ), # fin DIAG_CAMPBELL + ),# fin POST_TRAITEMENTS + ), # fin ANALYSE_MODALE + +## ----- CALCUL HARMONIQUE ----- ## + ANALYSE_HARMONIQUE = BLOC(condition = "TYPE_ANALYSE == 'HARMONIQUE' ",fr="Analyse harmonique de la ligne d'arbres", + + ## specification calcul harmonique + BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('PHYSIQUE','MODALE'),defaut=None,fr="Choix du type de resolution de l'analyse modale (sur base physique ou sur base modale)"), + BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Resolution sur base modale", + #MODALE = FACT(statut='o', + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), + FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), + #),# fin MODALE + ),# fin BASE_MODALE + AMORTISSEMENT_P = BLOC(condition = "BASE_CALCUL == 'PHYSIQUE' ", + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL',),defaut='STRUCTUREL',fr="Choix du type d'amortissement"), + ), # fin AMORTISSEMENT_P + AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + #AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), + AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), + ),# fin AMOR_MODALE + ), # fin AMORTISSEMENT_M + VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste des vitesses de rotation etudiees (tr/min)"), + # 20121018 retrait de defaut_fn a la demande de EDF + CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", + TYPE = SIMP(statut='o',typ='TXM',into=('BALOURD','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), + BALOURD = BLOC(condition = "TYPE == 'BALOURD' ",fr="Chargement de type balourd", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique le balourd (m)"), + AMPLITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude du balourd (kg.m)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (degres)"), + ),# fin BALOURD + HARMONIQUE = BLOC(condition = "TYPE == 'HARMONIQUE' ",fr="Charge harmonique", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique la charge harmonique (m)"), + FREQUENCE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence d'excitation harmonique (Hz)"), + AMPLITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude de la charge harmonique, (N)"), + FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste de coefficients appliques sur la charge harmonique (autant que de vitesses de rotation)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (degres)"), + TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY','DZ','DRZ'),defaut=None,fr="Renseignement du DDL sur lequel s'applique la charge harmonique"), + ), # fin HARMONIQUE + ), #FIN CHARGES + + # POST-TRAITEMENTS DU CALCUL HARMONIQUE + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", + CONTRAINTES = SIMP(statut='o',typ='TXM',into=('OUI', 'NON'),defaut='NON',fr="Export des contraintes en tout noeud de la ligne d'arbres"), + ), + ## fin POST_TRAITEMENTS + + ),# fin ANALYSE_HARMONIQUE + +### ----- CALCUL TRANSITOIRE ----- ## + ANALYSE_TRANSISTOIRE = BLOC(condition = "TYPE_ANALYSE == 'TRANSITOIRE' ",fr="Analyse transitoire de la ligne d'arbres", + + VITESSE = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,into=('CONSTANTE','VARIABLE'),fr="Renseignement du type de vitesse de rotation consideree"), + BASE_C = BLOC(condition ="VITESSE == 'CONSTANTE'",fr="Analyse transitoire a vitesse constante", + BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('PHYSIQUE','MODALE'),defaut=None,fr="Choix du type de resolution de l'analyse transitoire (sur base physique ou sur base modale)"), + BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Resolution sur base modale", + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), + FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), + ),# fin BASE_MODALE + AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), + ),# fin AMOR_MODALE + ), # fin AMORTISSEMENT_M + ), # fin BASE_C + BASE_V = BLOC(condition ="VITESSE == 'VARIABLE'",fr="Analyse transitoire a vitesse variable", + BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('MODALE',),defaut='MODALE',fr="Choix du type de resolution de l'analyse transitoire (obligatoirement sur base modale)"), + BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Resolution sur base modale", + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), + FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), + ),# fin BASE_MODALE + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + #AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), + AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), + ),# fin AMOR_MODALE + ), # fin BASE_C + VITESSE_CONSTANTE = BLOC(condition = "VITESSE == 'CONSTANTE' ", fr="Vitesse de rotation constante", + VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation (tr/min)"), + ),# fin VITESSE_CONSTANTE + VITESSE_VARIABLE = BLOC(condition = "VITESSE == 'VARIABLE' ", fr="Vitesse de rotation variable", regles=UN_PARMI('LINEAIRE','EXPONENTIELLE','FORMULE'), + LINEAIRE = FACT(statut='f',min=1,max=1,fr="Variation lineaire de la vitesse de rotation", + VITESSE_INITIALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation initiale (tr/min)",), + VITESSE_FINALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation finale (tr/min)",), + DEPHASAGE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la postion angulaire initiale (degres)"), + PAS_MAJ = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement du pas de mise a jour des matrices des paliers (tr/min)"), + ),# fin LINEAIRE + EXPONENTIELLE = FACT(statut='f',min=1,max=1,fr="Variation exponentielle de la vitesse de rotation", + VITESSE_INITIALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation initiale (tr/min)",), + VITESSE_FINALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation finale (tr/min)",), + DEPHASAGE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la postion angulaire initiale (degres)"), + LAMBDA = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du parametre de la loi exponentielle (Hz)"), + PAS_MAJ = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement du pas de mise a jour des matrices des paliers (tr/min)"), + ),# fin EXPONENTIELLE + FORMULE = FACT(statut='f',min=1,max=1,fr="Fonction personnalisee decrivant la variation de la vitesse de rotation", + FICHIER = SIMP(statut='o',typ=('Fichier','Formule vitesse rotation (*.*)'),min=1,max=1,defaut=None,fr="Renseignement du fichier contenant les fonctions de la vitesse de rotation"), + PHI = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule de position angulaire (max 8 caractere)"), + OM = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule de vitesse angulaire (max 8 caractere)"), + ACC = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule d'acceleration angulaire (max 8 caractere)"), + VITE_MOY = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la moyenne des vitesses balayees (tr/min)"), + PAS_MAJ = SIMP(statut='f',typ='R',min=1,max='**',defaut=None,fr="Renseignement du pas de mise a jour des matrices des paliers (tr/min)"), + ),# fin FORMULE + ),# fin VITESSE_VARIABLE + #POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), + + CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", + TYPE = SIMP(statut='o',typ='TXM',into=('POIDS','BALOURD','FORCE','MOMENT','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), + BALOURD = BLOC(condition = "TYPE == 'BALOURD' ",fr="Chargement de type balourd", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique le balourd (m)"), + AMPLITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude du balourd (kg.m)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (degres)"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du balourd (s)"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre l'amplitude nominale du balourd (s)"), + ),# fin BALOURD + POIDS = BLOC(condition = "TYPE == 'POIDS' ",fr="Prise en compte du champ de pesanteur", + GRAVITE = SIMP(statut='o',typ='R',defaut=9.81,fr="Renseignement de l'intensite de la gravite (m/s^2)"), + DIRECTION = SIMP(statut='o',typ='R',min=3,max=3,defaut=(1,0,0),fr="Renseignement de la direction de la force de gravite"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du poids (s)"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale du poids (s)"), + ), # fin POIDS + FORCE = BLOC(condition = "TYPE == 'FORCE' ",fr="Application d'une force ponctuelle", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique la force (m)"), + AMPLITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant la force (N)"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition de la force (s)"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale de la force (s)"), + #FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), + ), # fin FORCE + MOMENT = BLOC(condition = "TYPE == 'MOMENT' ",fr="Application d'un moment ponctuel", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), + AMPLITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du moment (s)"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale du moment (s)"), + ), # fin MOMENT + HARMONIQUE = BLOC(condition = "TYPE == 'HARMONIQUE' ",fr="Charge harmonique", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique la charge harmonique (m)"), + FREQUENCE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence d'excitation harmonique (Hz)"), + AMPLITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude de la charge harmonique, (N)"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition de la charge harmonique (s)"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale de la charge harmonique (s)"), + #FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge harmonique (autant de valeurs que de vitesses de rotation)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (degres)"), + TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY','DZ','DRZ'),defaut=None,fr="Renseignement du DDL sur lequel s'applique la charge harmonique"), + ), # fin HARMONIQUE + ), #fin CHARGES + + ETAT_INIT = FACT(statut='o',fr="Renseignement de l'etat initial du calcul", + #RESULTAT = SIMP(statut='o',typ=('sd_resultat'),max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), + RESULTAT = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Choix de la structure de donnees de type 'resultat' de Code_Aster"), + INST_INIT = SIMP(statut='f',typ='R',max=1,defaut=0.0,fr="Renseignement de l'instant de la structure de donnees a partir duquel il faut lancer le calcul (s)"), + ), # fin ETAT_INIT + PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS','LISTE'),defaut=None,fr="Choix du type de discretisation temporelle"), + #PAS = BLOC(condition = "VITESSE == 'VARIABLE'",fr="Renseignement des parametres des pas", + PAS = BLOC(condition = "PARAM_TEMPS == 'PAS'",fr="Renseignement de pas de temps", + TEMPS_PAS = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps d'integration(en s)"), + INST_INI = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de l'instant initial du calcul (s)"), + INST_FIN = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de l'instant final du calcul (s)"), + ), # fin TEMPS_PAS + LIST_INST = BLOC(condition = "PARAM_TEMPS == 'LISTE'",fr="Renseignement d'une liste d'instants", + LISTE = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement d'une liste d'instants auxquels resoudre le calcul (s)"), + ), # fin LIST_INST + PAS_ARCHIVAGE = SIMP(statut='o',typ='I',max=1,defaut=1,fr="Renseignement du pas d'archivage des resultats (une sauvegarde tous les 'PAS_ARCHIVAGE' instants d'integration)",), + SCHEMA_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('NEWMARK','EULER','WILSON','ADAPT_ORDRE1','ADAPT_ORDRE2','DIFF_CENTRE'),defaut='NEWMARK',fr="Choix d'un schema d'integration temporelle"), + NEWMARK = BLOC(condition = "SCHEMA_TEMPS == 'NEWMARK' ",fr="Methode de NEWMARK", + BETA = SIMP(statut='f',typ='R',max=1,defaut=0.25,fr="Renseignement de la valeur beta pour la methode de NEWMARK"), + GAMMA = SIMP(statut='f',typ='R',max=1,defaut=0.25,fr="Renseignement de la valeur gamma pour la methode de NEWMARK"), + ),# fin NEWMARK + WILSON = BLOC(condition = "SCHEMA_TEMPS == 'WILSON' ",fr="Methode de WILSON", + THETA = SIMP(statut='f',typ='R',max=1,defaut=1.4,fr="Renseignement de la valeur theta pour la methode de WILSON"), + ), # fin WILSON + + # POST-TRAITEMENTS DU CALCUL TRANSITOIRE + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", + CONTRAINTES = SIMP(statut='o',typ='TXM',into=('OUI', 'NON'),defaut='NON',fr="Export des contraintes en tout noeud de la ligne d'arbres"), + ), # fin POST_TRAITEMENTS + + ), # fin ANALYSE_TRANSISTOIRE + + +### ----- CALCUL COUPLE CODE_ASTER/EYDOS ----- ## + ANALYSE_TRANSITOIRE_ACCIDENTEL = BLOC(condition = "TYPE_ANALYSE == 'TRANSITOIRE_ACCIDENTEL' ",fr="Analyse transitoire accidentelle de la ligne d'arbres", + #BASE_MODALE = FACT(statut='o', fr="Choix des parametres de la base modale", + #POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), + BASE_MODALE = BLOC(condition = "True", fr="Resolution sur base modale", + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), + FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), + ),# fin BASE_MODALE + # cft 20131217 suppression amortissement reduit + #AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL','REDUIT'),defaut=None,fr="Choix du type d'amortissement"), + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL',),defaut='STRUCTUREL',fr="Choix du type d'amortissement"), + AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + #LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), + LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements modaux reduits (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), + ),# fin AMOR_REDUIT + VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation (tr/min)"), + + CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", + TYPE = SIMP(statut='o',typ='TXM',into=('POIDS','BALOURD','FORCE','MOMENT','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), + BALOURD = BLOC(condition = "TYPE == 'BALOURD' ",fr="Chargement de type balourd", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique le balourd (m)"), + AMPLITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude du balourd (kg.m)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (degres)"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du balourd (s)"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre l'amplitude nominale du balourd (s)"), + ),# fin BALOURD + POIDS = BLOC(condition = "TYPE == 'POIDS' ",fr="Prise en compte du champ de pesanteur", + GRAVITE = SIMP(statut='o',typ='R',defaut=9.81,fr="Renseignement de l'intensite de la gravite (m/s^2)"), + DIRECTION = SIMP(statut='o',typ='R',min=3,max=3,defaut=(1,0,0),fr="Renseignement de la direction de la force de gravite"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du poids (s)"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale du poids (s)"), + ), # fin POIDS + FORCE = BLOC(condition = "TYPE == 'FORCE' ",fr="Application d'une force ponctuelle", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), + AMPLITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition de la force (s)"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale de la force (s)"), + #FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), + ), # fin FORCE + MOMENT = BLOC(condition = "TYPE == 'MOMENT' ",fr="Application d'un moment ponctuel", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), + AMPLITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du moment (s)"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale du moment (s)"), + ), # fin MOMENT + HARMONIQUE = BLOC(condition = "TYPE == 'HARMONIQUE' ",fr="Charge harmonique", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique la charge harmonique (m)"), + FREQUENCE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence d'excitation harmonique (Hz)"), + AMPLITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude de la charge harmonique, (N)"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition de la charge harmonique (s)"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale de la charge harmonique (s)"), + #FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge harmonique (autant de valeurs que de vitesses de rotation)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (degres)"), + TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY','DZ','DRZ'),defaut=None,fr="Renseignement du DDL sur lequel s'applique la charge harmonique"), + ), # fin HARMONIQUE + ), #fin CHARGES + ETAT_INIT = FACT(statut='o',fr="Renseignement de l'etat initial du calcul", + #RESULTAT = SIMP(statut='o',typ=('sd_resultat'),max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), + # 20121126 + #RESULTAT = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), + INST_INIT = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de l'instant initial a partir duquel il faut lancer le calcul (s)"), + ), # fin ETAT_INIT + #PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS','LIST_INST'),defaut=None,fr="Choix du type de parametrage temporel"), + # 20121126 + PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS',),defaut="PAS",fr="Choix du type de discretisation temporelle",), + PAS = BLOC(condition = "PARAM_TEMPS == 'PAS' ",fr="Renseignement de pas de temps", + PAS_ASTER = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps d'integration Code_Aster (en s)",), + PAS_EDYOS = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps d'integration Edyos (en s)",), + INST_FIN = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de l'instant final du calcul (en s)",), + ), # fin TEMPS_PAS + #LIST_INST = BLOC(condition = "PARAM_TEMPS == 'LIST_INST' ",fr="Renseignement d'une liste de pas", + #LISTE = SIMP(statut='f',typ='R',min=1,max='**',defaut=None,fr="Renseignement d'une liste de pas"), + #), # fin LIST_INST + PAS_ARCHIVAGE = SIMP(statut='o',typ='I',max=1,defaut=1,fr="Renseignement du pas d'archivage des resultats (une sauvegarde tous les 'PAS_ARCHIVAGE' instants d'integration)",), + PARA_MEM = SIMP(statut='f',typ='I',max=1,defaut=6400,fr="Renseigner la taille maximale de la memoire (Mo)",), + PARA_CPU = SIMP(statut='f',typ='I',max=1,defaut=10000,fr="Renseigner le temps CPU maximal (s)",), + SCHEMA_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('EULER','ADAPT_ORDRE1','ADAPT_ORDRE2'),defaut='ADAPT_ORDRE2',fr="Choix d'un schema d'integration temporelle"), + + # POST-TRAITEMENTS DU CALCUL TRANSITOIRE ACCIDENTEL + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", + CONTRAINTES = SIMP(statut='o',typ='TXM',into=('OUI', 'NON'),defaut='NON',fr="Export des contraintes en tout noeud de la ligne d'arbres"), + ), # fin POST_TRAITEMENTS + ), # fin ANALYSE_TRANSITOIRE_ACCIDENTEL + +)# fin SPECIFICATION_ANALYSE diff --git a/OldCodes/SPECA/SPECA_Cata_V2_00.py b/OldCodes/SPECA/SPECA_Cata_V2_00.py new file mode 100644 index 00000000..f6c34acf --- /dev/null +++ b/OldCodes/SPECA/SPECA_Cata_V2_00.py @@ -0,0 +1,458 @@ +## -*- coding: utf-8 -*- +# +## -------------------------------------------------- +## debut entete +## -------------------------------------------------- +# +from Accas import * + + +# rend disponible le type tuple (liste) +import types +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + if type(valeur) == types.StringType: + return None + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + __repr__=info + __str__=info + + + +# +#CONTEXT.debug = 1 + +VERSION_CATALOGUE="2.0.0"; + +JdC = JDC_CATA ( code = 'SPECA', + execmodul = None, + regles=(AU_MOINS_UN('SPECIFICATION_ANALYSE',), + AU_PLUS_UN('SPECIFICATION_ANALYSE',), + ), + )# Fin JDC_CATA + +## ----- SPECIFICATION DE L'ETUDE ----- ## +SPECIFICATION_ANALYSE= MACRO (nom = 'SPECIFICATION_ANALYSE', + op = None, + UIinfo = {"groupes":("Machine tournante",)}, + fr = "Specification des analyses", + TYPE_ANALYSE = SIMP(statut='o', typ='TXM',into=('STATIQUE', 'MODALE', 'HARMONIQUE', 'TRANSITOIRE', 'TRANSITOIRE_ACCIDENTEL','SYNTHESE')), + # pour V1.1 flexion uniquement + #TYPE_COMPORTEMENT = SIMP(statut='o', typ='TXM',into=('FLEXION'),defaut='FLEXION',fr="Renseignement du type de comportement voulu"), + TYPE_COMPORTEMENT = BLOC(condition = "TYPE_ANALYSE in ('MODALE','HARMONIQUE','STATIQUE','TRANSITOIRE','TRANSITOIRE_ACCIDENTEL','SYNTHESE')", + FLEXION = SIMP(statut='o',typ='TXM',into=('OUI',),defaut='OUI',fr="Prise en compte la flexion de la ligne d'arbres: obligatoire"), + TORSION = SIMP(statut='f',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Choix de la prise en compte la torsion de la ligne d'arbres"), + COMPRESSION = SIMP(statut='f',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Choix de la prise en compte la traction/compression de la ligne d'arbres"), + ), + + SURCHARGE=BLOC(condition = "TYPE_ANALYSE in ('MODALE','HARMONIQUE','STATIQUE','TRANSITOIRE','TRANSITOIRE_ACCIDENTEL','SYNTHESE')",statut="f", + TEMPLATE=SIMP( statut="f", + typ=("Fichier","Fichier Template (*.tpl)"), + min=1,max=1, + fr="Utiliser un template d'analyse modifie" + ), + PARAMETRES= FACT(statut='f',min=1,max='**',fr="Definition et renseignement des parametres utilises dans le template surcharge", + CLE=SIMP(statut='o',typ='TXM',defaut=None,fr="Nom du parametre dans le template"), + TYPE=SIMP(statut='o',typ='TXM',into=('ENTIER','REEL','CHAINE','FICHIER','REPERTOIRE'),fr="Nature du parametre a renseigner"), + ENTIER=BLOC(condition="TYPE=='ENTIER'", + VALUE=SIMP(statut='o',typ='I',defaut=0,fr="Renseignement d'un nombre entier"), + ), + REEL=BLOC(condition="TYPE=='REEL'", + VALUE=SIMP(statut='o',typ='R',defaut=0.0,fr="Renseignement d'un nombre reel"), + ), + CHAINE=BLOC(condition="TYPE=='CHAINE'", + VALUE=SIMP(statut='o',typ='TXM',defaut='',fr="Renseignement d'une chaine de caracteres"), + ), + FICHIER=BLOC(condition="TYPE=='FICHIER'", + VALUE=SIMP(statut='o',typ=("Fichier","All files (*.*)"),fr="Renseignement d'un fichier") + ), + REPERTOIRE =BLOC(condition="TYPE=='REPERTOIRE'", + VALUE=SIMP(statut='o',typ="Repertoire",fr="Renseignement d'un repertoire") + ), + + ), + ), + + + +### ----- CALCUL STATIQUE ----- ## + ANALYSE_STATIQUE = BLOC(condition = "TYPE_ANALYSE == 'STATIQUE' ",fr="Analyse statique (vitesse de rotation nulle de la ligne d'arbres)" + + CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", + TYPE = SIMP(statut='o',typ='TXM',into=('POIDS','FORCE','MOMENT','DELIGNAGE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), + POIDS = BLOC(condition = "TYPE == 'POIDS' ",fr="Prise en compte du champ de pesanteur", + GRAVITE = SIMP(statut='o',typ='R',defaut=9.81,fr="Renseignement de l'intensite de la gravite (m/s^2)"), + DIRECTION = SIMP(statut='o',typ='R',min=3,max=3,defaut=(1,0,0),fr="Renseignement de la direction de la force de gravite"), + ), # fin POIDS + FORCE = BLOC(condition = "TYPE == 'FORCE' ",fr="Application d'une force ponctuelle", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique la force (m)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant la force (N)"), + #FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), + ), # fin FORCE + MOMENT = BLOC(condition = "TYPE == 'MOMENT' ",fr="Application d'un moment ponctuel", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), + ), # fin MOMENT + DELIGNAGE = BLOC(condition = "TYPE == 'DELIGNAGE' ",fr="Application d'un delignage sur un ou plusieurs paliers", + NOM_PALIER = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom du palier deligne"), + DX = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du delignage suivant X du palier (m)"), + DY = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du delignage suivant Y du palier (m)"), + ), # fin Delignage + ), #fin CHARGES + + ## POST-TRAITEMENTS DU CALCUL STATIQUE + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", + TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','REAC_NODA','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), + DEPL = BLOC(condition="TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement",regles=UN_PARMI('POSITION','PALIER'), + POSITION = SIMP(statut='f',typ='R',defaut=None,fr="Renseignement de la coordonnee du deplacement"), + PALIER = SIMP(statut='f',max='**',typ='TXM',defaut=None,fr="Renseignement du nom du palier"), + ), # fin DEPL + CONTRAINTES = BLOC(condition="TYPE == 'CONTRAINTES' ",fr="Export des contraintes",regles=UN_PARMI('POSITION','ZONE','TOUT'), + POSITION = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), + ZONE = SIMP(statut='f',typ='TXM',defaut=None,fr="Renseignement de la zone de la contrainte"), + TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),fr="Export pour tous les noeuds"), + ), # fin CONTRAINTES + REAC_NODA = BLOC(condition="TYPE == 'REAC_NODA' ", fr="Reaction nodale",regles=UN_PARMI('POSITION','PALIER'), + POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la reaction"), + #ZONE = SIMP(statut='f',typ='TXM',defaut=None,fr="Renseignement de l'etiquette de la zone de la reaction"), + PALIER = SIMP(statut='f',max='**',typ='TXM',defaut=None,fr="Renseignement du nom du palier"), + ), # fin REAC_NODA + ), # fin POST_TRAITEMENT + ## fin bloc POST_TRAITEMENTS + + ),# fin ANALYSE_STATIQUE + +### ----- CALCUL MODALE ----- ## + ANALYSE_MODALE = BLOC(condition = "TYPE_ANALYSE == 'MODALE' ",fr="Analyse modale de la ligne d'arbres" + BASE_CALCUL = SIMP(statut='o',typ="TXM",into=('MODALE','PHYSIQUE'),defaut=None,fr="Choix du type de resolution de l'analyse modale (sur base physique ou sur base modale)"), + BASE_MODALE = BLOC(condition="BASE_CALCUL=='MODALE'",fr="Resolution sur base modale", + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES=SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), + FREQ_MAX=SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), + ), # fin BASE_MODALE + AMORTISSEMENT = SIMP(statut='o',typ='TXM',min=1,max=1,into=('OUI','NON'),defaut='OUI',fr="Choix de la prise en compte de l'amortissment"), + GYROSCOPIE = SIMP(statut='o',typ='TXM',min=1,max=1,into=('OUI','NON'),defaut='OUI',fr="Choix de la prise en compte de la gyroscopie"), + VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste des vitesses de rotation etudiees (tr/min)"), + OPTION_CALCUL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('PLUS_PETITE','CENTRE'),defaut=None,fr="Choix de l'option de calcul"), + PLUS_PETITE = BLOC(condition="OPTION_CALCUL=='PLUS_PETITE'",fr="Option PLUS_PETITE",fr="Calcul des n premieres frequences" + NMAX_FREQ = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre maximal de frequences a calculer"), + ), # fin PLUS_PETITE + CENTRE = BLOC(condition="OPTION_CALCUL=='CENTRE'",fr="Option CENTRE",fr="Calcul d'un nombre n de frequences autour d'une frequence donnee" + FREQ = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence centrale (Hz)"), + NMAX_FREQ = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre maximal de frequences"), + ), # fin CENTRE + METHODE=SIMP(statut='f',typ='TXM',min=1,max=1,into=('QZ','SORENSEN'),defaut='SORENSEN',fr="Choix de la methode de resolution"), + + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", + TYPE = SIMP(statut='o',typ='TXM',defaut=None,into=('TABLEAU_PARAM_MODAUX','DIAG_CAMPBELL'),fr="Choix du type de post-traitement",), + #TABLEAU_PARAM_MODAUX = SIMP(statut='f',typ='TXM',min=1,max=1,defaut=None,into=('SIMPLE','COMPLET'),fr="Choix du type de tableau"), + TABLEAU_PARAM_MODAUX = BLOC(condition = "TYPE == 'TABLEAU_PARAM_MODAUX'",fr="Choix du type de tableau", + TABLEAU = SIMP(statut='o',max=1,typ='TXM',defaut='SIMPLE',into=('SIMPLE','COMPLET'),), + ), # fin TABLEAU_PARAM_MODAUX + DIAG_CAMPBELL = BLOC(condition = "TYPE == 'DIAG_CAMPBELL'", fr = "Choix des options du diagramme de Campbell", + PRECESSION = SIMP(statut='o',typ='TXM',max=1,defaut=None,into=('SOMME','PLUS_GRANDE_ORBITE'),fr="Critere de determination de la precession"), + SUIVI = SIMP(statut='o',typ='TXM',max=1,defaut=None,into=('SANS_TRI','TRI_PREC','TRI_FORM_MOD'),fr="Methode de suivi des modes"), + # 20121018 ajout de NB_MODES a la demande de Ionel Nistor + NB_MODES = SIMP(statut='o',typ='I',max=1,defaut=None,fr="Nombre de modes affiches dans le diagramme, doit etre inferieur au nombre de modes calcules (NMAX_FREQ)"), + ), # fin DIAG_CAMPBELL + #DIAG_CAMPBELL = SIMP(statut='f',typ='TXM',min=1,max=1,defaut=None,into=('OUI','NON'),fr="Choix de calcul du diagramme de Campbell (uniquement si plusieurs vitesses de rotation ont ete renseignees)",), + ), # fin POST_TRAITEMENTS + + + ), # fin ANALYSE_MODALE + +## ----- CALCUL HARMONIQUE ----- ## + ANALYSE_HARMONIQUE = BLOC(condition = "TYPE_ANALYSE == 'HARMONIQUE' ",fr="Analyse harmonique de la ligne d'arbres", + + ## specification calcul harmonique + BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('PHYSIQUE','MODALE'),defaut=None,fr="Choix du type de resolution de l'analyse modale (sur base physique ou sur base modale)"), + BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Resolution sur base modale", + #MODALE = FACT(statut='o', + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), + FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), + #),# fin MODALE + ),# fin BASE_MODALE + AMORTISSEMENT_P = BLOC(condition = "BASE_CALCUL == 'PHYSIQUE' ", + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + ), # fin AMORTISSEMENT_P + AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + #AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), + AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), + ),# fin AMOR_MODALE + ), # fin AMORTISSEMENT_M + VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste des vitesses de rotation etudiees (tr/min)"), + # 20121018 retrait de defaut_fn a la demande de EDF + CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", + TYPE = SIMP(statut='o',typ='TXM',into=('BALOURD','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), + BALOURD = BLOC(condition = "TYPE == 'BALOURD' ",fr="Chargement de type balourd", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique le balourd (m)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude du balourd (kg.m)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (degres)"), + ),# fin BALOURD + HARMONIQUE = BLOC(condition = "TYPE == 'HARMONIQUE' ",fr="Charge harmonique", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique la charge harmonique (m)"), + FREQUENCE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence d'excitation harmonique (Hz)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude de la charge harmonique, (N)"), + FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste de coefficients appliques sur la charge harmonique (autant que de vitesses de rotation)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (degres)"), + TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY','DZ','DRZ'),defaut=None,fr="Renseignement du DDL sur lequel s'applique la charge harmonique"), + ), # fin HARMONIQUE + ), #FIN CHARGES + ## POST-TRAITEMENTS DU CALCUL HARMONIQUE + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", + TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_RELA','REAC_NODA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), + DEPL = BLOC(condition = "TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement",regles=UN_PARMI('POSITION','PALIER'), + POSITION = SIMP(statut='f',typ='R',defaut=None,fr="Renseignement de la coordonnee du deplacement"), + PALIER = SIMP(statut='f',max='**',typ='TXM',defaut=None,fr="Renseignement du nom du palier"), + ), # fin DEPL + CONTRAINTES = BLOC(condition="TYPE == 'CONTRAINTES' ",fr="Export des contraintes",regles=UN_PARMI('POSITION','ZONE','TOUT'), + POSITION = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), + ZONE = SIMP(statut='f',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la zone de la contrainte"), + TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),min=1,max=1,fr="Export pour tous les noeuds"), + ), # fin CONTRAINTES + ), + ## fin bloc POST_TRAITEMENTS + + ),# fin ANALYSE_HARMONIQUE + +### ----- CALCUL TRANSITOIRE ----- ## + ANALYSE_TRANSISTOIRE = BLOC(condition = "TYPE_ANALYSE == 'TRANSITOIRE' ",fr="Analyse transitoire de la ligne d'arbres", + + VITESSE = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,into=('CONSTANTE','VARIABLE'),fr="Renseignement du type de vitesse de rotation consideree"), + BASE_C = BLOC(condition ="VITESSE == 'CONSTANTE'",fr="Analyse transitoire a vitesse constante" + BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('PHYSIQUE','MODALE'),defaut=None,fr="Choix du type de resolution de l'analyse transitoire (sur base physique ou sur base modale)"), + BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Resolution sur base modale", + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), + FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), + ),# fin BASE_MODALE + AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), + ),# fin AMOR_MODALE + ), # fin AMORTISSEMENT_M + ), # fin BASE_C + BASE_V = BLOC(condition ="VITESSE == 'VARIABLE'",fr="Analyse transitoire a vitesse variable" + BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('MODALE'),defaut='MODALE',fr="Choix du type de resolution de l'analyse transitoire (obligatoirement sur base modale)"), + BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Resolution sur base modale", + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), + FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), + ),# fin BASE_MODALE + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + #AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), + AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), + ),# fin AMOR_MODALE + ), # fin BASE_C + VITESSE_CONSTANTE = BLOC(condition = "VITESSE == 'CONSTANTE' ", fr="Vitesse de rotation constante", + VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation (tr/min)"), + ),# fin VITESSE_CONSTANTE + VITESSE_VARIABLE = BLOC(condition = "VITESSE == 'VARIABLE' ", fr="Vitesse de rotation variable", regles=UN_PARMI('LINEAIRE','EXPONENTIELLE','FORMULE'), + LINEAIRE = FACT(statut='f',min=1,max=1,fr="Variation lineaire de la vitesse de rotation", + VITESSE_INITIALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation initiale (tr/min)",), + VITESSE_FINALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation finale (tr/min)",), + DEPHASAGE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la postion angulaire initiale (degres)"), + PAS_MAJ = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement du pas de mise a jour des matrices des paliers (tr/min)"), + ),# fin LINEAIRE + EXPONENTIELLE = FACT(statut='f',min=1,max=1,fr="Variation exponentielle de la vitesse de rotation", + VITESSE_INITIALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation initiale (tr/min)",), + VITESSE_FINALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation finale (tr/min)",), + DEPHASAGE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la postion angulaire initiale (degres)"), + LAMBDA = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du parametre de la loi exponentielle (Hz)"), + PAS_MAJ = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement du pas de mise a jour des matrices des paliers (tr/min)"), + ),# fin EXPONENTIELLE + FORMULE = FACT(statut='f',min=1,max=1,fr="Fonction personnalisee decrivant la variation de la vitesse de rotation", + FICHIER = SIMP(statut='o',typ=('Fichier','Formule vitesse rotation (*.*)'),min=1,max=1,defaut=None,fr="Renseignement du fichier contenant les fonctions de la vitesse de rotation"), + PHI = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule de position angulaire (max 8 caractere)"), + OM = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule de vitesse angulaire (max 8 caractere)"), + ACC = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule d'acceleration angulaire (max 8 caractere)"), + VITE_MOY = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la moyenne des vitesses balayees (tr/min)"), + PAS_MAJ = SIMP(statut='f',typ='R',min=1,max='**',defaut=None,fr="Renseignement du pas de mise a jour des matrices des paliers (tr/min)"), + ),# fin FORMULE + ),# fin VITESSE_VARIABLE + #POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), + + CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", + TYPE = SIMP(statut='o',typ='TXM',into=('POIDS','BALOURD','FORCE','MOMENT','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), + BALOURD = BLOC(condition = "TYPE == 'BALOURD' ",fr="Chargement de type balourd", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique le balourd (m)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude du balourd (kg.m)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (degres)"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du balourd (s)"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre l'amplitude nominale du balourd (s)"), + ),# fin BALOURD + POIDS = BLOC(condition = "TYPE == 'POIDS' ",fr="Prise en compte du champ de pesanteur", + GRAVITE = SIMP(statut='o',typ='R',defaut=9.81,fr="Renseignement de l'intensite de la gravite (m/s^2)"), + DIRECTION = SIMP(statut='o',typ='R',min=3,max=3,defaut=(1,0,0),fr="Renseignement de la direction de la force de gravite"), + ), # fin POIDS + FORCE = BLOC(condition = "TYPE == 'FORCE' ",fr="Application d'une force ponctuelle", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique la force (m)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant la force (N)"), + #FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), + ), # fin FORCE + MOMENT = BLOC(condition = "TYPE == 'MOMENT' ",fr="Application d'un moment ponctuel", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), + ), # fin MOMENT + HARMONIQUE = BLOC(condition = "TYPE == 'HARMONIQUE' ",fr="Charge harmonique", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique la charge harmonique (m)"), + FREQUENCE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence d'excitation harmonique (Hz)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude de la charge harmonique, (N)"), + #FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge harmonique (autant de valeurs que de vitesses de rotation)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (degres)"), + TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY','DZ','DRZ'),defaut=None,fr="Renseignement du DDL sur lequel s'applique la charge harmonique"), + ), # fin HARMONIQUE + ), #fin CHARGES + + ETAT_INIT = FACT(statut='o',fr="Renseignement de l'etat initial du calcul", + #RESULTAT = SIMP(statut='o',typ=('sd_resultat'),max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), + RESULTAT = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Choix de la structure de donnees de type 'resultat' de Code_Aster"), + INST_INIT = SIMP(statut='f',typ='R',max=1,defaut=0.0,fr="Renseignement de l'instant de la structure de donnees a partir duquel il faut lancer le calcul (s)"), + ), # fin ETAT_INIT + PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS','LISTE'),defaut=None,fr="Choix du type de discretisation temporelle"), + #PAS = BLOC(condition = "VITESSE == 'VARIABLE'",fr="Renseignement des parametres des pas", + PAS = BLOC(condition = "PARAM_TEMPS == 'PAS'",fr="Renseignement de pas de temps", + TEMPS_PAS = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps d'integration(en s)"), + INST_INI = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de l'instant initial du calcul (s)"), + INST_FIN = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de l'instant final du calcul (s)"), + ), # fin TEMPS_PAS + LIST_INST = BLOC(condition = "PARAM_TEMPS == 'LISTE'",fr="Renseignement d'une liste d'instants", + LISTE = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement d'une liste d'instants auxquels resoudre le calcul (s)"), + ), # fin LIST_INST + PAS_ARCHIVAGE = SIMP(statut='o',typ='I',max=1,defaut=1,fr="Renseignement du pas d'archivage des resultats (une sauvegarde tous les 'PAS_ARCHIVAGE' instants d'integration)",), + SCHEMA_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('NEWMARK','EULER','WILSON','ADAPT_ORDRE1','ADAPT_ORDRE2','DIFF_CENTRE'),defaut='NEWMARK',fr="Choix d'un schema d'integration temporelle"), + NEWMARK = BLOC(condition = "SCHEMA_TEMPS == 'NEWMARK' ",fr="Methode de NEWMARK", + BETA = SIMP(statut='f',typ='R',max=1,defaut=0.25,fr="Renseignement de la valeur beta pour la methode de NEWMARK"), + GAMMA = SIMP(statut='f',typ='R',max=1,defaut=0.25,fr="Renseignement de la valeur gamma pour la methode de NEWMARK"), + ),# fin NEWMARK + WILSON = BLOC(condition = "SCHEMA_TEMPS == 'WILSON' ",fr="Methode de WILSON", + THETA = SIMP(statut='f',typ='R',max=1,defaut=1.4,fr="Renseignement de la valeur theta pour la methode de WILSON"), + ), # fin WILSON + + ## POST_TRAITEMENTS de l'analyse transitoire + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", + TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), + DEPL = BLOC(condition = "TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement",regles=UN_PARMI('POSITION','PALIER'), + #POSITION_DEPL = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du deplacement"), + POSITION = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du deplacement"), + PALIER = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), + ), # fin DEPL + CONTRAINTES = BLOC(condition = "TYPE == 'CONTRAINTES' ",fr="Export des contraintes", + regles=UN_PARMI('POSITION','ZONE','TOUT'), + POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), + ZONE = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette de la zone de la contrainte"), + TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),max=1,fr="Export pour tous les noeuds"), + ), # fin CONTRAINTES + ), # fin POST_TRAITEMENTS + + ), # fin ANALYSE_TRANSISTOIRE + + +### ----- CALCUL COUPLE CODE_ASTER/EYDOS ----- ## + ANALYSE_TRANSITOIRE_ACCIDENTEL = BLOC(condition = "TYPE_ANALYSE == 'TRANSITOIRE_ACCIDENTEL' ",fr="Analyse transitoire accidentelle de la ligne d'arbres", + #BASE_MODALE = FACT(statut='o', fr="Choix des parametres de la base modale", + #POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), + BASE_MODALE = BLOC(condition = "True", fr="Resolution sur base modale", + regles=UN_PARMI('NB_MODES','FREQ_MAX'), + NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), + FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), + ),# fin BASE_MODALE + # cft 20131217 suppression amortissement reduit + #AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL','REDUIT'),defaut=None,fr="Choix du type d'amortissement"), + AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), + AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", + #LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), + LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements modaux reduits (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), + ),# fin AMOR_REDUIT + VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation (tr/min)"), + + CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", + TYPE = SIMP(statut='o',typ='TXM',into=('POIDS','BALOURD','FORCE','MOMENT','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), + BALOURD = BLOC(condition = "TYPE == 'BALOURD' ",fr="Chargement de type balourd", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique le balourd (m)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude du balourd (kg.m)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (degres)"), + INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du balourd (s)"), + TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre l'amplitude nominale du balourd (s)"), + ),# fin BALOURD + POIDS = BLOC(condition = "TYPE == 'POIDS' ",fr="Prise en compte du champ de pesanteur", + GRAVITE = SIMP(statut='o',typ='R',defaut=9.81,fr="Renseignement de l'intensite de la gravite (m/s^2)"), + DIRECTION = SIMP(statut='o',typ='R',min=3,max=3,defaut=(1,0,0),fr="Renseignement de la direction de la force de gravite"), + ), # fin POIDS + FORCE = BLOC(condition = "TYPE == 'FORCE' ",fr="Application d'une force ponctuelle", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), + #FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), + ), # fin FORCE + MOMENT = BLOC(condition = "TYPE == 'MOMENT' ",fr="Application d'un moment ponctuel", + POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), + ), # fin MOMENT + HARMONIQUE = BLOC(condition = "TYPE == 'HARMONIQUE' ",fr="Charge harmonique", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique la charge harmonique (m)"), + FREQUENCE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence d'excitation harmonique (Hz)"), + MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude de la charge harmonique, (N)"), + #FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge harmonique (autant de valeurs que de vitesses de rotation)"), + PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (degres)"), + TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY','DZ','DRZ'),defaut=None,fr="Renseignement du DDL sur lequel s'applique la charge harmonique"), + ), # fin HARMONIQUE + ), #fin CHARGES + ETAT_INIT = FACT(statut='o',fr="Renseignement de l'etat initial du calcul", + #RESULTAT = SIMP(statut='o',typ=('sd_resultat'),max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), + # 20121126 + #RESULTAT = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), + INST_INIT = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de l'instant initial a partir duquel il faut lancer le calcul (s)"), + ), # fin ETAT_INIT + #PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS','LIST_INST'),defaut=None,fr="Choix du type de parametrage temporel"), + # 20121126 + PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS'),defaut="PAS",fr="Choix du type de discretisation temporelle",), + PAS = BLOC(condition = "PARAM_TEMPS == 'PAS' ",fr="Renseignement de pas de temps", + PAS_ASTER = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps d'integration Code_Aster (en s)",), + PAS_EDYOS = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps d'integration Edyos (en s)",), + INST_FIN = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de l'instant final du calcul (en s)",), + ), # fin TEMPS_PAS + #LIST_INST = BLOC(condition = "PARAM_TEMPS == 'LIST_INST' ",fr="Renseignement d'une liste de pas", + #LISTE = SIMP(statut='f',typ='R',min=1,max='**',defaut=None,fr="Renseignement d'une liste de pas"), + #), # fin LIST_INST + PAS_ARCHIVAGE = SIMP(statut='o',typ='I',max=1,defaut=1,fr="Renseignement du pas d'archivage des resultats (une sauvegarde tous les 'PAS_ARCHIVAGE' instants d'integration)",), + PARA_MEM = SIMP(statut='f',typ='I',max=1,defaut=6400,fr="Renseigner la taille maximale de la memoire (Mo)",), + PARA_CPU = SIMP(statut='f',typ='I',max=1,defaut=10000,fr="Renseigner le temps CPU maximal (s)",), + SCHEMA_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('EULER','ADAPT_ORDRE1','ADAPT_ORDRE2'),defaut='ADAPT_ORDRE2',fr="Choix d'un schema d'integration temporelle"), + + ## POST_TRAITEMENTS de l'analyse transitoire + POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", + TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), + DEPL = BLOC(condition = "TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement", + POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du deplacement"), + PALIER = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), + ), # fin DEPL + # pas d'info à rentrer pour les efforts palier (post-traitement sur tout les paliers) + #EFFORTS_PAL = BLOC(condition = "TYPE == 'EFFORTS_PAL'", fr = "Efforts paliers", + #PALIER = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), + #), # fin EFFORTS_PAL + CONTRAINTES = BLOC(condition = "TYPE == 'CONTRAINTES' ",fr="Export des contraintes", + regles=UN_PARMI('POSITION','ZONE','TOUT'), + POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), + ZONE = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette de la zone de la contrainte"), + TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),max=1,fr="Export pour tous les noeuds"), + ), # fin CONTRAINTES + ), # fin POST_TRAITEMENTS + + + ), # fin ANALYSE_TRANSITOIRE_ACCIDENTEL + +)# fin SPECIFICATION_ANALYSE diff --git a/OldCodes/SPECA/configuration_SPECA.py b/OldCodes/SPECA/configuration_SPECA.py new file mode 100644 index 00000000..b9b56fe0 --- /dev/null +++ b/OldCodes/SPECA/configuration_SPECA.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== +""" + Ce module sert pour charger les paramètres de configuration d'EFICAS +""" +# Modules Python +from InterfaceQT4 import configuration +import os + + +class CONFIG(configuration.CONFIG_BASE): + + #----------------------------------- + def __init__(self,appli,repIni): + #----------------------------------- + + self.labels_user=['catalogues','lang'] + self.labels_eficas=['lang','rep_cata','catalogues'] + + configuration.CONFIG_BASE.__init__(self,appli,repIni) + + +def make_config(appli,rep): + return CONFIG(appli,rep) + diff --git a/OldCodes/SPECA/prefs.py b/OldCodes/SPECA/prefs.py new file mode 100644 index 00000000..cba83434 --- /dev/null +++ b/OldCodes/SPECA/prefs.py @@ -0,0 +1,4 @@ +code='SPECA' +import sys, os +if os.path.abspath(__file__) not in sys.path : + sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/OldCodes/SPECA/prefs_SPECA.py b/OldCodes/SPECA/prefs_SPECA.py new file mode 100644 index 00000000..21b1e76c --- /dev/null +++ b/OldCodes/SPECA/prefs_SPECA.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +import os,sys +# repIni sert a localiser le fichier editeur.ini +# Obligatoire +repIni=os.path.dirname(os.path.abspath(__file__)) +INSTALLDIR=os.path.join(repIni,'..') +sys.path[:0]=[INSTALLDIR] + +# lang indique la langue utilisee pour les chaines d'aide : fr ou ang +lang='fr' + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +encoding='iso-8859-1' + +# +catalogues=( + ('SPECA','V2016',os.path.join(repIni,'SPECA_Cata_V2016.py'),'python','python'), +) diff --git a/OldCodes/SPECA/properties.py b/OldCodes/SPECA/properties.py new file mode 100644 index 00000000..1d328a46 --- /dev/null +++ b/OldCodes/SPECA/properties.py @@ -0,0 +1,24 @@ +#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR +# RESPONSABLE D6BHHHH J-P.LEFEBVRE +# ====================================================================== +# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# ====================================================================== +# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR +# DE LA VERSION DU CODE_ASTER ASSOCIE +#---------------------------------------------------------------------- +version = "1.2" +date = "25/05/2010" +exploit = False diff --git a/OldCodes/SPECA/qtEficasSPECA.py b/OldCodes/SPECA/qtEficasSPECA.py new file mode 100755 index 00000000..aa4bb0ec --- /dev/null +++ b/OldCodes/SPECA/qtEficasSPECA.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour MAP +""" +# Modules Python +# Modules Eficas +import prefs +name='prefs_'+prefs.code +__import__(name) + + +import sys,os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +import prefs +from InterfaceQT4 import eficas_go +eficas_go.lance_eficas(code=prefs.code) diff --git a/OldCodes/Sep/SEP_Cata_V1_4.py b/OldCodes/Sep/SEP_Cata_V1_4.py index 462b8c6d..13b4bac6 100644 --- a/OldCodes/Sep/SEP_Cata_V1_4.py +++ b/OldCodes/Sep/SEP_Cata_V1_4.py @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Sep/__init__.py b/OldCodes/Sep/__init__.py index 8ed65e16..5b4f0e3b 100644 --- a/OldCodes/Sep/__init__.py +++ b/OldCodes/Sep/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Sep/configuration_SEP.py b/OldCodes/Sep/configuration_SEP.py index 4c7fcae7..f9901549 100644 --- a/OldCodes/Sep/configuration_SEP.py +++ b/OldCodes/Sep/configuration_SEP.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Sep/prefs.py b/OldCodes/Sep/prefs.py index f91e53af..f16320e0 100644 --- a/OldCodes/Sep/prefs.py +++ b/OldCodes/Sep/prefs.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Sep/prefs_SEP.py b/OldCodes/Sep/prefs_SEP.py index 66a112fb..742a89d1 100644 --- a/OldCodes/Sep/prefs_SEP.py +++ b/OldCodes/Sep/prefs_SEP.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Sep/qtEficas_SEP.py b/OldCodes/Sep/qtEficas_SEP.py index 741a2e49..fb82fabb 100755 --- a/OldCodes/Sep/qtEficas_SEP.py +++ b/OldCodes/Sep/qtEficas_SEP.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/ZCracks/prefs.py b/OldCodes/ZCracks/prefs.py index d7a65711..5252a94c 100644 --- a/OldCodes/ZCracks/prefs.py +++ b/OldCodes/ZCracks/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/ZCracks/qtEficas_ZCracks.py b/OldCodes/ZCracks/qtEficas_ZCracks.py index b1254f2c..7f9a6e2c 100755 --- a/OldCodes/ZCracks/qtEficas_ZCracks.py +++ b/OldCodes/ZCracks/qtEficas_ZCracks.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/boundary_conditions/CMakeLists.txt b/OldCodes/boundary_conditions/CMakeLists.txt new file mode 100644 index 00000000..9d5d3202 --- /dev/null +++ b/OldCodes/boundary_conditions/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (C) 2012-2013 EDF +# +# This file is part of SALOME HYDRO module. +# +# SALOME HYDRO module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SALOME HYDRO module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SALOME HYDRO module. If not, see . + +# --- Python files --- + +SET(PYFILES + __init__.py + configuration_boundary_conditions.py + prefs_boundary_conditions.py + prefs.py + boundary_conditions_cata.py + appli.py + generator_boundary_conditions.py +) + +# --- rules --- + +SALOME_INSTALL_SCRIPTS("${PYFILES}" ${SALOME_INSTALL_PYTHON}/salome/hydro/boundary_conditions/eficas) diff --git a/OldCodes/boundary_conditions/__init__.py b/OldCodes/boundary_conditions/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/OldCodes/boundary_conditions/appli.py b/OldCodes/boundary_conditions/appli.py new file mode 100644 index 00000000..b3783292 --- /dev/null +++ b/OldCodes/boundary_conditions/appli.py @@ -0,0 +1,45 @@ +# Copyright (C) 2012-2013 EDF +# +# This file is part of SALOME HYDRO module. +# +# SALOME HYDRO module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SALOME HYDRO module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SALOME HYDRO module. If not, see . + +import os +import sys + +import SalomePyQt +sgPyQt = SalomePyQt.SalomePyQt() + +import eficasSalome + +class EficasForBoundaryConditionsAppli(eficasSalome.MyEficas): + """ + This class launches Eficas with "boundary_conditions" catalog. + """ + def __init__(self, fichier = None, version = None): + self.codedir = os.path.dirname(__file__) + sys.path[:0] = [self.codedir] + eficasSalome.MyEficas.__init__(self, sgPyQt.getDesktop(), "boundary_conditions", + fichier, version = version) + + def addJdcInSalome(self, jdcPath): + """ + Those files are not added in Salome study tree for now. + """ + pass + + def closeEvent(self, event): + while self.codedir in sys.path: + sys.path.remove(self.codedir) + eficasSalome.MyEficas.closeEvent(self, event) diff --git a/OldCodes/boundary_conditions/boundary_conditions_cata.py b/OldCodes/boundary_conditions/boundary_conditions_cata.py new file mode 100644 index 00000000..f41671c3 --- /dev/null +++ b/OldCodes/boundary_conditions/boundary_conditions_cata.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2012-2013 EDF +# +# This file is part of SALOME HYDRO module. +# +# SALOME HYDRO module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SALOME HYDRO module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SALOME HYDRO module. If not, see . + +from Accas import * + +class grma(GEOM): + """ + Class used to define the group on which the boundary condition is defined. + Method __convert__ is redefined to skip the test on the string length. + """ + def __convert__(cls, valeur): + if isinstance(valeur, (str, unicode)): + return valeur.strip() + raise ValueError('A string is expected') + + __convert__ = classmethod(__convert__) + + +JdC = JDC_CATA(regles = (AU_MOINS_UN('BOUNDARY_CONDITION',)), + ) + +BOUNDARY_CONDITION = PROC( + nom = "BOUNDARY_CONDITION", op = None, + fr = u"Définition d'une condition limite pour Telemac2D", + ang = u"Definition of a boundary condition for Telemac2D", + + GROUP = SIMP(statut = "o", typ = grma, + fr = u"Groupe sur lequel la condition limite est définie", + ang = u"Group on which the boundary condition is defined", + ), + LIHBOR = SIMP(statut = "o", typ = "I", + fr = u"Type de condition limite pour la hauteur d'eau", + ang = u"Boundary condition type for the water height", + ), + LIUBOR = SIMP(statut = "o", typ = "I", + fr = u"Type de condition limite pour la composante U de la vitesse", + ang = u"Boundary condition type for the U component of the water velocity", + ), + LIVBOR = SIMP(statut = "o", typ = "I", + fr = u"Type de condition limite pour la composante V de la vitesse", + ang = u"Boundary condition type for the V component of the water velocity", + ), +) diff --git a/OldCodes/boundary_conditions/configuration_boundary_conditions.py b/OldCodes/boundary_conditions/configuration_boundary_conditions.py new file mode 100644 index 00000000..ffed4a66 --- /dev/null +++ b/OldCodes/boundary_conditions/configuration_boundary_conditions.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2012-2013 EDF +# +# This file is part of SALOME HYDRO module. +# +# SALOME HYDRO module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SALOME HYDRO module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SALOME HYDRO module. If not, see . + +import os + +from Editeur.catadesc import CatalogDescription +from InterfaceQT4.configuration import CONFIG_BASE + +class CONFIG(CONFIG_BASE): + + def __init__(self, appli, repIni): + """ + This class stores the configuration parameters for Eficas + """ + CONFIG_BASE.__init__(self, appli, repIni) + + # Configuration parameters + self.savedir = os.getenv("HOME") + self.catalogues = (CatalogDescription("boundary_conditions", + os.path.join(repIni, "boundary_conditions_cata.py"), + file_format = "boundary_conditions"),) + self.lang = 'fr' + self.generator_module = "generator_boundary_conditions" + + def save_params(self): + pass + +def make_config(appli, rep): + return CONFIG(appli, rep) + +def make_config_style(appli, rep): + return None diff --git a/OldCodes/boundary_conditions/generator_boundary_conditions.py b/OldCodes/boundary_conditions/generator_boundary_conditions.py new file mode 100644 index 00000000..ea7235dd --- /dev/null +++ b/OldCodes/boundary_conditions/generator_boundary_conditions.py @@ -0,0 +1,57 @@ +# Copyright (C) 2012-2013 EDF +# +# This file is part of SALOME HYDRO module. +# +# SALOME HYDRO module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SALOME HYDRO module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SALOME HYDRO module. If not, see . + +import os +from generator.generator_python import PythonGenerator + +def entryPoint(): + return {'name': 'boundary_conditions', + 'factory': BoundaryConditionsGenerator} + +class BoundaryConditionsGenerator(PythonGenerator): + """ + This generator creates files containing associations between groups and + boundary conditions (.bcd files, for Boundary Conditions Definition). + Those files contain one line per group, each line containing four fields + separated by spaces: LIHBOR LIUBOR LIVBOR GROUP. + LIHBOR, LIUBOR and LIVBOR are integer values, GROUP is a string (the name of + the group). + + Example: + + + """ + + def gener(self, obj, format = 'brut', config = None): + self.group_list = [] + self.text = PythonGenerator.gener(self, obj, format) + return self.text + + def generPROC_ETAPE(self, obj): + group_dict = {} + for keyword in obj.mc_liste: + group_dict[keyword.nom] = keyword.valeur + self.group_list.append(group_dict) + return PythonGenerator.generPROC_ETAPE(self, obj) + + def writeDefault(self, basefilename): + output_filename = os.path.splitext(basefilename)[0] + ".bcd" + f = open(output_filename, 'w') + f.write("%d\n" % len(self.group_list)) + for group_dict in self.group_list: + f.write("%(LIHBOR)d %(LIUBOR)d %(LIVBOR)d %(GROUP)s\n" % group_dict) + f.close() diff --git a/OldCodes/boundary_conditions/prefs.py b/OldCodes/boundary_conditions/prefs.py new file mode 100644 index 00000000..8f7d046d --- /dev/null +++ b/OldCodes/boundary_conditions/prefs.py @@ -0,0 +1,18 @@ +# Copyright (C) 2012-2013 EDF +# +# This file is part of SALOME HYDRO module. +# +# SALOME HYDRO module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SALOME HYDRO module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SALOME HYDRO module. If not, see . + +code = "boundary_conditions" diff --git a/OldCodes/boundary_conditions/prefs_boundary_conditions.py b/OldCodes/boundary_conditions/prefs_boundary_conditions.py new file mode 100644 index 00000000..bcf1ef2d --- /dev/null +++ b/OldCodes/boundary_conditions/prefs_boundary_conditions.py @@ -0,0 +1,21 @@ +# Copyright (C) 2012-2013 EDF +# +# This file is part of SALOME HYDRO module. +# +# SALOME HYDRO module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SALOME HYDRO module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SALOME HYDRO module. If not, see . + +import os + +repIni = os.path.dirname(__file__) +INSTALLDIR = os.getenv("EFICAS_ROOT") diff --git a/OldCodes/ts/prefs.py b/OldCodes/ts/prefs.py index 87710926..33c6a627 100644 --- a/OldCodes/ts/prefs.py +++ b/OldCodes/ts/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/PSEN_Eficas/ExtractGeneratorLoadLineandTransfoDico.py b/PSEN_Eficas/ExtractGeneratorLoadLineandTransfoDico.py deleted file mode 100755 index 9427e18c..00000000 --- a/PSEN_Eficas/ExtractGeneratorLoadLineandTransfoDico.py +++ /dev/null @@ -1,173 +0,0 @@ -#NetworkFile = r"C:\Users\J15773\Documents\GTDosier\PSENdocs\Victoria ALL - EFICAS PSEN\Data\2030Conv_HFP2.sav" -#PSSE_PATH = "C:/Program Files/PTI/PSSE33/PSSBIN" #emplacement de PSSE - -def ExtractGeneratorLoadLineandTransfoDico(NetworkFile,PSSE_PATH): - - import os - import sys - - print NetworkFile - print PSSE_PATH - sys.path.append(PSSE_PATH) - os.environ['PATH'] += ';' + PSSE_PATH + ';' - - import psspy - import redirect - - ###initialization PSSE - psspy.psseinit(10000) - _i=psspy.getdefaultint() - _f=psspy.getdefaultreal() - _s=psspy.getdefaultchar() - redirect.psse2py() - - # Silent execution of PSSe - islct=6 # 6=no output; 1=standard - psspy.progress_output(islct) - - #open Network File - psspy.case(NetworkFile) - - #Extract Loads - sid = -1 #all buses - flag = 1 #all in service loads/generators (4 all loads/generators) - - - string = ['NUMBER'] - ierr,iarray = psspy.aloadint(sid,flag,string) - - string = ['NAME','ID','EXNAME'] - ierr,carray = psspy.aloadchar(sid,flag,string) - - LoadDico = {} # [Bus name, load ID, extended bus name, bus number] - for i in range(len(iarray[0])): - idname = "Lo" + str(int(carray[1][i])) - loadname = carray[0][i].strip()+ "__" + idname - loadname = loadname.replace(" ","_") - loadname = loadname.replace(".","_") - loadname = loadname.replace("&","and") - try: - int(loadname[0]) - loadname="_" + loadname - except: - pass - LoadDico[loadname]= {} - LoadDico[loadname]['BusName'] = carray[0][i].strip() - LoadDico[loadname]['ID'] = carray[1][i] - LoadDico[loadname]['BusExName'] =carray[2][i] - LoadDico[loadname]['BusNum']=iarray[0][i] - - #Extract Generators - sid = -1 #all buses - flag = 1 #all in service loads/generators (4 all loads/generators) - - string = ['NUMBER'] - ierr,iarray = psspy.amachint(sid,flag,string) - - string = ['NAME','ID','EXNAME'] - ierr,carray = psspy.amachchar(sid,flag,string) - - MachineDico = {} # [Bus name, machine ID, extended bus name, bus number] - for i in range(len(iarray[0])): - idname = "Gr" + str(int(carray[1][i])) - machinename = carray[0][i].strip()+ "__" + idname - machinename = machinename.replace(" ","_") - machinename = machinename.replace(".","_") - machinename = machinename.replace("&","and") - try: - int(machinename[0]) - machinename="_" + machinename - except: - pass - MachineDico[machinename]={} - MachineDico[machinename]['NAME'] = carray[0][i].strip() - MachineDico[machinename]['ID'] = carray[1][i] - MachineDico[machinename]['EXNAME'] =carray[2][i] - MachineDico[machinename]['NUMBER']=iarray[0][i] - - #Extract Lignes - sid = -1 - owner = 1 - ties = 1 - flag = 2 #6 for two-winding transfos - entry = 1 #each branch once, not both directions - string = ['FROMNUMBER','TONUMBER'] - ierr,iarray = psspy.abrnint(sid,owner,ties,flag,entry,string) - string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] - ierr,carray = psspy.abrnchar(sid,owner,ties,flag,entry,string) - - LineDico = {} #[linename, Bus name 1, Bus name 2, ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] - for i in range(len(iarray[0])): - idname = carray[4][i] - if '@' in idname: - idname = idname.replace('@','Br') - else: - idname = 'Li' + str(int(idname)) - linename =carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname - linename = linename.replace(" ","_") - linename = linename.replace(".","_") - linename = linename.replace("&","and") - try: - int(linename[0]) - linename="_" + linename - except: - pass - LineDico[linename]={} - LineDico[linename]['FROMNAME']=carray[0][i].strip() - LineDico[linename]['TONAME']=carray[1][i].strip() - LineDico[linename]['ID']=carray[4][i] - LineDico[linename]['FROMEXNAME']=carray[2][i] - LineDico[linename]['TOEXNAME']=carray[3][i] - LineDico[linename]['FROMNUMBER']=iarray[0][i] - LineDico[linename]['TONUMBER']=iarray[1][i] - - #Extract Transfos - sid = -1 - owner = 1 - ties = 1 - flag = 6 #two-winding transfos - entry = 1 #each branch once, not both directions - string = ['FROMNUMBER','TONUMBER'] - ierr,iarray = psspy.abrnint(sid,owner,ties,flag,entry,string) - string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] - ierr,carray = psspy.abrnchar(sid,owner,ties,flag,entry,string) - - TfoDico = {} #[linename, Bus name 1, Bus name 2, machine ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] - for i in range(len(iarray[0])): - idname = 'Tr' + str(int(carray[4][i])) - tfoname = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname - tfoname = tfoname.replace(" ","_") - tfoname = tfoname.replace(".","_") - tfoname = tfoname.replace("&","and") - try: - int(tfoname[0]) - tfoname="_" + tfoname - except: - pass - TfoDico[tfoname]={} - TfoDico[tfoname]['FROMNAME']=carray[0][i].strip() - TfoDico[tfoname]['TONAME']=carray[1][i].strip() - TfoDico[tfoname]['ID']=carray[4][i] - TfoDico[tfoname]['FROMEXNAME']=carray[2][i] - TfoDico[tfoname]['TOEXNAME']=carray[3][i] - TfoDico[tfoname]['FROMNUMBER']=iarray[0][i] - TfoDico[tfoname]['TONUMBER']=iarray[1][i] - - return MachineDico, LoadDico, LineDico, TfoDico - - -#MachineDico, LoadDico, LineDico, TfoDico = ExtractGeneratorLoadLineandTransfoDico(NetworkFile,PSSE_PATH) - - -def ExtractGeneratorLoadLineandTransfoDico2(NetworkFile,PSSE_PATH): - MachineDico={'M1':'M1','M2':'M2','M3':'M3','M4':'M4','B6_BUS13__1':'AZ','CSPRING__1':'DD','GT12B__1':'ER','BSTMB__1':'JJ'} - LoadDico={'C1':'C1','C2':'C2','C3':'C3','C4':'C4'} - LineDico={'L1':'L1','L2':'L2','L3':'L3','L4':'L4'} - TfoDico={'T1':'T1','T2':'T2','T3':'T3','T4':'T4'} - MDico={'MZ1':'MZ1','MZ2':'MZ2','MZ3':'MZ3','MZ4':'MZ4'} - if NetworkFile == '/home/A96028/PSEN/PSEN_V8/Code/PSEN_Eficas/faux2.sav': - print "sans T1" - TfoDico={'T2':'T2','T3':'T3','T4':'T4'} - - - return MachineDico, LoadDico, LineDico, TfoDico, MDico diff --git a/PSEN_Eficas/ExtractGeneratorandLoadList.py b/PSEN_Eficas/ExtractGeneratorandLoadList.py deleted file mode 100755 index 08f45480..00000000 --- a/PSEN_Eficas/ExtractGeneratorandLoadList.py +++ /dev/null @@ -1,70 +0,0 @@ -NetworkFile = r"C:\Users\J15773\Documents\GTDosier\PSENdocs\Victoria ALL - EFICAS PSEN\Data\2030Conv_HFP2.sav" -PSSE_PATH = "C:/Program Files/PTI/PSSE33/PSSBIN" #emplacement de PSSE - -def ExtractGeneratorandLoadList(NetworkFile,PSSE_PATH): - - import os - import sys - - print NetworkFile - print PSSE_PATH - sys.path.append(PSSE_PATH) - os.environ['PATH'] += ';' + PSSE_PATH + ';' - - import psspy - import redirect - - ###initialization PSSE - psspy.psseinit(10000) - _i=psspy.getdefaultint() - _f=psspy.getdefaultreal() - _s=psspy.getdefaultchar() - redirect.psse2py() - - # Silent execution of PSSe - islct=6 # 6=no output; 1=standard - psspy.progress_output(islct) - - #open Network File - psspy.case(NetworkFile) - - #Extract Loads - sid = -1 #all buses - flag = 1 #all in service loads/generators (4 all loads/generators) - - - string = ['NUMBER'] - ierr,iarray = psspy.aloadint(sid,flag,string) - - string = ['NAME','ID','EXNAME'] - ierr,carray = psspy.aloadchar(sid,flag,string) - - LoadList = [] # [Bus name, load ID, extended bus name, bus number] - for i in range(len(iarray[0])): - LoadList.append([carray[0][i].strip(),carray[1][i],carray[2][i],iarray[0][i]]) - - #Extract Generators - sid = -1 #all buses - flag = 1 #all in service loads/generators (4 all loads/generators) - - string = ['NUMBER'] - ierr,iarray = psspy.amachint(sid,flag,string) - - string = ['NAME','ID','EXNAME'] - ierr,carray = psspy.amachchar(sid,flag,string) - - MachineList = [] # [Bus name, machine ID, extended bus name, bus number] - for i in range(len(iarray[0])): - MachineList.append([carray[0][i].strip(),carray[1][i],carray[2][i],iarray[0][i]]) - - return MachineList, LoadList - -def ExtractGeneratorandLoadList2(NetworkFile,PSSE_PATH): - MachineList = [['GT 6', '1 ', 'GT 6 11.500', 10], ['GT 7', '1 ', 'GT 7 11.500', 11], ['GT10', '1 ', 'GT10 11.500', 12], ['GT 5', '1 ', 'GT 5 11.500', 13], ['NEWHUNT', '1 ', 'NEWHUNT 11.500', 15], ['BSTMB', '1 ', 'BSTMB 11.500', 23], ['HYD_MAG', '1 ', 'HYD_MAG 6.9000', 25], ['RF1', '1 ', 'RF1 13.800', 37], ['OH2', '1 ', 'OH2 13.800', 41], ['RF2', '1 ', 'RF2 13.800', 42], ['GT3', '1 ', 'GT3 11.500', 43], ['OH3', '1 ', 'OH3 13.800', 47], ['OH4', '1 ', 'OH4 13.800', 50], ['OH6', '1 ', 'OH6 13.800', 52], ['GT 11', '1 ', 'GT 11 11.500', 56], ['B6_BUS13', '1 ', 'B6_BUS13 13.800', 57], ['GT8', '1 ', 'GT8 11.500', 58], ['HYDRR', '1 ', 'HYDRR 6.9000', 59], ['GT9', '1 ', 'GT9 11.500', 63], ['HYD_UWR', '1 ', 'HYD_UWR 6.9000', 64], ['HYD_RIOB', '1 ', 'HYD_RIOB 6.9000', 65], ['HRYD_LW', '1 ', 'HRYD_LW 6.9000', 68], ['GT13B', '1 ', 'GT13B 11.500', 76], ['GT12B', '1 ', 'GT12B 11.500', 77], ['CSPRING', '1 ', 'CSPRING 69.000', 91], ['OLDHARB1', '1 ', 'OLDHARB1 138.00', 114], ['WIGTON', '1 ', 'WIGTON 0.6900', 202], ['JEPWK1', '1 ', 'JEPWK1 11.500', 300], ['JEPWK1', '2 ', 'JEPWK1 11.500', 300], ['JEPWK1', '3 ', 'JEPWK1 11.500', 300], ['JEPWK2', '1 ', 'JEPWK2 11.500', 301], ['JEPWK2', '2 ', 'JEPWK2 11.500', 301], ['JEPWK2', '3 ', 'JEPWK2 11.500', 301], ['W_MUN1', '1 ', 'W_MUN1 69.000', 503], ['HYD_RHORN', '1 ', 'HYD_RHORN 69.000', 711]] - - LoadList= [['TREDEGAR', '1 ', 'TREDEGAR 69.000', 5], ['HOPE', '1 ', 'HOPE 69.000', 16], ['MILCHELT', '1 ', 'MILCHELT 69.000', 17], ['PARADISE', '1 ', 'PARADISE 69.000', 24], ['BLEDGE', '1 ', 'BLEDGE 69.000', 26], ['CANE RIV', '1 ', 'CANE RIV 69.000', 27], ['HIGHGATE', '1 ', 'HIGHGATE 69.000', 29], ['QUEENS D', '1 ', 'QUEENS D 69.000', 30], ['OCHO', '1 ', 'OCHO 69.000', 32], ['BOGUE_69', '1 ', 'BOGUE_69 69.000', 33], ['ROSE HAL', '1 ', 'ROSE HAL 69.000', 35], ['OH1', '1 ', 'OH1 13.800', 36], ['RF1', '1 ', 'RF1 13.800', 37], ['CEMENT C', '1 ', 'CEMENT C 69.000', 38], ['OBAY69', '1 ', 'OBAY69 69.000', 39], ['DUNCANS6', '1 ', 'DUNCANS6 69.000', 40], ['OH2', '1 ', 'OH2 13.800', 41], ['RF2', '1 ', 'RF2 13.800', 42], ['3MLS69', '1 ', '3MLS69 69.000', 45], ['WBLVD69', '1 ', 'WBLVD69 69.000', 46], ['OH3', '1 ', 'OH3 13.800', 47], ['PORT ANT', '1 ', 'PORT ANT 69.000', 48], ['OH4', '1 ', 'OH4 13.800', 50], ['B6_BUS13', '1 ', 'B6_BUS13 13.800', 57], ['GREENWOO', '1 ', 'GREENWOO 69.000', 60], ['LYSSONS', '1 ', 'LYSSONS 69.000', 61], ['PORUS', '1 ', 'PORUS 69.000', 62], ['R RIVER', '1 ', 'R RIVER 69.000', 66], ['MARTHA B', '1 ', 'MARTHA B 69.000', 67], ['WKH69', '1 ', 'WKH69 69.000', 69], ['PNASUS69', '1 ', 'PNASUS69 69.000', 70], ['ANNOTTO', '1 ', 'ANNOTTO 69.000', 71], ['UW RIVER', '1 ', 'UW RIVER 69.000', 74], ['KNDAL 69', '1 ', 'KNDAL 69 69.000', 75], ['MONYMUSK', '1 ', 'MONYMUSK 69.000', 78], ['OROCABES', '1 ', 'OROCABES 69.000', 79], ['MAGGOTTY', '1 ', 'MAGGOTTY 69.000', 80], ['UP PARK', '1 ', 'UP PARK 69.000', 82], ['TWICKENH', '1 ', 'TWICKENH 69.000', 85], ['MAY PEN', '1 ', 'MAY PEN 69.000', 88], ['PAJ', '1 ', 'PAJ 69.000', 89], ['GROAD_69', '1 ', 'GROAD_69 69.000', 90], ['CSPRING', '1 ', 'CSPRING 69.000', 91], ['S_ TREE6', '1 ', 'S_ TREE6 69.000', 92], ['NAGGOS H', '1 ', 'NAGGOS H 69.000', 94], ['GOODYEAR', '1 ', 'GOODYEAR 69.000', 99], ['HBAY_69', '1 ', 'HBAY_69 69.000', 101], ['RFORT69', '1 ', 'RFORT69 69.000', 102], ['RHODEN P', '1 ', 'RHODEN P 69.000', 105], ['DUHANEY6', '1 ', 'DUHANEY6 69.000', 107], ['CARDIFF', '1 ', 'CARDIFF 69.000', 109], ['JAB13.8', '1 ', 'JAB13.8 13.800', 112], ['JAM13.8', '1 ', 'JAM13.8 13.800', 113]] - return MachineList, LoadList - -if __name__ == "__main__": - MachineList,LoadList= ExtractGeneratorandLoadList2(NetworkFile,PSSE_PATH) - print MachineList, LoadList diff --git a/PSEN_Eficas/PSEN/PSEN_GUI.py b/PSEN_Eficas/PSEN/PSEN_GUI.py deleted file mode 100755 index 32b22dbe..00000000 --- a/PSEN_Eficas/PSEN/PSEN_GUI.py +++ /dev/null @@ -1,1220 +0,0 @@ -# -*- coding: cp1252 -*- -# ======================== PSEN graphic interface ======================== -# This Python script creates a graphical interface to parameter and launch PSEN - -# ============== Import useful modules ================= -from Tkinter import * -from ttk import Combobox -import tkFileDialog, os -import subprocess -from time import sleep -import numpy as np - -# ============== Initialize some variables ================= -config=[] -for i in range (60) : # config[] will be used as a list of preferences for PSEN study - config.append('') - -root = Tk() # Creates the main window -root.wm_withdraw() # The main window is withdrawn/hidden - -CIST=PhotoImage(file="lib\CISTlogo.gif") # Load images -header=PhotoImage(file="lib\header.gif") -WTcurve=PhotoImage(file="lib\WTcurve.gif") - -# ============== Define functions ================= - -# browse_PSSe function is used to get the .SAV file path from the user. -# tkFileDialog.askopenfilename offers a browsing interface to the user -def browse_PSSe() : - global savAdress - savAdress = tkFileDialog.askopenfilename(parent=fenPref,title='Open PSSe SAV file',filetypes=[('SAV files', '.sav')]) - savAdressD.set(savAdress) - fenPref.update_idletasks() # this updates the values in the fenPref window (defined in preferences()) - print 'Added: '+str(savAdress) - return savAdress - -# browse_ENR function is used to get a .CSV file path from the user -# The CSV file contains a list of machines and their type (PV, Wind, Interconnexion) -# tkFileDialog.askopenfilename offers a browsing interface to the user -def browse_ENR() : - global ENRpath - ENRpath = tkFileDialog.askopenfilename(parent=fenPref,title='Open ENR configuration',filetypes=[('CSV files', '.csv'),('All files', '.*')]) - ENRpathD.set(ENRpath) - fenPref.update_idletasks() # this updates the values in the fenPref window (defined in preferences()) - print 'Added: '+str(ENRpath) - return ENRpath - -# browse_folder function is used to get a folder path from the user -# This folder is used to save all study files (.sav, .csv, ...) -# tkFileDialog.askdirectory offers a browsing interface to the user -def browse_folder() : - global folderPATH - folderPATH = tkFileDialog.askdirectory(parent=fenPref,title='Choose working folder') - folderPATHD.set(folderPATH) - fenPref.update_idletasks() # this updates the values in the fenPref window (defined in preferences()) - print 'Added: '+str(folderPATH) - return folderPATH - -# savePref function is used to save preferences input in fenPref window (defined in preferences()) -def savePref() : - global Vcin, Vrate, Vcout, Rho, lossrate # These variables are global because they are used in savePSEN() - try : # Test if the user has defined all the requested variables - savAdress - folderPATH - ENRpath - VcinD - VrateD - VcoutD - RhoD - lossrateD - except NameError : # If not a new window pops up and explains the data is missing - fenetre2 = Tk() - champ_label = Label(fenetre2, text="ERROR\nNo file and/or folder selected", fg="red", font=("Century Gothic",16)) - champ_label.pack(side=TOP, fill=BOTH, expand=YES) - else : # If it's OK it gets the data from the fields and save it into config[] - config[9]=VcinD.get(); config[10]=VrateD.get(); config[11]=VcoutD.get(); config[12]=RhoD.get(); config[13]=lossrateD.get(); config[2]=ENRpathD.get(); config[1]=folderPATHD.get(); config[0]=savAdressD.get() - Vcin=VcinD.get() - Vrate=VrateD.get() - Vcout=VcoutD.get() - Rho=RhoD.get() - lossrate=lossrateD.get() - f=open("lib\pref.psen", "w") # Creates a config file with values to give to PSSEWrapper.py - f.write(str(savAdress)+";"+str(folderPATH)+";"+str(ENRpath)+";"+str(Vcin)+";"+str(Vrate)+";"+str(Vcout)+";"+str(Rho)+";"+str(lossrate)+";0\n") - f.close() - try : - fenPref - except NameError : - pass - else : - fenPref.destroy() - print 'Preferences saved' - -# refresh_pref function is used to refresh fields value in fenPref window (defined in preferences()) -def refresh_pref () : - try : - saved - except NameError : # if saved hasn't been created yet there is no data to update - pass - print 'No configuration yet' - else : # if it has been created we set fields variables and update the window with update_idletasks() - print 'Update values' - global continpath - global model_Path - global PSSEfolder - VcinD.set(config[9]) - VrateD.set(config[10]) - VcoutD.set(config[11]) - RhoD.set(config[12]) - lossrateD.set(config[13]) - ENRpathD.set(ENRpath) - folderPATHD.set(folderPATH) - savAdressD.set(savAdress) - fenPref.update_idletasks() - -# savePSEN function is used to create a .PSEN file containing all users parameters and preferences -def savePSEN() : - global savePATH - global saved - saved=1 - - # === We get all the fields data === - - MCS_num=var_MCS.get() - N_1_opt=N_1.get() - PV_opt=PV.get() - Wind1_opt=Wind1.get() - Wind2_opt=Wind1.get() - Load_opt=Load.get() - - load_type=choix_load.get() - load1=var_loadn1.get() - load2=var_loadn2.get() - load3=var_loadn3.get() - load4=var_loadn4.get() - loadPath=loadPathD.get() - - wind11_type=choix_wind11.get() - wind11=var_windn11.get() - wind12=var_windn12.get() - wind13=var_windn13.get() - wind14=var_windn14.get() - wind1Path=wind1PathD.get() - - wind21_type=choix_wind21.get() - wind21=var_windn21.get() - wind22=var_windn22.get() - wind23=var_windn23.get() - wind24=var_windn24.get() - wind2Path=wind2PathD.get() - - pv_type=choix_pv.get() - pv1=var_pvn1.get() - pv2=var_pvn2.get() - pv3=var_pvn3.get() - pv4=var_pvn4.get() - pvPath=pvPathD.get() - - C01=C01D.get() - C02=C02D.get() - C03=C03D.get() - C04=C04D.get() - C12=C12D.get() - C14=C14D.get() - C13=C13D.get() - C23=C23D.get() - C24=C24D.get() - C34=C34D.get() - - fuel_cost_opt = fuel_cost.get() - bus_shunt_opt = bus_shunt.get() - bus_loads_opt = bus_loads.get() - - rate_choice = rate_choiceD.get() - - try : - contin_lines_Path - contin_groups_Path - except NameError : # If the user hasn't choose a path for the contingency CSV file, we create it as blank to save the data - contin_lines_Path='' - contin_groups_Path='' - - # We ask the user the name and path of the file - savePATH = tkFileDialog.asksaveasfilename(parent=fenetre,title='Save the file as ...',defaultextension='.psen',filetypes=[('PSEN file', '.psen')]) - try : - len(savePATH)>0 - except NameError : - pass - else : # Writing all the variables in a specific order (could be improved with XML file for instance) - f=open(savePATH,'w') - f.write(str(savAdress)+";"+str(folderPATH)+";"+str(ENRpath)+";" - +str(contin_lines_Path)+";"+str(contin_groups_Path)+";"+str(model_Path)+";"+str(PSSEfolder)+";"+str(orange_Path)+";"+str(python_Path)+";" - +str(Vcin)+";"+str(Vrate)+";"+str(Vcout)+";"+str(Rho)+";"+str(lossrate)+";" - +str(MCS_num)+";"+str(N_1_opt)+";"+str(PV_opt)+";"+str(Wind1_opt)+";"+str(Wind2_opt)+";"+str(Load_opt)+";" - +str(load_type)+";"+str(load1)+";"+str(load2)+";"+str(load3)+";"+str(load4)+";"+str(loadPath)+";" - +str(wind11_type)+";"+str(wind11)+";"+str(wind12)+";"+str(wind13)+";"+str(wind14)+";"+str(wind1Path)+";" - +str(wind21_type)+";"+str(wind21)+";"+str(wind22)+";"+str(wind23)+";"+str(wind24)+";"+str(wind2Path)+";" - +str(pv_type)+";"+str(pv1)+";"+str(pv2)+";"+str(pv3)+";"+str(pv4)+";"+str(pvPath)+";" - +str(C01)+";"+str(C02)+";"+str(C03)+";"+str(C04)+";"+str(C12)+";"+str(C13)+";"+str(C14)+";"+str(C23)+";"+str(C24)+";"+str(C34)+";" - +str(fuel_cost_opt)+";"+str(bus_shunt_opt)+";"+str(bus_loads_opt)+";" - +str(rate_choice)+";0\n") - f.close() - print 'Successfuly saved case study' - -# preferences function is a new window to update some PSEN parameters -def preferences () : - global fenPref - global savAdressD - global folderPATHD - global ENRpathD - global VcinD - global VrateD - global VcoutD - global RhoD - global lossrateD - global config - - fenPref = Toplevel(root) # Creating a new window - fenPref.wm_iconbitmap('lib\PSEN.ico') # Window icon - fenPref.wm_title('PSEN - Probabilistic Studies of Electrical Networks') # Window title - - f0p=Frame(fenPref, height=70, width=500, bd=2, relief=RIDGE) - f0p.pack_propagate(0) # don't shrink - f0p.pack() - - Label(f0p, text="PSSe .SAV file", fg="black", justify=LEFT, font=("Century Gothic",12)).pack(anchor=NW, padx=10, expand=YES) - savAdressD=StringVar() - Entry(f0p, textvariable=savAdressD, width=50).pack(side=LEFT, padx=15, expand=YES) - Button(f0p, text="Load SAV file", command=browse_PSSe, height=15, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) - - fline=Frame(fenPref, height=2, width=500, bg="grey") - fline.pack_propagate(0) # don't shrink - fline.pack(expand=1) - - f1p=Frame(fenPref, height=70, width=500, bd=2, relief=RIDGE) - f1p.pack_propagate(0) # don't shrink - f1p.pack() - - Label(f1p, text="Working folder adress :", fg="black", justify=LEFT, font=("Century Gothic",12)).pack(anchor=NW, padx=10, expand=YES) - folderPATHD=StringVar() - Entry(f1p, textvariable=folderPATHD, width=50).pack(side=LEFT, padx=15, expand=YES) - Button(f1p, text="Browse to working folder", command=browse_folder, height=15, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) - - fline=Frame(fenPref, height=5, width=500, bg="grey") - fline.pack_propagate(0) # don't shrink - fline.pack(expand=1) - - f3p=Frame(fenPref, height=100, width=500, bd=2, relief=RIDGE) - f3p.pack_propagate(0) # don't shrink - f3p.pack() - - Label(f3p, text="Machines configuration :", fg="black", justify=LEFT, font=("Century Gothic",12)).pack(anchor=NW, padx=10, expand=YES) - Label(f3p, text="N.B. Use the PSSe machine tab, insert a new column in first and write PV for PV, W1 for wind 1, W2 for wind 2 or do nothing for non-ENR. Save as CSV", fg="black", justify=LEFT, wraplength=450).pack(anchor=NW, padx=10, expand=YES) - ENRpathD=StringVar() - Entry(f3p, textvariable=ENRpathD, width=50).pack(side=LEFT, padx=15, expand=YES) - Button(f3p, text="Browse to ENR CSV file", command=browse_ENR, height=15, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) - - fline=Frame(fenPref, height=5, width=500, bg="grey") - fline.pack_propagate(0) # don't shrink - fline.pack(expand=1) - - f4p=Frame(fenPref, height=120, width=500, bd=2, relief=RIDGE) - f4p.pack_propagate(0) # don't shrink - f4p.pack() - - # Creates 5 entry for wind turbines characteristics - Label(f4p, text="Wind 1 & 2 characteristics :", fg="black", justify=LEFT, font=("Century Gothic",12)).pack(anchor=NW, padx=10, expand=YES) - Label(f4p, text="If wind law, enter the following parameters : \nVcin, Vrate, Vcout, rho (air density kg.m-3, base is 1.225), lossrate (base is 0.05)\nIf power law: Vcin=0, Vrate=1, Vcout>=1. Law must take values between 0 and 1.", fg="black", justify=LEFT, wraplength=450).pack(anchor=NW, padx=10, expand=YES) - VcinD = StringVar() - Entry(f4p, textvariable=VcinD, width=13).pack(side=LEFT, padx=5, pady=5) - VrateD = StringVar() - Entry(f4p, textvariable=VrateD, width=13).pack(side=LEFT, padx=5, pady=5) - VcoutD = StringVar() - Entry(f4p, textvariable=VcoutD, width=13).pack(side=LEFT, padx=5, pady=5) - RhoD = StringVar() - Entry(f4p, textvariable=RhoD, width=13).pack(side=LEFT, padx=5, pady=5) - lossrateD = StringVar() - Entry(f4p, textvariable=lossrateD, width=13).pack(side=LEFT, padx=5, pady=5) - - fline=Frame(fenPref, height=2, width=500, bg="grey") - fline.pack_propagate(0) # don't shrink - fline.pack(expand=1) - - f2p=Frame(fenPref, height=40, width=500, bd=2, relief=RIDGE) - f2p.pack_propagate(0) # don't shrink - f2p.pack() - - Button(f2p, text="Save and quit", command=savePref, height=1, width=30).pack(anchor=N, fill=BOTH, expand=1, padx=5, pady=3) - - # Refresh the window data - refresh_pref () - -# openPSEN function opens a .PSEN file with all PSEN parameters, read them and updates their value in the GUI -def openPSEN () : - global openPATH - global folderPATH - global savAdress - global ENRpath - global contin_lines_Path - global contin_groups_Path - global model_Path - global loadPath, wind1Path, wind2Path, pvPath - global PSSEfolder - global orange_Path - global python_Path - global config - global Vcin; global Vrate; global Vcout; global Rho; global lossrate - global PVpath - - openPATH = tkFileDialog.askopenfilename(parent=fenetre,title='Open PSEN file',filetypes=[('PSEN files', '.psen'),('All files', '.*'),]) - try : - os.lstat(openPATH) - except WindowsError : # If the user doesn't choose any file we don't open it - pass - except NameError : # If the user doesn't choose any file we don't open it - pass - else : - global saved # Create a saved variable : config list will be created - saved=1 - f=open(openPATH,'r') - lines=f.readlines() - config=lines[0].split(";") - savAdress=config[0]; folderPATH=config[1]; ENRpath=config[2]; - contin_lines_Path=config[3]; contin_groups_Path=config[4]; model_Path=config[5]; PSSEfolder=config[6]; orange_Path=config[7]; python_Path=config[8]; - Vcin=config[9]; Vrate=config[10]; Vcout=config[11]; Rho=config[12]; lossrate=config[13]; - loadPath=config[25]; wind1Path=config[31]; wind2Path=config[37]; pvPath=config[43]; - refresh(config) - f=open("lib\pref.psen", "w") - f.write(str(savAdress)+";"+str(folderPATH)+";"+str(ENRpath)+";"+str(Vcin)+";"+str(Vrate)+";"+str(Vcout)+";"+str(Rho)+";"+str(lossrate)+";0\n") - f.close() - print 'Successfuly opened '+str(openPATH) - -# This function is not used yet -def numToName (num) : - num=int(num) - if num == 1 : - name = "Normal(mean, stdev)" - elif num == 2 : - name = "Uniform(min, max)" - elif num == 3 : - name = "Exponential(lambda, gamma)" - elif num == 4 : - name = "Weibull(alpha, beta, gamma)" - elif num == 5 : - name = "TruncatedNormal(mean, stdev, min, max)" - elif num == 6 : - name = "Value list ([[v1,p1],[v2,p2],...])" - elif num == 7 : - name = "Histogram (steps, probabilities)" - elif num == 10 : - name = "PDF from file ()" - elif num == 20 : - name = "Time Serie from file (stepsize, number of points)" - return name - -# refresh function updates fields values in fenetre window -def refresh (config) : - var_MCS.set(config[14]) - N_1.set(config[15]) - PV.set(config[16]) - Wind1.set(config[17]) - Wind2.set(config[18]) - Load.set(config[19]) - - choix_load.set(config[20]) - var_loadn1.set(config[21]) - var_loadn2.set(config[22]) - var_loadn3.set(config[23]) - var_loadn4.set(config[24]) - loadPathD.set(config[25]) - - choix_wind11.set(config[26]) - var_windn11.set(config[27]) - var_windn12.set(config[28]) - var_windn13.set(config[39]) - var_windn14.set(config[30]) - wind1PathD.set(config[31]) - - choix_wind21.set(config[32]) - var_windn21.set(config[33]) - var_windn22.set(config[34]) - var_windn23.set(config[35]) - var_windn24.set(config[36]) - wind2PathD.set(config[37]) - - choix_pv.set(config[38]) - var_pvn1.set(config[39]) - var_pvn2.set(config[40]) - var_pvn3.set(config[41]) - var_pvn4.set(config[42]) - pvPathD.set(config[43]) - - C01D.set(config[44]) - C02D.set(config[45]) - C03D.set(config[46]) - C04D.set(config[47]) - C12D.set(config[48]) - C13D.set(config[49]) - C14D.set(config[50]) - C23D.set(config[51]) - C24D.set(config[52]) - C34D.set(config[53]) - - fuel_cost.set(config[54]) - bus_shunt.set(config[55]) - bus_loads.set(config[56]) - - rate_choiceD.set(config[57]) - - fenetre.update_idletasks() - -# PCpreferences function creates a window in which the user can choose some requested paths -def PCpreferences (): - global fenPrefPC - global python_Path - global orange_Path - global PSSEfolder - - fenPrefPC = Tk() - fenPrefPC.wm_iconbitmap('lib\PSEN.ico') - fenPrefPC.wm_title('PSEN - Probabilistic Studies of Electrical Networks') - - Label(fenPrefPC, text="Configure PSEN for your computer : ", fg="black", justify=LEFT, font=("Century Gothic",12)).pack(anchor=NW, padx=10, expand=YES) - Button(fenPrefPC, text="Path to Python 2.7.exe...", command=browse_Python, height=3, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) - Button(fenPrefPC, text="Path to orngCanvas.pyw...", command=browse_Orange, height=3, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) - Button(fenPrefPC, text="Path to PSSE33\PSSBIN...", command=browse_PSSEfolder, height=3, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) - Button(fenPrefPC, text="Save and close", command=closePCpref, height=3, width=15).pack(anchor=S, fill=BOTH, expand=1, padx=5, pady=10) - -def closePCpref () : - try : # Test if the user has defined all the requested variables - python_Path - orange_Path - PSSEfolder - except NameError : # If not a new window pops up and explains the data is missing - fenetre2 = Tk() - champ_label = Label(fenetre2, text="ERROR\nNo file and/or folder selected", fg="red", font=("Century Gothic",16)) - champ_label.pack(side=TOP, fill=BOTH, expand=YES) - else : # If it's OK it gets the data from the fields and save it into config[] - config[6]=PSSEfolder; config[7]=orange_Path; config[8]=python_Path - try : - fenPrefPC - except NameError : - pass - else : - fenPrefPC.destroy() - print 'Data saved' - -# PCpreferences function creates a window in which the user can choose some requested paths -def ContinPreferences (): - global fenPrefC - global contin_lines_Path - global contin_groups_Path - - fenPrefC = Tk() - fenPrefC.wm_iconbitmap('lib\PSEN.ico') - fenPrefC.wm_title('PSEN - Probabilistic Studies of Electrical Networks') - - Label(fenPrefC, text="Choose contingency files with probabilities : ", fg="black", justify=LEFT, font=("Century Gothic",12)).pack(anchor=NW, padx=10, expand=YES) - Button(fenPrefC, text="Path to branches file", command=contin_lines, height=3, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) - Button(fenPrefC, text="Path to groups file", command=contin_groups, height=3, width=30).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) - Button(fenPrefC, text="Save and close", command=closeCpref, height=3, width=15).pack(anchor=S, fill=BOTH, expand=1, padx=5, pady=10) - -def closeCpref () : - try : # Test if the user has defined all the requested variables - contin_lines_Path - contin_groups_Path - except NameError : # If not a new window pops up and explains the data is missing - fenetre2 = Tk() - champ_label = Label(fenetre2, text="ERROR\nNo file and/or folder selected", fg="red", font=("Century Gothic",16)) - champ_label.pack(side=TOP, fill=BOTH, expand=YES) - else : # If it's OK it gets the data from the fields and save it into config[] - config[3]=contin_lines_Path; config[4]=contin_lines_Path - f=open("lib\contin.psen", "w") - f.write(str(contin_lines_Path)+";"+str(contin_groups_Path)+";0\n") - f.close() - try : - fenPrefC - except NameError : - pass - else : - print 'Added :\n'+str(contin_lines_Path)+'\n'+str(contin_groups_Path) - fenPrefC.destroy() - print 'Saved contingency data' - -def contin_lines () : - global contin_lines_Path - contin_lines_Path = tkFileDialog.askopenfilename(parent=fenetre,title='Choose contingency lines file',filetypes=[('CSV file', '.csv'),('All files', '.*')]) - return contin_lines_Path - -def contin_groups () : - global contin_groups_Path - contin_groups_Path = tkFileDialog.askopenfilename(parent=fenetre,title='Choose contingency groups file',filetypes=[('CSV file', '.csv'),('All files', '.*')]) - return contin_groups_Path - -# Hide command window -if os.name == 'nt': # The functions only work with Windows OS - try: - import win32gui, win32console, win32con - win32console.GetConsoleWindow() # do nothing, this is just a test - def set_attached_console_visible(): - state=is_attached_console_visible() - win32gui.ShowWindow(win32console.GetConsoleWindow(), win32con.SW_HIDE if state else win32con.SW_SHOW) - def is_attached_console_visible(): - return win32gui.IsWindowVisible(win32console.GetConsoleWindow()) - except (ImportError, NotImplementedError): - pass - - -# config_save function is used to save configuration for PSSEWrapper -def config_save(): - MCS_num=var_MCS.get() - N_1_opt=N_1.get() - PV_opt=PV.get() - Wind1_opt=Wind1.get() - Wind2_opt=Wind2.get() - Load_opt=Load.get() - - load_type=choix_load.get() - load1=var_loadn1.get() - load2=var_loadn2.get() - load3=var_loadn3.get() - load4=var_loadn4.get() - loadPath=loadPathD.get() - - wind11_type=choix_wind11.get() - wind11=var_windn11.get() - wind12=var_windn12.get() - wind13=var_windn13.get() - wind14=var_windn14.get() - wind1Path=wind1PathD.get() - - wind21_type=choix_wind21.get() - wind21=var_windn21.get() - wind22=var_windn22.get() - wind23=var_windn23.get() - wind24=var_windn24.get() - wind2Path=wind2PathD.get() - - pv_type=choix_pv.get() - pv1=var_pvn1.get() - pv2=var_pvn2.get() - pv3=var_pvn3.get() - pv4=var_pvn4.get() - pvPath=pvPathD.get() - - C01=C01D.get() - C02=C02D.get() - C03=C03D.get() - C04=C04D.get() - C12=C12D.get() - C13=C13D.get() - C14=C14D.get() - C23=C23D.get() - C24=C24D.get() - C34=C34D.get() - - fuel_cost_opt = fuel_cost.get() - bus_shunt_opt = bus_shunt.get() - bus_loads_opt = bus_loads.get() - - rate_choice=rate_choiceD.get() - - f=open("lib\config.psen", "w") -# Write probabilistic model data - f.write(str(MCS_num)+";"+str(N_1_opt)+";"+str(PV_opt)+";"+str(Wind1_opt)+";"+str(Wind2_opt)+";"+str(Load_opt)+";"+str(fuel_cost_opt)+";"+str(bus_shunt_opt)+";"+str(bus_loads_opt)+"\n") - -# Write load probabilistic model data - if load_type == "Normal(mean, stdev)" : - f.write('1;'+str(load1)+";"+str(load2)+';0') - elif load_type == "Uniform(min, max)" : - f.write('2;'+str(load1)+";"+str(load2)+';0') - elif load_type == "Exponential(lambda, gamma)" : - f.write('3;'+str(load1)+";"+str(load2)+';0') - elif load_type == "Weibull(alpha, beta, gamma)" : - f.write('4;'+str(load1)+";"+str(load2)+";"+str(load3)+';0') - elif load_type == "TruncatedNormal(mean, stdev, min, max)" : - f.write('5;'+str(load1)+";"+str(load2)+";"+str(load3)+";"+str(load4)+';0') - elif load_type == "Value list (values, probabilities)" : - f.write('6;'+str(load1)+";"+str(load2)+';0') - elif load_type == 'Histogram (steps, probabilities)' : - f.write('7;'+str(load1)+";"+str(load2)+';0') - elif load_type== "PDF from file ()" : - try : - loadPath - except NameError : - fenetre2 = Tk() - Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) - else : - f.write('10;'+loadPath+';0') - elif load_type== "Time Serie from file (stepsize, number of points)" : - try : - loadPath - except NameError : - fenetre2 = Tk() - Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) - else : - f.write('20;'+loadPath+";"+str(load1)+";"+str(load2)+';0') - else : - fenetre2 = Tk() - Label(fenetre2, text="ERROR\nNo load model selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) - f.write("\n") - -# Write wind 1 probabilistic model data - if wind11_type == "Normal(mean, stdev)" : - f.write('1;'+str(wind11)+";"+str(wind12)+';0') - elif wind11_type == "Uniform(min, max)" : - f.write('2;'+str(wind11)+";"+str(wind12)+';0') - elif wind11_type == "Exponential(lambda, gamma)" : - f.write('3;'+str(wind11)+";"+str(wind12)+';0') - elif wind11_type == "Weibull(alpha, beta, gamma)" : - f.write('4;'+str(wind11)+";"+str(wind12)+";"+str(wind13)+';0') - elif wind11_type == "TruncatedNormal(mean, stdev, min, max)" : - f.write('5;'+str(wind11)+";"+str(wind12)+";"+str(wind13)+";"+str(wind14)+';0') - elif wind11_type == "Value list (values, probabilities)" : - f.write('6;'+str(wind11)+";"+str(wind12)+';0') - elif wind11_type == 'Histogram (steps, probabilities)' : - f.write('7;'+str(wind11)+";"+str(wind12)+';0') - elif wind11_type== "PDF from file ()" : - try : - wind1Path - except NameError : - fenetre2 = Tk() - Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) - else : - f.write('10;'+wind1Path+';0') - elif wind11_type== "Time Serie from file (stepsize, number of points)" : - try : - wind1Path - except NameError : - fenetre2 = Tk() - Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) - else : - f.write('20;'+wind1Path+";"+str(wind11)+";"+str(wind12)+';0') - else : - fenetre2 = Tk() - Label(fenetre2, text="ERROR\nNo wind model selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) - f.write("\n") - -# Write wind 2 probabilistic model data - if wind21_type == "Normal(mean, stdev)" : - f.write('1;'+str(wind21)+";"+str(wind22)+';0') - elif wind21_type == "Uniform(min, max)" : - f.write('2;'+str(wind21)+";"+str(wind22)+';0') - elif wind21_type == "Exponential(lambda, gamma)" : - f.write('3;'+str(wind21)+";"+str(wind22)+';0') - elif wind21_type == "Weibull(alpha, beta, gamma)" : - f.write('4;'+str(wind21)+";"+str(wind22)+";"+str(wind23)+';0') - elif wind21_type == "TruncatedNormal(mean, stdev, min, max)" : - f.write('5;'+str(wind21)+";"+str(wind22)+";"+str(wind23)+";"+str(wind24)+';0') - elif wind21_type == "Value list (values, probabilities)" : - f.write('6;'+str(wind21)+";"+str(wind22)+';0') - elif wind21_type == 'Histogram (steps, probabilities)' : - f.write('7;'+str(wind21)+";"+str(wind22)+';0') - elif wind21_type== "PDF from file ()" : - try : - wind2Path - except NameError : - fenetre2 = Tk() - Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) - else : - f.write('10;'+wind2Path+';0') - elif wind21_type== "Time Serie from file (stepsize, number of points)" : - try : - wind2Path - except NameError : - fenetre2 = Tk() - Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) - else : - f.write('20;'+wind2Path+";"+str(wind21)+";"+str(wind22)+';0') - else : - fenetre2 = Tk() - Label(fenetre2, text="ERROR\nNo wind 2 model selected", fg="red", font=("Century Gothic",16)).pack(side=TOP, fill=BOTH, expand=YES) - f.write("\n") - -# Write correlation probabilistic model data - f.write(str(C01)+";"+str(C02)+";"+str(C03)+";"+str(C04)+";"+str(C12)+";"+str(C13)+";"+str(C14)+";"+str(C23)+";"+str(C24)+";"+str(C34)+";0") - f.write("\n") - -# Write pv probabilistic model data - if pv_type == "Normal(mean, stdev)" : - f.write('1;'+str(pv1)+";"+str(pv2)+';0') - elif pv_type == "Uniform(min, max)" : - f.write('2;'+str(pv1)+";"+str(pv2)+';0') - elif pv_type == "Exponential(lambda, gamma)" : - f.write('3;'+str(pv1)+";"+str(pv2)+';0') - elif pv_type == "Weibull(alpha, beta, gamma)" : - f.write('4;'+str(pv1)+";"+str(pv2)+";"+str(pv3)+';0') - elif pv_type == "TruncatedNormal(mean, stdev, min, max)" : - f.write('5;'+str(pv1)+";"+str(pv2)+";"+str(pv3)+";"+str(pv4)+';0') - elif pv_type == "Value list (values, probabilities)" : - f.write('6;'+str(pv1)+";"+str(pv2)+';0') - elif pv_type == 'Histogram (steps, probabilities)' : - f.write('7;'+str(pv1)+";"+str(pv2)+';0') - elif pv_type== "PDF from file ()" : - try : - pvPath - except NameError : - fenetre2 = Tk() - champ_label = Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)) - champ_label.pack(side=TOP, fill=BOTH, expand=YES) - else : - f.write('10;'+pvPath+';0') - elif pv_type== "Time Serie from file (stepsize, number of points)" : - try : - pvPath - except NameError : - fenetre2 = Tk() - champ_label = Label(fenetre2, text="ERROR\nNo file selected", fg="red", font=("Century Gothic",16)) - champ_label.pack(side=TOP, fill=BOTH, expand=YES) - else : - f.write('20;'+pvPath+";"+str(pv1)+";"+str(pv2)+';0') - else : - fenetre2 = Tk() - champ_label = Label(fenetre2, text="ERROR\nNo wind model selected", fg="red", font=("Century Gothic",16)) - champ_label.pack(side=TOP, fill=BOTH, expand=YES) - f.write("\n") - -# Write OPF data model - f.write(str(fuel_cost_opt) +";"+ str(bus_shunt_opt) +";"+ str(bus_loads_opt)+";0\n") - -# Write Imap rate choice - f.write(str(rate_choice)+";0\n") - - f.close() - - print 'Successfuly saved case data' - -# launch_PSEN function is used to run PSSEWrapper code with the configuration in the GUI -def launch_PSEN(): - config_save() # Current configuration is fist saved - PSEN_Path='PSEN/PSSEWrapper.py' - subprocess.Popen([python_Path,PSEN_Path]) - -# launch_orange function is used to launch Orange with the model file -def launch_Orange(): - subprocess.Popen([python_Path,orange_Path,model_Path]) - -# browse_load is used to select a .CSV file with a 1D array of load measures -def browse_load() : - global loadPath - loadPath = tkFileDialog.askopenfilename(parent=fenetre,title='Open file for load data estimation',filetypes=[('CSV files', '.csv'),('All files', '.*')]) - loadPathD.set(loadPath) - fenetre.update_idletasks() # updates the fields paths - return loadPath - -# browse_wind is used to select a .CSV file with a 1D array of wind measures -def browse_wind1() : - global wind1Path - wind1Path = tkFileDialog.askopenfilename(parent=fenetre,title='Open file for wind 1 data estimation',filetypes=[('CSV files', '.csv'),('All files', '.*')]) - wind1PathD.set(wind1Path) - fenetre.update_idletasks() # updates the fields paths - return wind1Path - -# browse_wind is used to select a .CSV file with a 1D array of wind measures -def browse_wind2() : - global wind2Path - wind2Path = tkFileDialog.askopenfilename(parent=fenetre,title='Open file for wind 2 data estimation',filetypes=[('CSV files', '.csv'),('All files', '.*')]) - wind2PathD.set(wind2Path) - fenetre.update_idletasks() # updates the fields paths - return wind2Path - -# browse_pv is used to select a .CSV file with a 1D array of PV measures -def browse_pv() : - global pvPath - pvPath = tkFileDialog.askopenfilename(parent=fenetre,title='Open file for PV data estimation',filetypes=[('CSV files', '.csv'),('All files', '.*')]) - pvPathD.set(pvPath) - fenetre.update_idletasks() # updates the fields paths - return pvPath - -# continload function is a browsing window returning the path to the contingency CSV file -def continload () : - global continpath - continpath = tkFileDialog.askopenfilename(parent=fenetre,title='Open contingency file',filetypes=[('CSV files', '.csv'),('All files', '.*')]) - try : - continpath - except NameError : - pass - else : # Saves the path into a file for PSSEWrapper.py - f=open("lib\contin.psen", "w") - f.write(str(continpath)+";0\n") - f.close() - return continpath - -# orangeload function is a browsing window returning the path to the orange model file OWS -def orangeload () : - global model_Path - model_Path = tkFileDialog.askopenfilename(parent=fenetre,title='Open orange file...',filetypes=[('Orange Widget Scripts', '.ows')]) - -def browse_PSSEfolder () : - global PSSEfolder - if os.path.exists("C:\Program Files\PTI\PSSE33\PSSBIN") == True : - path="C:\Program Files\PTI\PSSE33\PSSBIN" - else : - path="C:" - PSSEfolder = tkFileDialog.askdirectory(parent=fenPrefPC,title='Choose PSSE/PSSBIN folder', initialdir=path) - return PSSEfolder - -def browse_Python () : - global python_Path - if os.path.exists("C:\Python27") == True : - path="C:\Python27" - else : - path="C:" - python_Path = tkFileDialog.askopenfilename(parent=fenetre,title='Choose python.exe',filetypes=[('Executables', '.exe'),('All files', '.*')], initialdir=path) - return python_Path - -def browse_Orange () : - global orange_Path - if os.path.exists("C:\Python27\Lib\site-packages\Orange\OrangeCanvas") == True : - path="C:\Python27\Lib\site-packages\Orange\OrangeCanvas" - else : - path="C:" - orange_Path = tkFileDialog.askopenfilename(parent=fenetre,title='Choose orngCanvas.pyw',filetypes=[('Python file', '.pyw'),('All files', '.*')], initialdir=path) - return orange_Path -# On crée une fenêtre, racine de notre interface -def fenetre() : - global fenetre,var_MCS,N_1,PV,Wind1,Wind2,Load,choix_load,var_loadn1,var_loadn2,var_loadn3,var_loadn4,loadPathD,choix_wind11,var_windn11,var_windn12,var_windn13,var_windn14,wind1PathD,choix_wind21,var_windn21,var_windn22,var_windn23,var_windn24,wind2PathD,choix_pv,var_pvn1,var_pvn2,var_pvn3,var_pvn4,pvPathD,C01D,C02D,C03D,C04D,C12D,C13D,C14D,C23D,C24D,C34D,fuel_cost,bus_shunt,bus_loads,rate_choiceD - fenetre = Toplevel(root) - fenetre.wm_iconbitmap('lib\PSEN.ico') - fenetre.wm_title('PSEN - Probabilistic Studies of Electrical Networks') - - def openshort (event): - openPSEN() - def saveshort (event) : - savePSEN() - def quitshort (event) : - fenetre.destroy() - def orangeshort (event): - launch_Orange() - def runshort (event) : - launch_PSEN() - def prefshort (event) : - preferences() - - fenetre.bind_all("", quitshort) - fenetre.bind_all("", openshort) - fenetre.bind_all("", saveshort) - fenetre.bind_all("", orangeshort) - fenetre.bind_all("", runshort) - fenetre.bind_all("", prefshort) - - wd=500 - - # Create a toplevel menu - menubar=Menu(fenetre) - - filemenu = Menu(menubar, tearoff=0) - filemenu.add_command(label="Open PSEN", command=openPSEN, accelerator="Ctrl+O") - filemenu.add_command(label="Save PSEN", command=savePSEN, accelerator="Ctrl+S") - filemenu.add_separator() - filemenu.add_command(label="Exit", command=fenetre.quit, accelerator="Ctrl+Q") - menubar.add_cascade(label="File", menu=filemenu) - - editmenu = Menu(menubar, tearoff=0) - editmenu.add_command(label="Computer preferences", command=PCpreferences) - editmenu.add_separator() - editmenu.add_command(label="Study preferences", command=preferences, accelerator="Ctrl+P") - menubar.add_cascade(label="Edit", menu=editmenu) - - exemenu = Menu(menubar, tearoff=0) - exemenu.add_command(label="Run PSEN", command=preferences, accelerator="Ctrl+R") - menubar.add_cascade(label="Execution", menu=exemenu) - - contmenu = Menu(menubar, tearoff=0) - contmenu.add_command(label="Load contingency file", command=ContinPreferences) - menubar.add_cascade(label="Contingency analysis", menu=contmenu) - - orangemenu = Menu(menubar, tearoff=0) - orangemenu.add_command(label="Choose Orange model", command=orangeload) - orangemenu.add_command(label="Open Orange", command=launch_Orange, accelerator="Ctrl+A") - menubar.add_cascade(label="Orange analysis", menu=orangemenu) - - viewmenu = Menu(menubar, tearoff=0) - viewmenu.add_command(label="Show/Hide cmd window", command=set_attached_console_visible) - menubar.add_cascade(label="View", menu=viewmenu) - - # Display the menu - fenetre.config(menu=menubar) - - ftop=Frame(fenetre, height=140, width=2*wd, bd=2, relief=RIDGE) - ftop.pack_propagate(0) # don't shrink - ftop.pack() - - fmid=Frame(fenetre, height=500, width=2*wd) - fmid.pack_propagate(0) # don't shrink - fmid.pack() - - fleft=Frame(fmid, height=500, width=wd, bd=2, relief=RIDGE) - fleft.pack_propagate(0) # don't shrink - fleft.pack(side=LEFT) - - fright=Frame(fmid, height=500, width=wd, bd=2, relief=RIDGE) - fright.pack_propagate(0) # don't shrink - fright.pack(side=RIGHT) - - #canvas=Canvas(fenetre, width=600, height=100, bg='ivory') - Label(ftop, image=header).pack(side=TOP, fill=BOTH, expand=YES) - #canvas.pack(side=TOP,padx=5,pady=5) - - fline=Frame(ftop, height=2, width=2*wd, bg="grey") - fline.pack_propagate(0) # don't shrink - fline.pack(expand=1) - - fl0=Frame(fleft, height=55, width=wd) - fl0.pack_propagate(0) # don't shrink - fl0.pack() - - Label(fl0, text="Simulation parameters", fg="black", justify=LEFT, font=("Century Gothic",14)).pack(anchor=NW, padx=10, expand=NO) - - # Change Monte Carlo samplings - Label(fl0, text="Choose the number of samples:", fg="black").pack(side=LEFT, padx=10, expand=NO) - - var_MCS = StringVar() - Entry(fl0, textvariable=var_MCS, width=15).pack(side=LEFT, padx=15, expand=NO) - - fl01=Frame(fleft, height=30, width=wd) - fl01.pack_propagate(0) # don't shrink - fl01.pack() - - # Change N-1 study or not - N_1 = IntVar() - Checkbutton(fl01, text="N-1 study ?", variable=N_1).pack(side=LEFT, padx=2) - - # Include Load ? - Load = IntVar() - Checkbutton(fl01, text="Load study ?", variable=Load).pack(side=LEFT, padx=2) - - # Include Wind 1 ? - Wind1 = IntVar() - Checkbutton(fl01, text="Wind 1 study ?", variable=Wind1).pack(side=LEFT, padx=2) - - # Include Wind 2 ? - Wind2 = IntVar() - Checkbutton(fl01, text="Wind 2 study ?", variable=Wind2).pack(side=LEFT, padx=2) - - # Include PV - PV = IntVar() - Checkbutton(fl01, text="PV study ?", variable=PV).pack(side=LEFT, padx=2) - - Frame(fleft, height=2, width=wd, bg="grey").pack(pady=10, expand=NO) - - fl1=Frame(fleft, height=152, width=wd) - fl1.pack_propagate(0) # don't shrink - fl1.pack(pady=0, expand=NO) - - champ_label = Label(fl1, text="Correlation upper matrix :", fg="black", justify=LEFT, font=("Century Gothic",14)) - champ_label.pack(anchor=NW, padx=10, expand=NO) - - champ_label = Label(fl1, text="Load N-1 Wind1 Wind2 Solar ", fg="black") - champ_label.pack(anchor=NE, padx=10) - - fl11=Frame(fl1, height=25, width=wd) - fl11.pack_propagate(0) # don't shrink - fl11.pack(padx=10, expand=NO) - C04D = StringVar() - Entry(fl11, textvariable=C04D, width=10).pack(side=RIGHT, padx=10, pady=5) - C04D.set(0) - C03D = StringVar() - Entry(fl11, textvariable=C03D, width=10).pack(side=RIGHT, padx=10, pady=5) - C03D.set(0) - C02D = StringVar() - Entry(fl11, textvariable=C02D, width=10).pack(side=RIGHT, padx=10, pady=5) - C02D.set(0) - C01D = StringVar() - Entry(fl11, textvariable=C01D, width=10).pack(side=RIGHT, padx=10, pady=5) - C01D.set(0) - - champ_label = Label(fl11, text="Load ", fg="black") - champ_label.pack(side=RIGHT, padx=10) - - fl12=Frame(fl1, height=25, width=wd) - fl12.pack_propagate(0) # don't shrink - fl12.pack(padx=10, expand=NO) - C14D = StringVar() - Entry(fl12, textvariable=C14D, width=10).pack(side=RIGHT, padx=10, pady=5) - C14D.set(0) - C13D = StringVar() - Entry(fl12, textvariable=C13D, width=10).pack(side=RIGHT, padx=10, pady=5) - C13D.set(0) - C12D = StringVar() - Entry(fl12, textvariable=C12D, width=10).pack(side=RIGHT, padx=10, pady=5) - C12D.set(0) - - champ_label = Label(fl12, text="N-1 ", fg="black") - champ_label.pack(side=RIGHT, padx=10) - - fl13=Frame(fl1, height=25, width=wd) - fl13.pack_propagate(0) # don't shrink - fl13.pack(padx=10, expand=NO) - C24D = StringVar() - Entry(fl13, textvariable=C24D, width=10).pack(side=RIGHT, padx=10, pady=5) - C24D.set(0) - C23D = StringVar() - Entry(fl13, textvariable=C23D, width=10).pack(side=RIGHT, padx=10, pady=5) - C23D.set(0) - - champ_label = Label(fl13, text="Wind1 ", fg="black") - champ_label.pack(side=RIGHT, padx=10) - - fl14=Frame(fl1, height=25, width=wd) - fl14.pack_propagate(0) # don't shrink - fl14.pack(padx=10, expand=NO) - C34D = StringVar() - Entry(fl14, textvariable=C34D, width=10).pack(side=RIGHT, padx=10, pady=5) - C34D.set(0) - - champ_label = Label(fl14, text="Wind2 ", fg="black") - champ_label.pack(side=RIGHT, padx=10) - - fline=Frame(fleft, height=2, width=wd, bg="grey") - fline.pack(pady=10, expand=NO) - - fl2=Frame(fleft, height=20, width=wd) - fl2.pack_propagate(0) # don't shrink - fl2.pack() - - champ_label = Label(fl2, text="PSSe OPF parameters", fg="black", justify=LEFT, font=("Century Gothic",14)) - champ_label.pack(anchor=NW, padx=10, expand=NO) - - fl21=Frame(fleft, height=30, width=wd) - fl21.pack_propagate(0) # don't shrink - fl21.pack() - - # "Minimize fuel cost" - fuel_cost = IntVar() - Checkbutton(fl21, text="Minimize fuel cost", variable=fuel_cost).pack(side=LEFT, padx=10) - - # "Minimize adj. bus shunts" - bus_shunt = IntVar() - Checkbutton(fl21, text="Minimize adj. bus shunts", variable=bus_shunt).pack(side=LEFT, padx=10) - - # "Minimize adj. bus loads" - bus_loads = IntVar() - Checkbutton(fl21, text="Minimize adj. bus loads", variable=bus_loads).pack(side=LEFT, padx=10) - - fline=Frame(fleft, height=2, width=wd, bg="grey") - fline.pack(pady=10, expand=NO) - - fl3=Frame(fleft, height=20, width=wd) - fl3.pack_propagate(0) # don't shrink - fl3.pack() - - champ_label = Label(fl3, text="PSSe Irate choice :", fg="black", justify=LEFT, font=("Century Gothic",14)) - champ_label.pack(side=LEFT, padx=10, expand=NO) - - # "Minimize fuel cost" - rate_choiceD = IntVar() - Radiobutton(fl3, text="Rate A", variable=rate_choiceD, value=1).pack(side=LEFT, padx=20) - Radiobutton(fl3, text="Rate B", variable=rate_choiceD, value=2).pack(side=LEFT, padx=10) - Radiobutton(fl3, text="Rate C", variable=rate_choiceD, value=3).pack(side=LEFT, padx=10) - -#---- Choose the probability laws --- - #---- Load model ---- - fr0=Frame(fright, height=55, width=wd) - fr0.pack_propagate(0) # don't shrink - fr0.pack(expand=NO, anchor=NW) - - champ_label = Label(fr0, text="Load model :", fg="black", justify=LEFT, font=("Century Gothic",14)) - champ_label.pack(anchor=NW, padx=10, expand=NO) - - choix_load=StringVar() - laws_choice = ('Normal(mean, stdev)','Uniform(min, max)','Exponential(lambda, gamma)','Weibull(alpha, beta, gamma)', 'TruncatedNormal(mean, stdev, min, max)', 'Value list (values, probabilities)', 'Histogram (steps, probabilities)', 'PDF from file ()', 'Time Serie from file (stepsize, number of points)' ) - Combobox(fr0, textvariable = choix_load, values = laws_choice, state = 'readonly', width=50).pack(side=LEFT, padx=10, expand=NO) - choix_load.set('Choose your load model') - - fr01=Frame(fright, height=30, width=wd) - fr01.pack_propagate(0) # don't shrink - fr01.pack(expand=NO) - champ_label = Label(fr01, text="Parameters :", fg="black").pack(side=LEFT, padx=10, pady=0) - - var_loadn1 = StringVar() - Entry(fr01, textvariable=var_loadn1, width=12).pack(side=LEFT, padx=10, pady=5) - var_loadn2 = StringVar() - Entry(fr01, textvariable=var_loadn2, width=12).pack(side=LEFT, padx=10, pady=5) - var_loadn3 = StringVar() - Entry(fr01, textvariable=var_loadn3, width=12).pack(side=LEFT, padx=10, pady=5) - var_loadn4 = StringVar() - Entry(fr01, textvariable=var_loadn4, width=12).pack(side=LEFT, padx=10, pady=5) - - fr011=Frame(fright, height=35, width=wd) - fr011.pack_propagate(0) # don't shrink - fr011.pack(expand=NO) - - # We create the browse button - loadPathD=StringVar() - Entry(fr011, textvariable=loadPathD, width=50).pack(side=LEFT, padx=15, expand=YES) - - Button(fr011, text="Load data", command=browse_load).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) - - fline=Frame(fright, height=2, width=wd, bg="grey") - fline.pack(pady=2, expand=NO) - - #---- Wind 1 model ---- - fr1=Frame(fright, height=55, width=wd) - fr1.pack_propagate(0) # don't shrink - fr1.pack(expand=NO, pady=0) - - champ_label = Label(fr1, text="Wind 1 distribution model :", fg="black", justify=LEFT, font=("Century Gothic",14)) - champ_label.pack(anchor=NW, padx=10, expand=NO) - - choix_wind11=StringVar() - laws_choice = ('Normal(mean, stdev)','Uniform(min, max)','Exponential(lambda, gamma)','Weibull(alpha, beta, gamma)', 'TruncatedNormal(mean, stdev, min, max)', 'Value list (values, probabilities)', 'Histogram (steps, probabilities)', 'PDF from file ()', 'Time Serie from file (stepsize, number of points)' ) - Combobox(fr1, textvariable = choix_wind11, values = laws_choice, state = 'readonly', width=50).pack(side=LEFT, padx=10, expand=NO) - choix_wind11.set('Choose your wind model') - - fr11=Frame(fright, height=30, width=wd) - fr11.pack_propagate(0) # don't shrink - fr11.pack(expand=NO) - Label(fr11, text="Parameters :", fg="black").pack(side=LEFT, padx=10, pady=0) - - var_windn11 = StringVar() - Entry(fr11, textvariable=var_windn11, width=12).pack(side=LEFT, padx=10, pady=5) - var_windn12 = StringVar() - Entry(fr11, textvariable=var_windn12, width=12).pack(side=LEFT, padx=10, pady=5) - var_windn13 = StringVar() - Entry(fr11, textvariable=var_windn13, width=12).pack(side=LEFT, padx=10, pady=5) - var_windn14 = StringVar() - Entry(fr11, textvariable=var_windn14, width=12).pack(side=LEFT, padx=10, pady=5) - - fr111=Frame(fright, height=35, width=wd) - fr111.pack_propagate(0) # don't shrink - fr111.pack(expand=NO) - - # We create the browse button - wind1PathD=StringVar() - Entry(fr111, textvariable=wind1PathD, width=50).pack(side=LEFT, padx=15, expand=YES) - - Button(fr111, text="Wind 1 data", command=browse_wind1).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) - - fline=Frame(fright, height=2, width=wd, bg="grey") - fline.pack(pady=2, expand=NO) - - #---- Wind 2 model ---- - fr2=Frame(fright, height=55, width=wd) - fr2.pack_propagate(0) # don't shrink - fr2.pack(expand=NO, pady=0) - - champ_label = Label(fr2, text="Wind 2 distribution model :", fg="black", justify=LEFT, font=("Century Gothic",14)) - champ_label.pack(anchor=NW, padx=10, expand=NO) - - choix_wind21=StringVar() - laws_choice = ('Normal(mean, stdev)','Uniform(min, max)','Exponential(lambda, gamma)','Weibull(alpha, beta, gamma)', 'TruncatedNormal(mean, stdev, min, max)', 'Value list (values, probabilities)', 'Histogram (steps, probabilities)', 'PDF from file ()', 'Time Serie from file (stepsize, number of points)' ) - Combobox(fr2, textvariable = choix_wind21, values = laws_choice, state = 'readonly', width=50).pack(side=LEFT, padx=10, expand=NO) - choix_wind21.set('Choose your wind model') - - fr21=Frame(fright, height=30, width=wd) - fr21.pack_propagate(0) # don't shrink - fr21.pack(expand=NO) - Label(fr21, text="Parameters :", fg="black").pack(side=LEFT, padx=10, pady=0) - - var_windn21 = StringVar() - Entry(fr21, textvariable=var_windn21, width=12).pack(side=LEFT, padx=10, pady=5) - var_windn22 = StringVar() - Entry(fr21, textvariable=var_windn22, width=12).pack(side=LEFT, padx=10, pady=5) - var_windn23 = StringVar() - Entry(fr21, textvariable=var_windn23, width=12).pack(side=LEFT, padx=10, pady=5) - var_windn24 = StringVar() - Entry(fr21, textvariable=var_windn24, width=12).pack(side=LEFT, padx=10, pady=5) - - fr211=Frame(fright, height=35, width=wd) - fr211.pack_propagate(0) # don't shrink - fr211.pack(expand=NO) - - # We create the browse button - wind2PathD=StringVar() - Entry(fr211, textvariable=wind2PathD, width=50).pack(side=LEFT, padx=15, expand=YES) - - Button(fr211, text="Wind 2 data", command=browse_wind2).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) - - fline=Frame(fright, height=2, width=wd, bg="grey") - fline.pack(pady=2, expand=NO) - - #---- PV model ---- - fr3=Frame(fright, height=55, width=wd) - fr3.pack_propagate(0) # don't shrink - fr3.pack(expand=NO, pady=0) - - champ_label = Label(fr3, text="Photovoltaic distribution model :", fg="black", justify=LEFT, font=("Century Gothic",14)) - champ_label.pack(anchor=NW, padx=10, expand=NO) - - choix_pv=StringVar() - laws_choice = ('Normal(mean, stdev)','Uniform(min, max)','Exponential(lambda, gamma)','Weibull(alpha, beta, gamma)', 'TruncatedNormal(mean, stdev, min, max)', 'Value list (values, probabilities)', 'Histogram (steps, probabilities)', 'PDF from file ()', 'Time Serie from file (stepsize, number of points)' ) - Combobox(fr3, textvariable = choix_pv, values = laws_choice, state = 'readonly', width=50).pack(side=LEFT, padx=10, expand=NO) - choix_pv.set('Choose your PV model') - - fr31=Frame(fright, height=30, width=wd) - fr31.pack_propagate(0) # don't shrink - fr31.pack(expand=NO) - Label(fr31, text="Parameters :", fg="black").pack(side=LEFT, padx=10, pady=0) - - var_pvn1 = StringVar() - Entry(fr31, textvariable=var_pvn1, width=12).pack(side=LEFT, padx=10, pady=5) - var_pvn2 = StringVar() - Entry(fr31, textvariable=var_pvn2, width=12).pack(side=LEFT, padx=10, pady=5) - var_pvn3 = StringVar() - Entry(fr31, textvariable=var_pvn3, width=12).pack(side=LEFT, padx=10, pady=5) - var_pvn4 = StringVar() - Entry(fr31, textvariable=var_pvn4, width=12).pack(side=LEFT, padx=10, pady=5) - - fr311=Frame(fright, height=35, width=wd) - fr311.pack_propagate(0) # don't shrink - fr311.pack(expand=NO) - - # We create the browse button - pvPathD=StringVar() - Entry(fr311, textvariable=pvPathD, width=50).pack(side=LEFT, padx=15, expand=YES) - - Button(fr311, text="PV data", command=browse_pv).pack(side=LEFT, fill=BOTH, expand=1, padx=5, pady=3) - - fb=Frame(fenetre, height=50, width=2*wd, bd=2, relief=RIDGE) - fb.pack_propagate(0) # don't shrink - fb.pack() - - Frame(fb, height=2, width=2*wd, bg="grey").pack(expand=1) - - # We create the launch button - Button(fb, text="Run PSEN", command=launch_PSEN, height=1, width=20, underline=YES).pack(expand=NO, padx=5, pady=3) - -# On démarre la boucle Tkinter qui s'interompt quand on ferme la fenêtre -fenetre() -root.mainloop() \ No newline at end of file diff --git a/PSEN_Eficas/PSEN/PSSEWrapper.py b/PSEN_Eficas/PSEN/PSSEWrapper.py deleted file mode 100755 index 3adb5ace..00000000 --- a/PSEN_Eficas/PSEN/PSSEWrapper.py +++ /dev/null @@ -1,742 +0,0 @@ -#=============================================================================== -# PSEN SCRIPT FOR PROBABILISTIC STUDIES OF ELECTICAL NETWORKS -#=============================================================================== -from openturns import * -from pylab import * -from math import* -import os, random -import numpy as np -from time import gmtime, strftime -from array import * -from support_functions import * - -# Ouverture du fichier de configuration et recupecation des valeurs sous forme de listes -f=open("C:\B31272\Documents\PSEN\PSENdev\lib\config.psen","r") -lines=f.readlines() -data_config=lines[0].split(";") -data_load2 = getUserLaw(lines[1].split(";"))[0] -data_wind1=getUserLaw(lines[2].split(";"))[0] -data_wind2=getUserLaw(lines[3].split(";"))[0] -data_corr=lines[4].split(";") -data_PV=getUserLaw(lines[5].split(";"))[0] -data_OPF=lines[6].split(";") -Irate_num=int(lines[7].split(";")[0]) -f.close() - -# Definition des variables pour les series temporelles : getUserLaw(lines[1].split(";"))[1][0] doit valoir 1 -# pour que le programme etudie les series temporelles -time_serie_file=[] -time_serie_mat=[] -for i in ([1,2,3,5]) : - TSoptions = getUserLaw(lines[i].split(";"))[1] - if TSoptions[0] == 1 : - time_serie=1 - f=open(TSoptions[1],"r") - linesTS=f.readlines() - f.close() - tsm=[] - for j in range (len(linesTS)) : - try : - float(linesTS[j]) - except ValueError : - linesTS[j] = commaToPoint(linesTS[j]) - else : - pass - tsm.append(float(linesTS[j])) - time_serie_mat.append(tsm) - time_serie_file.append(TSoptions[1]) - """time_serie_SS = TSoptions[2] - time_serie_TH = TSoptions[3]""" - else : - time_serie_file.append(-1) -time_serie_mat=zip(*time_serie_mat) - -# Ouverture du fichier de preferences et recuperation des donnees -f=open("C:\B31272\Documents\PSEN\PSENdev\lib\pref.psen","r") -lines=f.readlines() -f.close() -paths=lines[0].split(";") -WTconfig=[] -for i in range (3,8): - try : - paths[i] - except : - print "Error in defining wind turbines characteristics" - WTconfig=[3.,5.,25.,1.225,0.05] - else : - WTconfig.append(float(paths[i])) - -# Ouverture du fichier d'analyse de N-1 et recuperation des donnees -f=open("C:\B31272\Documents\PSEN\PSENdev\lib\contin.psen","r") -lines=f.readlines() -path_config_contin=lines[0].split(";") -f.close() - -# Definition des lois des cinq variables aleatoires -N_1=int(data_config[1]) # N_1=1 to do N-1 studies -wind_var1=int(data_config[3]) # To take wind1 variability into account -wind_var2=int(data_config[4]) # To take wind2 variability into account -PV_var=int(data_config[2]) # To take PV variability into account -load_var=int(data_config[5]) # To take load variability into account - -# Creation variable nom dossier N-1 -if N_1 == 1 : - folderN_1 = '1_' -else : - folderN_1 = '_' - -# Recuperation des chemins du dossier d'installation de PSSE, .SAV de l'etude et nom du rapport -folder=paths[1] -doc_base= paths[0] -exec_file="report.txt" - -# Definition des groupes de production PV, eoliennes, des intercos et des lignes en N-1 -ENR=config_ENR(paths[2]) -windTurbines1 = ENR[1] # Buses with wind turbines 1 -windTurbines2 = ENR[2] # Buses with wind turbines 2 -solarPV = ENR[0] # Buses with solar PV plant -intercos=ENR[3] # Buses with interconnexions -# Lines with contingency -try : - config_contingency(path_config_contin) -except IOError : # Si le fichier n'est pas dans un bon format on traite l'exception - nb_lines=1 - print 'Error with contingency input file' -else : - continAll = config_contingency(path_config_contin) - continLines = continAll[0] - continGroups = continAll[1] - continVal = continAll[2] - continProb = continAll[3] - - -# Probabilistic study information -#============================================================================== -# Create the marginal distributions -distributionX0 = data_load2 -distributionX1 = getUserDefined(continVal,continProb) -distributionX2 = data_wind1 -distributionX3 = data_wind2 -distributionX4 = data_PV - -# Create the correlations between the distributions -corr10=float(data_corr[0]) -corr20=float(data_corr[1]) -corr30=float(data_corr[2]) -corr40=float(data_corr[3]) -corr21=float(data_corr[4]) -corr31=float(data_corr[5]) -corr41=float(data_corr[6]) -corr32=float(data_corr[7]) -corr42=float(data_corr[8]) -corr43=float(data_corr[9]) - -# Probabilistic Study: central dispersion => Monte Carlo or LHS iterations -montecarlosize = int(data_config[0]) - -#Extension name for the folders and files -day=time.strftime("%Y%m%d", gmtime()) -hour=time.strftime("%Hh%Mm%S", gmtime()) - -#=============================================================================== -# CHARGEMENT DE PSSE - LOADING OF PSSE -#=============================================================================== -pssFolder=str(paths[3]) -import sys -sys.path.append(pssFolder)#r"C:\Program Files\PTI\PSSE33\PSSBIN") -os.environ['PATH'] = pssFolder+":"+os.environ['PATH'] #r"C:\Program Files\PTI\PSSE33\PSSBIN;"+ os.environ['PATH'] -os.chdir(folder) -import psspy -import pssarrays -import redirect -_i=psspy.getdefaultint() -_f=psspy.getdefaultreal() -_s=psspy.getdefaultchar() -redirect.psse2py() -#import pssdb -psspy.psseinit(80000) - -# Silent execution of PSSe -islct=6 # 6=no output; 1=standard -psspy.progress_output(islct) - -# Enregistrement de l'heure de debut de simulation -f=open(exec_file, 'a') -start_time=time.clock() -f.write("Starting time: %f; Monte Carlo Size : %f; " % (start_time, montecarlosize)) -f.close() - -#=============================================================================== -# Fonction de wrappage - Wrapper function -#=============================================================================== -def PSSEFunction(x): - # Definition des variables globales - global TStest - global Xt - global sizeY0 - global sizeY1 - global sizeY2 - global sizeY3 - global sizeY4 - global sizeY - global wind_var - global PV_var - global N_1 - global load_var - global logCSVfilename - global logTXTfilename - global ite - global folder - global day - global folderN_1 - global fich - global hour - global montecarlosize - global WTconfig - global x2 - - ite+=1 # incrementation du compteur - - # Load data from PSSe - psspy.case(doc_base) #Launching of PSSE and opening the working file - all_inputs_base=read_sav(doc_base) - buses_base=all_inputs_base[0] - lines_base=all_inputs_base[1] - transf_base=all_inputs_base[2] - plants_base=all_inputs_base[3] - loads_base=all_inputs_base[4] - shunt_base=all_inputs_base[5] - doci=folder+"\N"+folderN_1+day+"\CasNum"+str(ite)+".sav" - psspy.save(doci) - - # Total initial shunt on buses - init_shunt = 0 - for i in range(len(shunt_base)) : - init_shunt += float(shunt_base[i][2]) - - # Configuration de l'OPF a partir des parametres de l'utilisateur - nbeOPF=5 # Nombre de lancement max de l'OPF pour atteindre la convergence de l'algorithme - psspy.report_output(6,"",[0,0]) - psspy.produce_opf_log_file(1,r"""DETAIL""") - psspy.minimize_fuel_cost(int(data_OPF[0])) - psspy.minimize_adj_bus_shunts(int(data_OPF[1])) - psspy.minimize_load_adjustments(int(data_OPF[2])) - psspy.initial_opf_barrier_coeff(100.0) - psspy.opf_fix_all_generators(1) - psspy.set_opf_report_subsystem(3,1) - - - print " PSEN simulator, case number: "+str(ite) - - # 1. Affiche X - nx = x.getSize() - if TStest==1 : - for i in range (len (Xt)) : - if Xt[i] == -1 : - if i == 0 and load_var==1 : - pass - elif i == 1 and N_1==1 : - x[i]=int(floor(x[i])) # Si on etudie le N-1 on arrondie la valeur tiree en floor : on obtient le numero de la ligne - elif i == 2 and wind_var1==1 : - x[i]=eol(x[i],WTconfig) - elif i == 3 and wind_var2==1 : - x[i]=eol(x[i],WTconfig) - elif i == 4 and PV_var==1 : # Si on etudie la variabilite de l'eolien on lui donne la valeur de production de l'eolienne a partir du vent - pass - else : - x[i]=-1 - else : - x[i]=float(Xt[i]) # Dans le cas d'une etude temporelle on lui donne la valeur de Xt - else : - if load_var==1 : - pass # Sinon on donne la valeur tiree si on etudie la variabilite de x[0] - else : - x[0]=1 # Sinon on laisse la valeur de base - - if N_1==1 : - x[1]=int(floor(x[1])) # Si on etudie le N-1 on arrondie la valeur tiree en floor : on obtient le numero de la ligne - else : - x[1]=-1 # Sinon on donne -1 comme marqueur - - if wind_var1==1: - x[2]=eol(x[2],WTconfig) # Si on etudie la variabilite de l'eolien on lui donne la valeur de production de l'eolienne a partir du vent - else : - x[2]=0 # Sinon on considere qu'il n'y a pas d'eolien - - if wind_var2==1: - x[3]=eol(x[3],WTconfig) # Si on etudie la variabilite de l'eolien on lui donne la valeur de production de l'eolienne a partir du vent - else : - x[3]=0 # Sinon on considere qu'il n'y a pas d'eolien - - if PV_var==1 : # Si on etudie la variabilite du PV on laisse sa valeur a la va - pass - else : - x[4]=0 # Sinon on considere qu'il n'y a pas de PV - for i in range(0,nx): - print "x[%d]=%f" % (i,x[i]) - - # 2. Fait le calcul avec PSSE - #Editing some values in the PSSE .sav input file - # Change the values of the different loads and treat large changes of load to help convergence - if x[0] > 0.75 : - for i in range(0,np.array(loads_base).shape[0]) : # On change directement toutes les charges - psspy.load_chng_4(int(loads_base[i][0]),r"""1""",[1,_i,_i,_i,_i,_i],[x[0]*loads_base[i][1],x[0]*loads_base[i][2],_f,_f,_f,_f]) - elif x[0] > 0.4 : - for i in range(0,np.array(loads_base).shape[0]) : # On effectue un pretraitement en passant par une charge intermediaire - psspy.load_chng_4(int(loads_base[i][0]),r"""1""",[1,_i,_i,_i,_i,_i],[(1+x[0])/2*loads_base[i][1],(1+x[0])/2*loads_base[i][2],_f,_f,_f,_f]) - psspy.fnsl([0,0,0,1,1,0,99,0]) # Load flow Newton Raphson - psspy.bsys(3,0,[0.0,0.0],0,[],1,[1],0,[],0,[]) - psspy.set_opf_report_subsystem(3,0) - psspy.nopf(0,1) # Lancement OPF - for i in range(0,np.array(loads_base).shape[0]) : # On change toutes les charges - psspy.load_chng_4(int(loads_base[i][0]),r"""1""",[1,_i,_i,_i,_i,_i],[x[0]*loads_base[i][1],x[0]*loads_base[i][2],_f,_f,_f,_f]) - else : - for i in range(0,np.array(loads_base).shape[0]) : # On effectue un pretraitement en passant par une charge intermediaire - psspy.load_chng_4(int(loads_base[i][0]),r"""1""",[1,_i,_i,_i,_i,_i],[0.7*loads_base[i][1],0.7*loads_base[i][2],_f,_f,_f,_f]) - psspy.fnsl([0,0,0,1,1,0,99,0]) - psspy.bsys(3,0,[0.0,0.0],0,[],1,[1],0,[],0,[]) - psspy.set_opf_report_subsystem(3,0) - psspy.nopf(0,1) - for i in range(0,np.array(loads_base).shape[0]) : # On effectue un pretraitement en passant par une charge intermediaire - psspy.load_chng_4(int(loads_base[i][0]),r"""1""",[1,_i,_i,_i,_i,_i],[0.4*loads_base[i][1],0.4*loads_base[i][2],_f,_f,_f,_f]) - psspy.fnsl([0,0,0,1,1,0,99,0]) - psspy.bsys(3,0,[0.0,0.0],0,[],1,[1],0,[],0,[]) - psspy.set_opf_report_subsystem(3,0) - psspy.nopf(0,1) - for i in range(0,np.array(loads_base).shape[0]) : # On change toutes les charges - psspy.load_chng_4(int(loads_base[i][0]),r"""1""",[1,_i,_i,_i,_i,_i],[x[0]*loads_base[i][1],x[0]*loads_base[i][2],_f,_f,_f,_f]) - - x2=[] - for sz in range(0,nx): - x2.append(float(x[sz])) - - if x[1]<0 : - pass - elif x[1] < len(continLines) : # L'element tire est une ligne - line_num=int(x[1]) - from_bus=continLines[int(line_num)][0] - to_bus=continLines[int(line_num)][1] - br_id=continLines[int(line_num)][2]#.replace('@','') - psspy.branch_chng(from_bus,to_bus,str(br_id),[0,_i,_i,_i,_i,_i],[ _f, _f, _f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) - x2[1]='Line '+str(from_bus)+'-'+str(to_bus)+'#'+str(br_id) - elif x[1] < (len(continLines)+len(continGroups)) : - group_num = int(x[1])-len(continLines) - bus_num = continGroups[int(group_num)][0] - bus_id = continGroups[int(group_num)][1] - psspy.machine_chng_2(int(bus_num),str(bus_id),[0,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) # Change Interconnection disponibility - psspy.opf_gendsp_indv(int(bus_num),str(bus_id),_i,0.0) - x2[1]='Group '+str(bus_num)+'#'+str(bus_id) - #elif x[1] < len(intercos) : - #mat_num=int(x[1]) - #psspy.machine_chng_2(int(intercos[mat_num][0]),str(intercos[mat_num][2]),[0,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) # Change Interconnection disponibility - #psspy.opf_gendsp_indv(int(intercos[mat_num][0]),str(intercos[mat_num][2]),_i,0.0) - #x[1]=-mat_num - else : - pass - # Change the bus that is not in service - #intercos = [] - #line_num=int(x[1]-len(intercos)) - #from_bus=lines_con[int(line_num)-1][0] - #to_bus=lines_con[int(line_num)-1][1] - #br_id=lines_con[int(line_num)-1][2]#.replace('@','') - #psspy.branch_chng(from_bus,to_bus,str(br_id),[0,_i,_i,_i,_i,_i],[ _f, _f, _f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) - #x[1]=line_num - # Change the production of the wind turbines - if np.matrix(windTurbines1).shape[1]>0 : - for i in range(0,np.matrix(windTurbines1).shape[0]) : - psspy.machine_chng_2(windTurbines1[i][0],str(windTurbines1[i][2]),[1,_i,_i,_i,_i,_i],[x[2]*plants_base[windTurbines1[i][1]][6],_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) - - if np.matrix(windTurbines2).shape[1]>0 : - for i in range(0,np.matrix(windTurbines2).shape[0]) : - psspy.machine_chng_2(windTurbines2[i][0],str(windTurbines2[i][2]),[1,_i,_i,_i,_i,_i],[x[3]*plants_base[windTurbines2[i][1]][6],_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) - - # Change the production of the PV stations - if np.matrix(solarPV).shape[1]>0 : - for i in range(0,np.matrix(solarPV).shape[0]) : - psspy.machine_chng_2(solarPV[i][0],str(solarPV[i][2]),[1,_i,_i,_i,_i,_i],[x[4]*plants_base[solarPV[i][1]][6],_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) - - psspy.save(doci) #Saving .sav modifications - ok=1 - while nbeOPF>=0 : - #for i in (zip(*buses_base)[0]) : psspy.bus_chng_3(i,[_i,_i,_i,_i],[_f, 1.05,_f,_f,_f,_f,_f],_s) - psspy.fnsl([0,0,0,1,1,1,99,0]) - psspy.bsys(3,0,[0.0,0.0],0,[],1,[1],0,[],0,[]) - psspy.set_opf_report_subsystem(3,0) - psspy.nopf(0,1) - if psspy.solved()==7: - print 'CONVERGENCE CAS '+str(ite) - ok=1 - break - else : - print '===================================================================' - print 'NO CONVERGENCE' - print '===================================================================' - ok=0 - #for i in range (134) : - #psspy.opf_bus_indv(i,[_i,0],[_f, 0.7,_f,_f,_f]) - nbeOPF-=1 - psspy.save(doci) - all_inputs=read_sav(doci) - buses=all_inputs[0];lines=all_inputs[1];transf=all_inputs[2];plants=all_inputs[3];loads=all_inputs[4]; shunt=all_inputs_base[5] - - # 3. Affiche Y - sizeY4=np.matrix(shunt).shape[0] - y=np.zeros(2*sizeY0+sizeY1+3*sizeY2+sizeY3+sizeY4) - z=np.zeros(8) - rate_mat_index=Irate_num+2 - if ok==1 : - # Creates the quantities of interest - for i in range (sizeY2) : - if lines [i][rate_mat_index]>100 : - z[0]+=1 # Number of lines above 100% of their limits - for i in range (sizeY1): - if buses[i][2]>1.06 : - z[1]+=1 - if buses[i][2]<0.9399 : - z[1]+=1 # Number of buses outside of their voltage limits - for i in range (sizeY0) : - z[2]+=float(plants[i][3]) # Total active production - for i in range (sizeY3) : - z[3]+=float(loads[i][1]) # Total active consumption - z[4]=(z[2]-z[3])/z[2]*100 # Active power losses - for i in range (sizeY2) : - if lines [i][3]>z[5] : - z[5]=lines [i][rate_mat_index] # Max flow in lines - for i in range (sizeY2) : - if lines [i][rate_mat_index]>90 : - z[6]+=1 - z[6]=z[6]-z[0] # Number of lines between 90% and 100% of their limits - - final_shunt=0 - for i in range (sizeY4) : - final_shunt+=shunt[i][2] - z[7]=final_shunt-init_shunt - - # Creates the output vectors - for Pmach in range (sizeY0): - y[Pmach]=float(plants[Pmach][3]) - for Qmach in range (sizeY0): - y[Qmach+sizeY0]=float(plants[Qmach][4]) - for Vbus in range (sizeY1): - y[Vbus+2*sizeY0]=float(buses[Vbus][2]) - for Iline in range (sizeY2): - y[Iline+2*sizeY0+sizeY1]=float(lines[Iline][rate_mat_index]) - for Pline in range (sizeY2): - y[Pline+2*sizeY0+sizeY1+sizeY2]=float(lines[Pline][6]) - for Qline in range (sizeY2): - y[Qline+2*sizeY0+sizeY1+2*sizeY2]=float(lines[Qline][7]) - for Pload in range (sizeY3) : - y[Pload+2*sizeY0+sizeY1+3*sizeY2]=float(loads[Pload][1]) - for Qshunt in range (sizeY4) : - y[Qshunt+2*sizeY0+sizeY1+3*sizeY2+sizeY3]=float(shunt[Qshunt][2]) - - #Ecris les sorties - print "sorties:" - nz = len(z) - for i in range(0,nz): - print "z[%d]=%f" % (i,z[i]) - MyLogger(x2,y,z,logCSVfilename,logTXTfilename,ite) - #MyMultiLogger (x2, y, sizeY, z, ite, folder, day, fich, hour) - return NumericalPoint(z) - else : - MyLogger(x2,y,z,logCSVfilename,logTXTfilename,ite) - #MyMultiLogger (x2, y, sizeY, z, ite, folder, day, fich, hour) - return NumericalPoint(z) - -#=============================================================================== -# DEFINITION DU WRAPPER - WRAPPER's DEFINITION -#=============================================================================== -# Initialize size output -psspy.case(doc_base) -all_inputs_base=read_sav(doc_base) -buses_base=all_inputs_base[0] -lines_base=all_inputs_base[1] -trans_base=all_inputs_base[2] -plants_base=all_inputs_base[3] -loads_base=all_inputs_base[4] -shunt_base=all_inputs_base[5] -sizeY0=np.matrix(plants_base).shape[0] -sizeY1=np.matrix(buses_base).shape[0] -sizeY2=np.matrix(lines_base).shape[0] -sizeY3=np.matrix(loads_base).shape[0] -sizeY4=np.matrix(shunt_base).shape[0] -sizeY=[sizeY0,sizeY1,sizeY2,sizeY3,sizeY4] -sizeOutput=sizeY2 - - -class PSSEWrapperClass(OpenTURNSPythonFunction) : - def __init__(self) : - OpenTURNSPythonFunction.__init__(self,5,8) - def _exec(self,x) : - return PSSEFunction(x) - -# Initialize the folder -newpath = folder+"\N"+folderN_1+day -if not os.path.exists(newpath): os.makedirs(newpath) - -# Test the Num. Math. Function -pssefun = NumericalMathFunction(PSSEWrapperClass()) - -# Definition of the function to use -inputDim = pssefun.getInputDimension() -outputDim = pssefun.getOutputDimension() - -# Initialization of the distribution collection: -#aCollection = DistributionCollection() - -# Create a collection of the marginal distributions -collectionMarginals = DistributionCollection(inputDim) -collectionMarginals[0] = Distribution(distributionX0) # Load distribution -collectionMarginals[1] = Distribution(distributionX1) # N-1 distribution -collectionMarginals[2] = Distribution(distributionX2) # Wind 1 distribution -collectionMarginals[3] = Distribution(distributionX3) # Wind 2 distribution -collectionMarginals[4] = Distribution(distributionX4) # PV distribution - -#Create a correlation matrix as copulas -corr=CorrelationMatrix(inputDim) - -corr[1,0]=corr10 -corr[2,0]=corr20 -corr[3,0]=corr30 -corr[4,0]=corr40 -corr[0,1]=corr10 -corr[2,1]=corr21 -corr[3,1]=corr31 -corr[4,1]=corr41 -corr[0,2]=corr20 -corr[1,2]=corr21 -corr[3,2]=corr32 -corr[4,2]=corr42 -corr[0,3]=corr30 -corr[1,3]=corr31 -corr[2,3]=corr32 -corr[4,3]=corr43 -corr[0,4]=corr40 -corr[1,4]=corr41 -corr[2,4]=corr42 -corr[3,4]=corr43 - -copula=Copula(NormalCopula(corr)) - - -# Create the input probability distribution, args are the distributions, the correlation laws -inputDistribution = ComposedDistribution(collectionMarginals, copula) - -# Create the input random vector -"""inputRandomVector = RandomVector(inputDistribution) - -# Create the output variable of interest -outputVariableOfInterest = RandomVector(pssefun, inputRandomVector) -outputVariableOfInterest.setDescription(pssefun.getOutputDescription())""" - -#=============================================================================== -# ETUDE DE DISPERSION CENTRALE - CENTRAL DEVIATION STUDY -#=============================================================================== -# Initialize the logger : write the headers -logCSVfilename=folder+"\N"+folderN_1+day+"\simulationDClog"+hour+".csv" # Name of the file : global variable -f = open(logCSVfilename, "a") -f.write("Iteration;;X:Load(pu);X:lineOff#;XProdEolienne1%Pnom;XProdEolienne2%Pnom;X:ProdPV%Pnom;;Y:NbeTransit;Y:NbeTension;Y:PProdTot;Y:PConsoTot;Y:%Losses;Y:Max%A;Y:NbeTransit_0.9-1;Y:AddedMVAR;;") -# Names of the Output variables withConso the bus number -for name in range (sizeY0): - f.write("Y:PMachine"+str(plants_base[name][0])+";") -for name in range (sizeY0): - f.write("Y:QMachine"+str(plants_base[name][0])+";") -for name in range (sizeY1): - f.write("Y:VBus"+str(buses_base[name][0])+";") -for name in range (sizeY2): - f.write("Y"+str(name+1)+":%Rate "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+";") -for name in range (sizeY2): - f.write("Y"+str(name+1)+":P "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+";") -for name in range (sizeY2): - f.write("Y"+str(name+1)+":Q "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+";") -for name in range (sizeY3): - f.write("Y:Load "+str(loads_base[name][0])+";") -for name in range (sizeY4): - f.write("Y:Shunt bus "+str(shunt_base[name][0])+";") -f.write("\n") -# Names of the Output variables with the bus names -f.write("#;;pu;line number;%Pnom;%Pnom;%Pnom;;Nbe;Nbe;MW;MW;%;%;Nbe;MVAR;;") -for name in range (sizeY0): - f.write(str(plants_base[name][8])+";") -for name in range (sizeY0): - f.write(str(plants_base[name][8])+";") -for name in range (sizeY1): - f.write(str(buses_base[name][3])+";") -for name in range (sizeY2): - f.write(str(lines_base[name][8])+"-"+str(lines_base[name][9])+";") -for name in range (sizeY2): - f.write(str(lines_base[name][8])+"-"+str(lines_base[name][9])+";") -for name in range (sizeY2): - f.write(str(lines_base[name][8])+"-"+str(lines_base[name][9])+";") -for name in range (sizeY3): - f.write(str(loads_base[name][4])+";") -for name in range (sizeY4): - f.write(str(shunt_base[name][3])+";") -f.write("\n") -f.close() - -logTXTfilename=folder+"\N"+folderN_1+day+"\simulationDClog"+hour+".txt" # Name of the file : global variable -f = open(logTXTfilename, "a") -f.write("Iteration\tX:Load(pu)\tX:lineOff#\tXProdEolienne1%Pnom\ttXProdEolienne2%Pnom\tX:ProdPV%Pnom\tY:NbeTransit\tY:NbeTension\tY:PProdTot\tY:PConsoTot\tY:%Losses\tY:Max%A\tY:NbeTransit_0.9-1\tY:AddedShunt\t") -# Names of the Output variables withConso the bus number -for name in range (sizeY0): - f.write("Y:PMachine"+str(plants_base[name][0])+" - "+str(plants_base[name][8])+"\t") -for name in range (sizeY0): - f.write("Y:QMachine"+str(plants_base[name][0])+" - "+str(plants_base[name][8])+"\t") -for name in range (sizeY1): - f.write("Y:VBus"+str(buses_base[name][0])+" - "+str(buses_base[name][3])+"\t") -for name in range (sizeY2): - f.write("Y"+str(name+1)+":%RateA "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+" - "+str(lines_base[name][8])+"-"+str(lines_base[name][9])+"\t") -for name in range (sizeY2): - f.write("Y"+str(name+1)+":P "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+" - "+str(lines_base[name][8])+"-"+str(lines_base[name][9])+"\t") -for name in range (sizeY2): - f.write("Y"+str(name+1)+":Q "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+" - "+str(lines_base[name][8])+"-"+str(lines_base[name][9])+"\t") -for name in range (sizeY3): - f.write("Y:Load "+str(loads_base[name][0])+" - "+str(loads_base[name][4])+"\t") -for name in range (sizeY4): - f.write("Y:Shunt "+str(shunt_base[name][0])+" - "+str(shunt_base[name][3])+"\t") -f.write("\n") -f.close() - -""" -# Initialize the multilogger : write the headers -for fich in range (np.size(sizeY,0)): - multilogfilename=folder+"\N"+day+"\Y"+str(fich)+"simulationDClog"+hour+".csv" - f=open(multilogfilename, 'a') - f.write("Iteration;;X:Load(pu);X:lineOff#;XProdEolienne1%Pnom;XProdEolienne2%Pnom;X:ProdPV%Pnom;;Y:NbeTransit;Y:NbeTension;Y:PProdTot;Y:PConsoTot;Y:Max%A;Y:NbeTransit_0.9-1;;") - if fich == 0 : - for name in range (sizeY[0]): - f.write("Y:PMachine"+str(plants_base[name][0])+";") - f.write("\n") - f.write("#;;pu;line number;%Pnom;%Pnom;%Pnom;;Nbe;Nbe;MW;MW;%;%;Nbe;;") - for name in range (sizeY[0]): - f.write(str(plants_base[name][8])+";") - f.write("\n") - f.close() - elif fich == 1 : - for name in range (sizeY[1]): - f.write("Y:VBus"+str(buses_base[name][0])+";") - f.write("\n") - f.write("#;;pu;line number;%Pnom;%Pnom;%Pnom;;Nbe;Nbe;MW;MW;%;%;Nbe;;") - for name in range (sizeY[1]): - f.write(str(buses_base[name][3])+";") - f.write("\n") - f.close() - elif fich == 2 : - for name in range (sizeY[2]): - f.write("Y"+str(name+1)+":%RateA "+str(lines_base[name][0])+"-"+str(lines_base[name][1])+";") - f.write("\n") - f.write("#;;pu;line number;%Pnom;%Pnom;%Pnom;;Nbe;Nbe;MW;MW;%;%;Nbe;;") - for name in range (sizeY[2]): - f.write(str(lines_base[name][8])+"-"+str(lines_base[name][9])+";") - f.write("\n") - f.close() - elif fich == 3 : - for name in range (sizeY[3]): - f.write("Y:Ploads "+str(loads_base[name][0])+";") - f.write("\n") - f.write("#;;pu;line number;%Pnom;%Pnom;%Pnom;;Nbe;Nbe;MW;MW;%;%;Nbe;;") - for name in range (sizeY[3]): - f.write(str(loads_base[name][4])+";") - f.write("\n") - f.close() - -""" -# Start the simulations -ite=0 -print "\n\n\n Starting PSEN "+str(montecarlosize)+" simulations" - -"""inputSample=inputRandomVector.getSample(montecarlosize) -inputSample.setDescription( ("X0","X1","X2","X3") ) -inputSample.exportToCSVFile("InputSamples.csv")""" - -if sum(corr) == 5 : - myLHSE = LHSExperiment(inputDistribution,montecarlosize) - inputSample = myLHSE.generate() -else : - myMCE = MonteCarloExperiment(inputDistribution,montecarlosize) - inputSample = myMCE.generate() - -try : - time_serie -except NameError : - print 'Probabilistic' - TStest=0 - outputSampleAll = pssefun(inputSample)#outputVariableOfInterest.getSample(montecarlosize) -else : - TStest=1 - for i in range (len(time_serie_mat)) : - print 'Time serie' - RandomGenerator.SetSeed(i) - Xt=[] - n=0 - for j in range (len(time_serie_file)) : - if time_serie_file[j] == -1 : - Xt.append(-1) - n+=1 - else : - Xt.append(time_serie_mat[i][j-n]) - Xt.insert(1,-1) - try : - outputSampleAll - except : - outputSampleAll = pssefun(inputSample) - else : - outputSampleAll.add(pssefun(inputSample)) - -outputDim=outputSampleAll.getDimension() -outputSize=outputSampleAll.getSize() - -outputSample=NumericalSample(0,outputDim) -outputSampleMissed=NumericalSample(0,outputDim) - -for i in range (outputSize): - if outputSampleAll[i,5]==0 : - outputSampleMissed.add(outputSampleAll[i]) - else : - outputSample.add(outputSampleAll[i]) - -outputDescription=[] -for i in range (outputDim): - outputDescription.append("Y"+str(i)) -outputSample.setDescription( outputDescription ) - -# Get the empirical mean and standard deviations -empMeanX = inputSample.computeMean() -empSdX = inputSample.computeStandardDeviationPerComponent() -empiricalMean = outputSample.computeMean() -empiricalSd = outputSample.computeStandardDeviationPerComponent() - -f=open(logCSVfilename, 'a') -f.write("\n") -f.write('Mean;;') -for i in range(0,inputDim): - f.write("%f;" % (empMeanX[i])) -f.write(";") -for i in range(0,outputDim): - f.write("%f;" % (empiricalMean[i])) -f.write(";") -f.write("\nStandard deviation;;") -for i in range(0,inputDim): - f.write("%f;" % (empSdX[i])) -f.write(";") -for i in range(0,outputDim): - f.write("%f;" % (empiricalSd[i])) -f.write(";") -f.close() - -f=open(exec_file,'a') -#stop_time=100*times()[0] -stop_time=time.clock() -f.write("Stop time: %f; Duration: %f; Time per execution: %f; " % (stop_time, stop_time-start_time, (stop_time-start_time)/montecarlosize)) -f.write("\n\n") -f.close() - -print '\n\nSimulated '+str(montecarlosize)+' cases in '+ str(stop_time-start_time)+' seconds. Average '+str((stop_time-start_time)/montecarlosize)+'s per case.' - -nMissed=int(outputSampleMissed.getSize()) - -print '\n\n Non-convergence rate is '+str(round(nMissed*100/montecarlosize,3))+' % ('+str(outputSampleMissed.getSize())+' cases on '+str(montecarlosize)+')' - -#graphical_out(inputSample, outputSampleAll, inputDim, outputDim, montecarlosize) - diff --git a/PSEN_Eficas/PSEN/__init__.py b/PSEN_Eficas/PSEN/__init__.py deleted file mode 100755 index e69de29b..00000000 diff --git a/PSEN_Eficas/PSEN/exploit2.ows b/PSEN_Eficas/PSEN/exploit2.ows deleted file mode 100755 index 56005895..00000000 --- a/PSEN_Eficas/PSEN/exploit2.ows +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PSEN_Eficas/PSEN/support_functions.py b/PSEN_Eficas/PSEN/support_functions.py deleted file mode 100755 index 4a84a08a..00000000 --- a/PSEN_Eficas/PSEN/support_functions.py +++ /dev/null @@ -1,599 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Created on Mon Jun 03 15:31:42 2013 - -@author: B31272 - -Fonctions de support -""" -import os,sys,random,string -sys.path.append(r"C:\Program Files\PTI\PSSE33\PSSBIN") -os.environ['PATH'] = r"C:\Program Files\PTI\PSSE33\PSSBIN;"+ os.environ['PATH'] -#os.chdir(folder) -import psspy -import pssarrays -import redirect -_i=psspy.getdefaultint() -_f=psspy.getdefaultreal() -_s=psspy.getdefaultchar() -redirect.psse2py() -#import pssdb -psspy.psseinit(80000) - -import numpy as np -from math import* -from openturns import * - -#=============================================================================== -# DEFINITION DES FONCTIONS - CREATION OF THE FUNCTIONS -#=============================================================================== - -#Fonction de transfert vent-puissance d'une eolienne -def eol(wind, WTconfig): - Vcin = WTconfig [0] - Vrate = WTconfig [1] - Vcout = WTconfig [2] - Rho = WTconfig [3] - lossrate = WTconfig [4] - if wind <= Vcin : - Pnorm=0 - elif wind < Vrate : - Pnorm=wind*(1-lossrate)#((wind**2-Vcin**2)/(Vrate**2-Vcin**2)*Rho/1.225*(1-lossrate)) - elif wind < Vcout : - Pnorm = 1*(1-lossrate) - else : - Pnorm=0 - return Pnorm - -#Fonction permettant de lire les donnees qui nous interessent et de les mettre dans une matrice -def read_sav(doc): - psspy.case(doc) - # Select what to report - if psspy.bsysisdef(0): - sid = 0 - else: # Select subsytem with all buses - sid = -1 - - flag_bus = 1 # in-service - flag_plant = 4 # in-service - flag_load = 1 # in-service - flag_swsh = 1 # in-service - flag_brflow = 1 # in-service - owner_brflow = 1 # bus, ignored if sid is -ve - ties_brflow = 5 # ignored if sid is -ve - entry = 1 # gives a single entry (each branch once) - - #Bus data (number, basekV, pu, name, ...) : PSSe has 3 functions one for integer data, one for real data and one for strings - istrings = ['number'] - ierr, idata = psspy.abusint(sid, flag_bus, istrings) - buses=idata - - rstrings = ['base','pu'] - ierr, rdata = psspy.abusreal(sid, flag_bus, rstrings) - buses.append(rdata[0]) - buses.append(rdata[1]) - - cstrings = ['name'] - ierr, cdata = psspy.abuschar(sid, flag_bus, cstrings) - buses.append(cdata[0]) - - buses=zip(*buses) # transpose the matrix - - del idata, rdata, istrings, rstrings - - #Lines data (from, to, amps, rate%a, ploss, qloss) - flag=2 #All non-transformer branches - istrings = ['fromnumber','tonumber'] - ierr, idata = psspy.abrnint(sid, owner_brflow, ties_brflow, flag, entry, istrings) - lines=idata - - rstrings=['amps','pctratea','pctrateb','pctratec','p','q'] - ierr, rdata = psspy.abrnreal(sid, owner_brflow, ties_brflow, flag, entry, rstrings) - for rc in range (np.matrix(rdata).shape[0]) : - lines.append(rdata[rc]) - - cstrings=['fromname','toname','id'] - ierr, cdata = psspy.abrnchar(sid, owner_brflow, ties_brflow, flag, entry, cstrings) - for rc in range (np.matrix(cdata).shape[0]) : - lines.append(cdata[rc]) - - lines=zip(*lines) # transpose the matrix - - del idata, rdata, istrings, rstrings - - #2 windings transformers data (from, to, amps, rate%a, ploss, qloss) - flag=6 #All transformer branches - istrings = ['fromnumber','tonumber'] - ierr, idata = psspy.abrnint(sid, owner_brflow, ties_brflow, flag, entry, istrings) - transf=idata - - rstrings=['amps','pctratea','ploss','qloss'] - ierr, rdata = psspy.abrnreal(sid, owner_brflow, ties_brflow, flag, entry, rstrings) - for rc in range (np.matrix(rdata).shape[0]) : - transf.append(rdata[rc]) - - transf=zip(*transf) # transpose the matrix - - del idata, rdata, istrings, rstrings - - #Machines data (bus, inservice, number, pgen, qgen, mvabase) - istrings = ['number','status'] - ierr, idata = psspy.amachint(sid, flag_plant, istrings) - plants=idata - - cstrings = ['id'] - ierr, cdata = psspy.amachchar(sid, flag_plant, cstrings) - for rc in range (np.matrix(cdata).shape[0]) : - plants.append(cdata[rc]) - - rstrings = ['pgen','qgen','mbase','pmax','qmax'] - ierr, rdata = psspy.amachreal(sid, flag_plant, rstrings) - for rc in range (np.matrix(rdata).shape[0]) : - plants.append(rdata[rc]) - - cstrings = ['name'] - ierr, cdata = psspy.amachchar(sid, flag_plant, cstrings) - plants.append(cdata[0]) - - nb_plants=np.matrix(plants).shape[1] - for rc in range (0,nb_plants) : - plants[3][rc]=float(plants[3][rc]*int(plants[1][rc])) # If the plant isn't in service its production is fixed to zero - plants[4][rc]=float(plants[4][rc]*int(plants[1][rc])) # If the plant isn't in service its production is fixed to zero - - plants=zip(*plants) # transpose the matrix - - #Loads data (bus, active, reactive) - istrings = ['number'] - ierr, idata = psspy.aloadint(sid, flag_load, istrings) - loads=idata - - xstrings = ['mvaact'] - ierr, xdata = psspy.aloadcplx(sid, flag_load, xstrings) - loads.append(np.real(xdata)[0]) # Append the real part of the load - loads.append(np.imag(xdata)[0]) #Append the imaginary part of the load - - istrings = ['status'] - ierr, idata = psspy.aloadint(sid, flag_load, istrings) - loads.append(idata[0]) - - cstrings = ['name'] - ierr, cdata = psspy.aloadchar(sid, flag_load, cstrings) - loads.append(cdata[0]) - - nb_loads=np.matrix(loads).shape[1] - for rc in range (0,nb_loads) : - loads[1][rc]=float(loads[1][rc]*int(loads[3][rc])) # If the load isn't in service its consumption is fixed to zero - loads[2][rc]=float(loads[2][rc]*int(loads[3][rc])) # If the load isn't in service its consumption is fixed to zero - - loads=zip(*loads) # transpose the matrix - - #Fixed shunt data (number, MVAR, name, ...) - istrings = ['number','status'] - ierr, idata = psspy.afxshntbusint(sid, flag_bus, istrings) - shunt=idata - - xstrings = ['shuntact'] - ierr, xdata = psspy.afxshntbuscplx(sid, flag_bus, xstrings) - shunt.append(np.imag(xdata)[0]) #Append the imaginary part of the load - - cstrings = ['name'] - ierr, cdata = psspy.afxshntbuschar(sid, flag_bus, cstrings) - shunt.append(cdata[0]) - - shunt=zip(*shunt) # transpose the matrix - - return buses, lines, transf, plants, loads, shunt - -# Fonction pour ecrire un fichier de sortie type csv -def MyLogger(x,y,z,logCSVfilename,logTXTfilename,ite): - f=open(logCSVfilename, 'a') - f.write("%f;" % (ite)) - f.write(";") - nx = len(x) - for i in range(0,nx): - f.write(str(x[i]))#f.write("%f;" % (x[i])) - f.write(";") - f.write(";") - nz = len(z) - for i in range(0,nz): - f.write("%f;" % (z[i])) - f.write(";") - ny = len(y) - for j in range(0,ny): - f.write("%f;" % (y[j])) - f.write("\n") - f.close() - - f=open(logTXTfilename, 'a') - f.write("%f\t" % (ite)) - nx = len(x) - for i in range(0,nx): - f.write(str(x[i]))#f.write("%f\t" % (x[i])) - f.write("\t") - nz = len(z) - for i in range(0,nz): - f.write("%f\t" % (z[i])) - ny = len(y) - for j in range(0,ny): - f.write("%f\t" % (y[j])) - f.write("\n") - f.close() - - -# Fonction pour ecrire un fichier de sortie type csv pour chaque type de grandeur de sortie -def MyMultiLogger (x, y, sizeY, z, ite, folder, day, fich, hour): - global ny - y0=0 - for fich in range (np.size(sizeY,0)): - multilogfilename=folder+"\N"+day+"\Y"+str(fich)+"simulationDClog"+hour+".csv" - f=open(multilogfilename, 'a') - f.write("%f;" % (ite)) - f.write(";") - nx = len(x) - for i in range(0,nx): - f.write("%f;" % (x[i])) - f.write(";") - nz = len(z) - for i in range(0,nz): - f.write("%f;" % (z[i])) - f.write(";") - ny = sizeY[fich] - for j in range(0,ny): - f.write("%f;" % (y[j+y0])) - f.write("\n") - f.close() - y0 += ny - print "Fichiers "+str(ite)+" enregistres\n\n" - -# Analyses graphiques -def graphical_out (inputSample, outputSampleAll, inputDim, outputDim, montecarlosize) : - print "\n\n\n Writing graphical analysis files..." - # A Pairwise scatter plot of the inputs - myGraph = Graph() - myPairs = Pairs(inputSample, 'Inputs relations', inputSample.getDescription(), "red", "bullet") - myGraph.add(Drawable(myPairs)) - myGraph.draw("Input Samples",640,480,GraphImplementation.PDF) - #View(myGraph.getBitmap()) - print 'Input pairwise scatterplot done...' - - # A Pairwise scatter plot of the outputs - myGraph = Graph() - myPairs = Pairs(outputSampleAll, 'Output relations', outputSampleAll.getDescription(), "red", "bullet") - myGraph.add(Drawable(myPairs)) - myGraph.draw("Output Samples",640,480,GraphImplementation.PDF) - #View(myGraph.getBitmap()) - print 'Output pairwise scatterplot done...' - - # A Pairwise scatter plot of the inputs/outputs - # Draw all scatter plots yj vs xi - for j in range(outputDim): - outputSamplej=outputSampleAll.getMarginal(j) - Ylabelstr=outputSamplej.getDescription()[0] - for i in range(inputDim): - inputSamplei=inputSample.getMarginal(i) - Xlabelstr=inputSamplei.getDescription()[0] - X=NumericalSample(montecarlosize,2) - for k in range(montecarlosize): - X[k,0]=inputSamplei[k][0] - X[k,1]=outputSamplej[k][0] - myGraph = Graph() - myCloud=Cloud(X); - mytitle=Ylabelstr+"vs"+Xlabelstr - myGraph.add(Drawable(myCloud)) - myGraph.setAxes(1) - myGraph.setXTitle(Xlabelstr) - myGraph.setYTitle(Ylabelstr) - myGraph.draw(mytitle,640,480,GraphImplementation.PDF) - #ViewImage(myGraph.getBitmap()) - print 'Input/Output pairwise scatterplot done...' - - # An histogram of the inputs - for i in range(inputDim): - inputSamplei=inputSample.getMarginal(i) - myGraph = VisualTest.DrawHistogram(inputSamplei) - labelarray=inputSamplei.getDescription() - labelstr=labelarray[0] - myGraph.setTitle(labelstr) - myGraph.setName(labelstr) - myGraph.setXTitle(labelstr) - myGraph.setYTitle("Frequency") - myGraph.draw(labelstr,640,480,GraphImplementation.PDF) - #View(myGraph.getBitmap()) - print 'Input histogram done...' - - # An histogram of the outputs - for j in range(outputDim): - outputSamplej=outputSampleAll.getMarginal(j) - myGraph = VisualTest.DrawHistogram(outputSamplej) - labelarray=outputSamplej.getDescription() - labelstr=labelarray[0] - myGraph.setTitle(labelstr) - myGraph.setName(labelstr) - myGraph.setXTitle(labelstr) - myGraph.setYTitle("Frequency") - myGraph.draw(labelstr,640,480,GraphImplementation.PDF) - #View(myGraph.getBitmap()) - print 'Output histogram done' - print 'Graphical output terminated' - -def config_ENR(path_config_ENR) : - PV=[] - Wind1=[] - Wind2=[] - Interco=[] - f=open(path_config_ENR,"r") - lines=f.readlines() - for i in range (len(lines)) : - line = lines[i].split(";") - if str(line[0]).upper() == 'PV' : - PV.append([int(line[1]),i-1,int(line[3])]) - elif str(line[0]).upper() == 'W1' : - Wind1.append([int(line[1]),i-1,int(line[3])]) - elif str(line[0]).upper() == 'W2' : - Wind2.append([int(line[1]),i-1,int(line[3])]) - elif str(line[0]).upper() == 'I' : - Interco.append([int(line[1]),i-1,int(line[3])]) - else : - pass - return PV, Wind1, Wind2, Interco - -def config_contingency(path_config_contin) : - lines_con=[] - groups_con=[] - # Loading of lines contingency configuration - f=open(path_config_contin[0],"r") - lines=f.readlines() - f.close() - for i in range (len(lines)) : - line=lines[i].split(";") - try : - int(line[1]) - except ValueError : - pass - else : - if line[0] == '' : - line[0] = '0' - lines_con.append([int(line[1]), int(line[3]), str(line[5]),float(line[0].replace(',','.'))]) - - # Loading of groups contingency configuration - f=open(path_config_contin[1],"r") - lines=f.readlines() - f.close() - for i in range (len(lines)) : - line=lines[i].split(";") - try : - int(line[1]) - except ValueError : - pass - else : - if line[0] == '' : - line[0] = '0' - groups_con.append([int(line[1]), int(line[3]),float(line[0].replace(',','.'))]) - - sizeLines = len(lines_con) - sizeGroups = len(groups_con) - val=[] - prob=[] - for i in range(sizeLines+sizeGroups) : - val.append(int(i)) - - for i in range (sizeLines) : - prob.append(lines_con[i][3]) - for i in range (sizeGroups) : - prob.append(groups_con[i][2]) - - return lines_con, groups_con, val, prob - -def LoadARMA(time_serie_file, time_serie_SS, time_serie_TH) : - f=open(time_serie_file,"r") - lines=f.readlines() - N=len(lines) - Xt=[] - for i in range(N) : - Xt.append([float(lines[i])]) - - myTG=RegularGrid(0,float(time_serie_SS),N) - TS=TimeSeries(myTG,NumericalSample(Xt)) - myWN=WhiteNoise(Distribution(Normal(0,1)),myTG) - myState=ARMAState(TS.getSample(),NumericalSample()) - p=12 - q=0 - d=1 - myFactory = ARMALikelihoodFactory ( p , q , d ) - myARMA = myFactory.build(TS) - - myARMA.setState(myState) - - AR = myARMA.getARCoefficients() - MA = myARMA.getMACoefficients() - - ts = myARMA.getRealization() - ts.setName('A realization') - myTSGraph=ts.drawMarginal(0) - myTSGraph.draw('Realization'+str(p)+","+str(q),640,480,GraphImplementation.PDF) - myARMAState=myARMA.getState() - - #Make a prediction of the future on next Nit instants - Nit = int(time_serie_TH) - myARMA2=ARMA(AR,MA,myWN,myARMAState) - possibleFuture=myARMA2.getFuture(Nit) - possibleFuture.setName('Possible future') - - Xt2=[] - for i in range (len(possibleFuture)): - Xt2.append(possibleFuture.getValueAtIndex(i)[0]) - Max=float(max(Xt2)) - Min=float(min(Xt2)) - h=float(Max-Min) - for i in range (len(possibleFuture)): - value= (Xt2[i]-Min+h/3)/(Max-Min+h/3) - possibleFuture.setValueAtIndex(i,NumericalPoint(1,value)) - - myFG=possibleFuture.drawMarginal(0) - myFG.draw('Future'+str(Nit),640,480,GraphImplementation.PDF) - - return possibleFuture - -def LoadTS(time_serie_file) : - TS=[] - for i in range(len(time_serie_file)) : - if time_serie_file[i] == -1 : - pass - else : - f=open(time_serie_file[i],"r") - lines=f.readlines() - N=len(lines) - Xt=[] - for j in range(N) : - try : - float(lines[i]) - except ValueError : - lines[i] = commaToPoint(lines[i]) - else : - pass - Xt.append([float(lines[j])]) - TS.append(Xt) - return TS - - -def KSDist(filename) : - f=open(filename,"r") - print "Creating Kernel Smoothing distribution from: "+str(filename) - lines=f.readlines() - N=len(lines) - Xt=[] - for i in range(N) : - if lines[i] == "\n" : - print "End of file" - break - else : - try : - float(lines[i]) - except ValueError : - lines[i] = commaToPoint(lines[i]) - else : - pass - Xt.append([float(lines[i])]) - NS=NumericalSample(Xt) - kernel=KernelSmoothing(Uniform()) - myBandwith = kernel.computeSilvermanBandwidth(NS) - KS=kernel.build(NS,myBandwith,1) - return KS - -def threshold (inputRandomVector, outputVariableOfInterest,pssefun,inputDistribution) : - # We create a quadraticCumul algorithm - myQuadraticCumul = QuadraticCumul(outputVariableOfInterest) - - # We compute the several elements provided by the quadratic cumul algorithm - # and evaluate the number of calculus needed - nbBefr = pssefun.getEvaluationCallsNumber() - - # Mean first order - meanFirstOrder = myQuadraticCumul.getMeanFirstOrder()[0] - nbAfter1 = pssefun.getEvaluationCallsNumber() - - # Mean second order - meanSecondOrder = myQuadraticCumul.getMeanSecondOrder()[0] - nbAfter2 = pssefun.getEvaluationCallsNumber() - - # Standard deviation - stdDeviation = sqrt(myQuadraticCumul.getCovariance()[0,0]) - nbAfter3 = pssefun.getEvaluationCallsNumber() - - print "First order mean=", myQuadraticCumul.getMeanFirstOrder()[0] - print "Evaluation calls number = ", nbAfter1 - nbBefr - print "Second order mean=", myQuadraticCumul.getMeanSecondOrder()[0] - print "Evaluation calls number = ", nbAfter2 - nbAfter1 - print "Standard deviation=", sqrt(myQuadraticCumul.getCovariance()[0,0]) - print "Evaluation calls number = ", nbAfter3 - nbAfter2 - - print "Importance factors=" - for i in range(inputRandomVector.getDimension()) : - print inputDistribution.getDescription()[i], " = ", myQuadraticCumul.getImportanceFactors()[i] - print "" - -def getUserDefined (val, prob): - try : - val = val.split(',') - prob = prob.split(',') - except AttributeError : - pass - dim = len (val) - coll = UserDefinedPairCollection() - for i in range (dim) : - UDpair=UserDefinedPair(NumericalPoint(1,float(val[i])),float(prob[i])) - coll.add(UDpair) - return UserDefined(coll) - -def getHistogram (step, prob) : - try : - step = step.split(',') - prob = prob.split(',') - except AttributeError : - pass - dim = len (step) - myHistogram = HistogramPairCollection(dim) - for i in range (dim) : - myHistogram[i]=HistogramPair(float(step[i]),float(prob[i])) - return myHistogram - -def getUserLaw (description) : - law_num=int(description[0]) - time_serie=0 - time_serie_file='' - time_serie_SS=0 - time_serie_TH=0 - if law_num == 1 : - law=Normal(float(description[1]),float(description[2])) - elif law_num == 2 : - law=Uniform(float(description[1]),float(description[2])) - elif law_num == 3 : - law=Exponential(float(description[1]),float(description[2])) - elif law_num == 4 : - law=Weibull(float(description[1]),float(description[2]),float(description[3])) - elif law_num == 5 : - law=TruncatedNormal(float(description[1]),float(description[2]),float(description[3]),float(description[4])) - elif law_num == 6 : - law=UserDefined(getUserDefined (description[1], description[2])) - elif law_num == 7 : - law=Histogram(0.0, getHistogram (description[1], description[2])) - elif law_num == 10 : - law=KSDist(description[1]) - elif law_num == 20 : - law = Uniform(0.999999,1) - time_serie=1 - time_serie_file=description[1] - """time_serie_SS=description[2] - time_serie_TH=description[3]""" - else : - law = Uniform(0.999999,1) - return law, [time_serie, time_serie_file] #[time_serie, time_serie_file, time_serie_SS, time_serie_TH] - -def contingency_automatic (dfxPath, acccPath, rate) : - psspy.accc_with_dsp_3( 0.5,[0,0,0,1,1,2,0,0,0,0,0],r"""ALL""",dfxPath,acccPath,"","","") - psspy.accc_single_run_report_4([1,int(rate),int(rate),1,1,0,1,0,0,0,0,0],[0,0,0,0,6000],[ 0.5, 5.0, 100.0,0.0,0.0,0.0, 99999.],acccPath) - - rslt_summary=pssarrays.accc_summary(acccPath) - if int(rate) == 1 : - rate = rslt_summary.rating.a - elif int(rate) == 2 : - rate = rslt_summary.rating.b - elif int(rate) == 3 : - rate = rslt_summary.rating.c - else : - print "NO RATE CHOOSEN" - - Labels=rlst.colabel - contin_load=[] - for label in Labels : - t=[] - rslt=pssarrays.accc_solution(acccPath,contingency,label,0.5,5.0) - ampFlow=rslt.ampflow - for i in range (len(rA)) : - t.append(ampFlow[i]/rate[i]) - contin_load.append(t) - return contin_load - -def commaToPoint (string) : - stringReplaced = string.replace(',','.') - return stringReplaced \ No newline at end of file diff --git a/PSEN_Eficas/PSEN_Cata.py b/PSEN_Eficas/PSEN_Cata.py deleted file mode 100644 index d74d7e4a..00000000 --- a/PSEN_Eficas/PSEN_Cata.py +++ /dev/null @@ -1,2498 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# -------------------------------------------------- -# debut entete -# -------------------------------------------------- - -#from Accas import ASSD, JDC_CATA, AU_MOINS_UN, PROC, SIMP, FACT, OPER, MACRO, BLOC, A_VALIDATOR -from Accas import * -import opsPSEN - -class loi ( ASSD ) : pass -class variable ( ASSD ) : pass -class sd_charge ( ASSD ) : pass -class sd_generateur ( ASSD ) : pass -class sd_ligne ( ASSD ) : pass -class sd_transfo ( ASSD ) : pass -class sd_moteur (ASSD) : pass -#class sd_busbar ( sd_generateur,sd_charge ) : pass - -import types -class Tuple: - def __init__(self,ntuple): - self.ntuple=ntuple - - def __convert__(self,valeur): - if type(valeur) == types.StringType: - return None - if len(valeur) != self.ntuple: - return None - return valeur - - def info(self): - return "Tuple de %s elements" % self.ntuple - - __repr__=info - __str__=info - -class Matrice: - def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None): - self.nbLigs=nbLigs - self.nbCols=nbCols - self.methodeCalculTaille=methodeCalculTaille - self.formatSortie=formatSortie - self.valSup=valSup - self.valMin=valMin - self.structure=structure - - def __convert__(self,valeur): - # Attention ne verifie pas grand chose - if type(valeur) != types.ListType : - return None - return valeur - - def info(self): - return "Matrice %s x %s" % (self.nbLigs, self.nbCols) - - __repr__=info - __str__=info - - -#CONTEXT.debug = 1 -JdC = JDC_CATA ( code = 'PSEN', - execmodul = None, - regles = ( AU_MOINS_UN ( 'PSSE_PARAMETERS' ), - AU_MOINS_UN ( 'DIRECTORY' ), - AU_MOINS_UN ( 'DISTRIBUTION' ), - AU_MOINS_UN ( 'SIMULATION' ), - AU_PLUS_UN ( 'PSSE_PARAMETERS' ), - AU_PLUS_UN ( 'DIRECTORY' ), - AU_PLUS_UN ( 'SIMULATION' ), - AU_PLUS_UN ( 'CORRELATION' ), - AU_PLUS_UN ( 'N_1_GENERATORS' ), - AU_PLUS_UN ( 'N_1_LINES' ), - AU_PLUS_UN ( 'N_1_LOADS' ), - AU_PLUS_UN ( 'N_1_MOTORS' ), - AU_PLUS_UN ( 'N_1_TRANSFORMERS' ), - - ), - ) # Fin JDC_CATA - - -# -------------------------------------------------- -# fin entete -# -------------------------------------------------- - -MONGENER = OPER ( nom = "MONGENER", - sd_prod = sd_generateur, - UIinfo = {"groupes": ("CACHE")}, - op = None, - fr = "Generateur", - ang = "Generator", - - ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",), -) -MONMOTEUR = OPER ( nom = "MONMOTEUR", - sd_prod = sd_moteur, - UIinfo = {"groupes": ("CACHE")}, - op = None, - fr = "Moteur", - ang = "Motor", - - ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",), -) -MACHARGE = OPER ( nom = "MACHARGE", - sd_prod = sd_charge, - UIinfo = {"groupes": ("CACHE")}, - op = None, - fr = "Charge", - ang = "Load", - - ID = SIMP ( statut = 'o', typ = "TXM", fr = "nom charge", ang = "load name",), -) -MALIGNE = OPER ( nom = "MALIGNE", - sd_prod = sd_ligne, - UIinfo = {"groupes": ("CACHE")}, - op = None, - fr = "Ligne", - ang = "Line", - - ID = SIMP ( statut = 'o', typ = "TXM", fr = "nom ligne", ang = "line name",), -) -MONTRANSFO = OPER ( nom = "MONTRANSFO", - sd_prod = sd_transfo, - UIinfo = {"groupes": ("CACHE")}, - op = None, - fr = "Transformateur", - ang = "Transformer", - - ID = SIMP ( statut = 'o', typ = "TXM", fr = "nom transformateur", ang = "transformer name",), -) - - - -PSSE_PARAMETERS = PROC ( nom = "PSSE_PARAMETERS", - op=None, - docu = "", - ALGORITHM = SIMP ( statut = "o", - typ='TXM', - into=["Optimum Power Flow","Economic Dispatch and Power Flow"], - defaut="Optimum Power Flow", - ), - I_MAX = SIMP ( statut = "o", - typ='TXM', - into=['RateA','RateB','RateC'], - defaut='RateA', - ), - LOCK_TAPS = SIMP ( statut = "o", - typ=bool, - defaut=True, - ), - - b_OPF = BLOC (condition = "ALGORITHM == 'Optimum Power Flow'", - FUEL_COST = SIMP ( statut = "o", - typ=bool, - defaut=True, - ), - LOADSHEDDING_COST = SIMP ( statut = "o", - typ=bool, - defaut=False, - ), - MVAR_COST = SIMP ( statut = "o", - typ=bool, - defaut=False, - ), - ITERATION_LIMIT = SIMP ( statut = "o", - typ = "I", - val_min=1, - defaut=20, - ), - QGEN_CONTROL = SIMP ( statut = "o", - typ = bool, - defaut = True, - ), - b_QgenControl = BLOC (condition = "QGEN_CONTROL == True", - SAVE_CASE_BEFORE_QCONTROL = SIMP ( statut = "o", - typ = bool, - defaut = False, - fr = "Sauvegarder des fichiers de cas avant d'avoir deconnecte les groupes ne produisant pas de la puissance active", - ang = "Save network case files before having disconnected groups that dont generate active power.", - ), - ), - ), - - b_ECD = BLOC (condition = "ALGORITHM == 'Economic Dispatch and Power Flow'", - ecd_file=SIMP(statut="o", typ = ('Fichier', 'Economic Dispatch Files (*.ecd);;All Files (*)',),), - ), - -## P_MIN= SIMP ( statut = "o", -## typ=bool, -## defaut=True, -## ), -) - -SIMULATION = PROC ( nom = "SIMULATION", - op = None, - docu = "", - regles =(EXCLUS('NUMBER_PACKAGE','CONVERGENCE'), UN_PARMI('NUMBER_PACKAGE','CONVERGENCE'),), - - SIZE_PACKAGE = SIMP ( statut = "o", - typ = "I", - val_min=10, - defaut=100, - ), - NUMBER_PACKAGE = SIMP ( statut = "f", - typ = "I", - val_min=1, - ), - CONVERGENCE = SIMP ( statut = "f", - typ="I", - into=[1], - ), - -## STUDY = SIMP ( statut = "o", -## typ = "TXM", -## into = ( 'N-1', 'Load', 'Wind-1', 'Wind-2', 'PV' ), -## max=5, -## fr = "Affichage du niveau de wrapper de la bibliotheque Open TURNS", -## ang = "Open TURNS library debug level print", -## ), -) - - -#================================ -# Definition du modele physique -#================================ - - - -CORRELATION = PROC ( nom = 'CORRELATION', - op = None, - docu = "", - fr = "Correlation entre variables", - ang = "Variable correlation", - -#### Copula = SIMP ( statut = "o", -#### typ = 'TXM', -#### into = ( "Independent", "Normal" ), -#### defaut = "Independent", -#### fr = "Type de la copule", -#### ang = "Copula kind", -#### ), -## -## # Matrix = BLOC ( condition = "Copula in ( 'Normal', )", -## - CorrelationMatrix = SIMP ( statut = "o", - typ = Matrice(nbLigs=None, - nbCols=None, - methodeCalculTaille='NbDeDistributions', - structure="symetrique"), - fr = "Matrice de correlation entre les variables d'entree", - ang = "Correlation matrix for input variables", - #val_max=1.0, - #val_min=-1.0 - ), -## #), # Fin BLOC Matrix -## -## -) - -DIRECTORY = MACRO ( nom = 'DIRECTORY', - op=None, - fr = "Chargement des directoires et fichiers", - ang = "Load directories and files necessary to run PSEN", - sd_prod = opsPSEN.INCLUDE, - op_init = opsPSEN.INCLUDE_context, - #sd_prod=None, - fichier_ini = 1, - - PSSE_path=SIMP(statut="o",typ='Repertoire',defaut='C:\Program Files\PTI\PSSE33\PSSBIN'), - sav_file=SIMP(statut="o", typ = ('Fichier', 'Network Case Files (*.sav);;All Files (*)',),), - results_folder=SIMP(statut="o",typ='Repertoire'), - #lines_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),), - #groups_file=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),), - #generationsystem_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),), - -) - - - -#================================ -# Importation des fichiers csv N-1 -#================================ - -N_1_LINES = PROC( nom="N_1_LINES", - op = None, - docu = "", - fr = "N-1 lignes", - ang = "N-1 lines", - Activated = SIMP ( statut='o', typ=bool, defaut=True), -## FileName = SIMP ( statut = "o", -## typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), -## fr = "chemin du fichier csv des probabilites des defauts lignes", -## ang = "csv file path with probabilities of line outages", -## ), - Probability = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Probabilite d'indisponibilite de la ligne", - ang = "Probability that the line is not available", - validators=VerifTypeTuple((sd_ligne,'R')),), - ) - -N_1_TRANSFORMERS = PROC( nom="N_1_TRANSFORMERS", - op = None, - docu = "", - fr = "N-1 transformateurs", - ang = "N-1 transformers", - Activated = SIMP ( statut='o', typ=bool, defaut=True), -## FileName = SIMP ( statut = "o", -## typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), -## fr = "chemin du fichier csv des probabilites des defauts transformateur", -## ang = "csv file path with probabilities of transformer outages", -## ), - Probability = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Probabilite d'indisponibilite de la ligne", - ang = "Probability that the line is not available", - validators=VerifTypeTuple((sd_transfo,'R')),), - ) -N_1_GENERATORS = PROC( nom="N_1_GENERATORS", - op = None, - docu = "", - fr = "N-1 generateurs", - ang = "N-1 generators", - Activated = SIMP ( statut='o', typ=bool, defaut=True), -## FileName = SIMP ( statut = "o", -## typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), -## fr = "chemin du fichier csv des probabilites des defauts generateurs", -## ang = "csv file path with probabilities of generator outages", -## ), - Probability = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Probabilite d'indisponibilite du generateur", - ang = "Probability that the generator is not available", - validators=VerifTypeTuple((sd_generateur,'R')),), - ) -N_1_MOTORS = PROC( nom="N_1_MOTORS", - op = None, - docu = "", - fr = "N-1 moteurs", - ang = "N-1 motors", - Activated = SIMP ( statut='o', typ=bool, defaut=True), -## FileName = SIMP ( statut = "o", -## typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), -## fr = "chemin du fichier csv des probabilites des defauts generateurs", -## ang = "csv file path with probabilities of generator outages", -## ), - Probability = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Probabilite d'indisponibilite du moteur", - ang = "Probability that the motor is not available", - validators=VerifTypeTuple((sd_moteur,'R')),), - ) -N_1_LOADS = PROC( nom="N_1_LOADS", - op = None, - docu = "", - fr = "N-1 charges", - ang = "N-1 loads", - Activated = SIMP ( statut='o', typ=bool, defaut=True), -## FileName = SIMP ( statut = "o", -## typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), -## fr = "chemin du fichier csv des probabilites des defauts charges", -## ang = "csv file path with probabilities of load outages", -## ), - Probability = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Probabilite d'indisponibilite du generateur", - ang = "Probability that the generator is not available", - validators=VerifTypeTuple((sd_charge,'R')),), - ) - - - - -#================================ -# Definition des LOIS -#================================ - -# Nota : les variables de type OPER doivent etre en majuscules ! -# Nota : les variables de type OPER doivent etre de premier niveau (pas imbriquees dans un autre type) -DISTRIBUTION = OPER ( nom = "DISTRIBUTION", - sd_prod = loi, - op = 68, - fr = "Definitions des lois marginales utilisees par les variables d'entree", - -#==== -# Choisir generateur ou charge -#==== - -## TypeMachine = SIMP ( statut='o', typ='TXM', -## into = ('charge','vent1','vent2','pv','N-1',), -## ), - Activated = SIMP ( statut='o', typ=bool, defaut=True), - ComponentType = SIMP (statut='o', typ='TXM', - into = ('Generator','Load','Motor','Line','Transformer'),), - b_gener = BLOC (condition = "ComponentType == 'Generator'", - - Type = SIMP (statut= "o", typ = "TXM", - into = ("Generator Power Level", "Generator Availability"), - fr = "Choisir si c'est le niveau de puissance ou la disponibilit� du generateur qui sera tiree", - ang= "Choose whether the power level or the availability of the generator will be set by the law", - defaut = "Generator Power Level", - ), - - Sampling = SIMP (statut= "o", typ = "TXM", - into = ("Same sample for all generators", "One sample per generator"), - fr = "Choisir si une seule tirage sera fait pour tous les generateurs ou si des tirages differents seront faits pour chaque generateur", - ang= "Choose whether one drawing/sample will be performed for all of the generators or whether a different drawing/sample will be performed for each generator.", - defaut = "Same sample for all generators", - ), - - Generator = SIMP(statut='o',typ=sd_generateur,max="**", homo="SansOrdreNiDoublon",docu="sd_generateur"), - -#==== -# Type de distribution -#==== - - b_gener_level = BLOC (condition= "Type == 'Generator Power Level'", - - Law = SIMP ( statut = "o", typ = "TXM", - into = ( "Exponential", - "Histogram", - "Normal", - #"Rayleigh", - "PDF_from_file", - "TruncatedNormal", - "TimeSeries_from_file", - "Uniform", - "UserDefined", - "Weibull", - ), - fr = "Choix du type de la loi marginale", - ang = "1D marginal distribution", - ), - - -#==== -# Definition des parametres selon le type de la loi -#==== - - - EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ", - - Lambda = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Lambda | Lambda > 0", - ang = "Lambda parameter | Lambda > 0", - ), - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - - ), # Fin BLOC EXPONENTIAL - - - HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ", - - First = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du supoport de la loi", - ang = "Support lower bound", - ), - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Liste de couples : largeur de classe, hauteur de classe", - ang = "Class bandwidth, class height couple list", - validators=VerifTypeTuple(('R','R')), - ), - - ), # Fin BLOC HISTOGRAM - - - NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ", - - Mu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi", - ang = "Mean value", - ), - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart type de la loi", - ang = "Standard deviation", - ), - - ), # Fin BLOC NORMAL - - - RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ", - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Parametre Sigma de la loi | Sigma > 0", - ang = "Sigma parameter | Sigma > 0", - ), - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - ), # Fin BLOC RAYLEIGH - - PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), - fr = "Nom du fichier .csv", - ang = ".csv file name", - ), - ), - - - - TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ", - - MuN = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi Normale non tronqu�e", - ang = "Mean value of the associated non truncated normal distribution", - ), - - SigmaN = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart-type de la loi Normale non tronqu�e", - ang = "Standard deviation of the associated non truncated normal distribution", - ), - - A = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure de la loi | A < B", - ang = "Lower bound | A < B", - ), - - B = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne superieure de la loi | A < B", - ang = "Upper bound | A < B", - ), - - ), # Fin BLOC TRUNCATEDNORMAL - - - TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), - fr = "Fichier CSV d'une serie temporelle", - ang = "CSV file of a time series", - ), - ), - - - UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ", - - A = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi | A < B", - ang = "Support lower bound | A < B", - ), - - B = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne superieure du support de la loi | A < B", - ang = "Support upper bound | A < B", - ), - - ), # Fin BLOC UNIFORM - - - USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Liste de couples : (valeur, prob.)", - ang = "List of pairs : (value, prob.)", - validators=VerifTypeTuple(('R','R')), - ), - - ), # Fin BLOC USERDEFINED - - - WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ", - - Settings = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "AlphaBeta", "MuSigma" ), - defaut = "AlphaBeta", - fr = "Parametrage de la loi weibull", - ang = "Weibull distribution parameter set", - ), - - AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", - - Alpha = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Alpha de la loi | Alpha > 0", - ang = "Alpha parameter | Alpha > 0", - ), - - Beta = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Beta de la loi | Beta > 0", - ang = "Beta parameter | Beta > 0", - ), - - ), # Fin BLOC AlphaBeta_Parameters - - - MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", - - Mu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi", - ang = "Mean value", - ), - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart type de la loi", - ang = "Standard deviation", - ), - - ), # Fin BLOC MuSigma_Parameters - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - - ), # Fin BLOC WEIBULL - - - Transfer_Function = FACT(statut='f', - - TF_Input = SIMP ( statut='o', - typ = 'TXM', - fr = 'Entrer une fonction de transfert � partir d''un fichier .pow (vitesse de vent - puissance eolienne)\n \ - ou entrer une liste de tuples (valeur tiree - puissance normalisee)', - ang = 'Enter wind speed - turbine production transfer function as a .pow file, \n \ - or enter a generic list of (law output value, normalized power output) tuples', - into = ('.pow file', 'tuples list'), - ), - b_file = BLOC(condition = "TF_Input == '.pow file'", - File_Name = SIMP ( statut = "o", - typ = ('Fichier', 'Pow files (*.pow);;All Files (*)',), - fr = "Nom du fichier de transfer .pow", - ang = ".pow file name", - ), - Wind_Speed_Measurement_Height = SIMP ( statut = 'o', - typ = "R", - max = 1, - fr = 'Hauteur (en metres) a laquelle les mesures de vitesse du vent ont ete prises', - ang = 'Height of wind speed measurements (m)', - sug = 10, - val_min = 0, - ), - Hub_Height = SIMP (statut = 'o', - typ = "R", - fr = 'hauteur de moyeu de l''eolienne', - ang = 'wind turbine hub height', - sug = 80, - val_min = 0,), - AlphaWS = SIMP (statut = 'o', - typ = "R", - fr = 'l''alpha pour extrapoler les mesures de vitesse du vent a la hauteur du moyeu ', - ang = 'alpha used to extrapolate wind speed measurements to hub height', - defaut = 1./7, - val_min = 0, - val_max = 1, - ), - Percent_Losses = SIMP (statut = 'o', - typ = "R", - fr = 'pourcentage de pertes entre la sortie theorique d''une turbine et la sortie de la centrale', - ang = 'percent losses between theoretical power output of a single turbine and the output of the farm', - defaut = 5, - val_min = 0, - val_max = 100, - ), - ), #fin du bloc FileName - - b_tuples = BLOC(condition = "TF_Input == 'tuples list'", - - TF_Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - min = 2, - fr = "Liste de couples : valeur tiree, puissance normalisee sortie", - ang = "List of couples : value set by law, normalized power output", - validators=VerifTypeTuple(('R','R')), - ), - ), #fin du block Tuples List - - ), #fin du FACT Transfer Function - - ), #fin du bloc generator level - - - b_gener_avail = BLOC (condition= "Type == 'Generator Availability'", - - Law = SIMP ( statut = "o", typ = "TXM", - into = ( #"Exponential", - #"Histogram", - #"Normal", - #"Rayleigh", - #"PDF_from_file", - #"TruncatedNormal", - "TimeSeries_from_file", - #"Uniform", - "UserDefined", - #"Weibull", - ), - fr = "Choix du type de la loi marginale", - ang = "1D marginal distribution", - defaut="UserDefined", - ), - - -#==== -# Definition des parametres selon le type de la loi -#==== - - - TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), - fr = "Fichier CSV d'une serie temporelle", - ang = "CSV file of a time series", - ), - ), - - - USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Liste de couples : (valeur, prob.)", - ang = "List of pairs : (value, prob.)", - validators=VerifTypeTuple(('R','R')), - defaut=((0,0.0),(1,1.0)), - ), - - ), # Fin BLOC USERDEFINED - - - ), #fin du bloc generator avail - - - ), #fin du bloc generateur - -#Bloc Charge - b_charge = BLOC (condition = "ComponentType == 'Load'", - - -#==== -# Type de distribution -#==== - - Type = SIMP (statut= "o", typ = "TXM", - into = ("Load Level", "Load Availability"), - fr = "Choisir si c'est le niveau de charge ou la disponibilit� de la charge qui sera tiree", - ang= "Choose whether the power level or the availability of the load will be set by the law", - defaut = "Load Level", - ), - - Sampling = SIMP (statut= "o", typ = "TXM", - into = ("Same sample for all loads", "One sample per load"), - fr = "Choisir si une seule tirage sera fait pour tous les charges ou si des tirages differents seront faits pour chaque charge", - ang= "Choose whether one drawing/sample will be performed for all of the loads or whether a different drawing/sample will be performed for each load.", - defaut = "Same sample for all loads", - ), - - Load = SIMP(statut='o',typ=sd_charge,max="**", homo="SansOrdreNiDoublon",), - - - b_charge_level = BLOC (condition = "Type == 'Load Level'", - - Law = SIMP ( statut = "o", typ = "TXM", - into = ( "Exponential", - "Histogram", - "Normal", - #"Rayleigh", - "PDF_from_file", - "TruncatedNormal", - "TimeSeries_from_file", - "Uniform", - "UserDefined", - "Weibull", - ), - fr = "Choix du type de la loi marginale", - ang = "1D marginal distribution", - ), - - -#==== -# Definition des parametres selon le type de la loi -#==== - - - EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ", - - Lambda = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Lambda | Lambda > 0", - ang = "Lambda parameter | Lambda > 0", - ), - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - - ), # Fin BLOC EXPONENTIAL - - - HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ", - - First = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du supoport de la loi", - ang = "Support lower bound", - ), - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Liste de couples : largeur de classe, hauteur de classe", - ang = "Class bandwidth, class height couple list", - validators=VerifTypeTuple(('R','R')), - ), - - ), # Fin BLOC HISTOGRAM - - - NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ", - - Mu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi", - ang = "Mean value", - ), - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart type de la loi", - ang = "Standard deviation", - ), - - ), # Fin BLOC NORMAL - - - RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ", - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Parametre Sigma de la loi | Sigma > 0", - ang = "Sigma parameter | Sigma > 0", - ), - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - ), # Fin BLOC RAYLEIGH - - PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), - fr = "Nom du fichier .csv", - ang = ".csv file name", - ), - ), - - - - TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ", - - MuN = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi Normale non tronqu�e", - ang = "Mean value of the associated non truncated normal distribution", - ), - - SigmaN = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart-type de la loi Normale non tronqu�e", - ang = "Standard deviation of the associated non truncated normal distribution", - ), - - A = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure de la loi | A < B", - ang = "Lower bound | A < B", - ), - - B = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne superieure de la loi | A < B", - ang = "Upper bound | A < B", - ), - - ), # Fin BLOC TRUNCATEDNORMAL - - - TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), - fr = "Fichier CSV d'une serie temporelle", - ang = "CSV file of a time series", - ), - ), - - - UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ", - - A = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi | A < B", - ang = "Support lower bound | A < B", - ), - - B = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne superieure du support de la loi | A < B", - ang = "Support upper bound | A < B", - ), - - ), # Fin BLOC UNIFORM - - - USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Liste de couples : (valeur, probabilite)", - ang = "List of pairs : (value, probability)", - validators=VerifTypeTuple(('R','R')), - ), - - ), # Fin BLOC USERDEFINED - - - WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ", - - Settings = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "AlphaBeta", "MuSigma" ), - defaut = "AlphaBeta", - fr = "Parametrage de la loi weibull", - ang = "Weibull distribution parameter set", - ), - - AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", - - Alpha = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Alpha de la loi | Alpha > 0", - ang = "Alpha parameter | Alpha > 0", - ), - - Beta = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Beta de la loi | Beta > 0", - ang = "Beta parameter | Beta > 0", - ), - - ), # Fin BLOC AlphaBeta_Parameters - - - MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", - - Mu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi", - ang = "Mean value", - ), - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart type de la loi", - ang = "Standard deviation", - ), - - ), # Fin BLOC MuSigma_Parameters - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - - ), # Fin BLOC WEIBULL - - ), #fin du block Load Level - - - b_charge_avail = BLOC (condition = "Type == 'Load Availability'", - - Law = SIMP ( statut = "o", typ = "TXM", - into = ( #"Exponential", - #"Histogram", - #"Normal", - #"Rayleigh", - #"PDF_from_file", - #"TruncatedNormal", - "TimeSeries_from_file", - #"Uniform", - "UserDefined", - #"Weibull", - ), - fr = "Choix du type de la loi marginale", - ang = "1D marginal distribution", - defaut = "UserDefined", - ), - - -#==== -# Definition des parametres selon le type de la loi -#==== - - TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), - fr = "Fichier CSV d'une serie temporelle", - ang = "CSV file of a time series", - ), - ), - - - - USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Liste de couples : (valeur, probabilite)", - ang = "List of pairs : (value, probability)", - validators=VerifTypeTuple(('R','R')), - defaut=((0,0.0),(1,1.0)), - ), - - ), # Fin BLOC USERDEFINED - - - ), #fin du block Load Avail - - - ), #fin du bloc charge - - - -#Bloc Moteur - b_moteur = BLOC (condition = "ComponentType == 'Motor'", - - -#==== -# Type de distribution -#==== - - Type = SIMP (statut= "o", typ = "TXM", - into = ("Motor Level", "Motor Availability"), - fr = "Choisir si c'est le niveau de charge du moteur ou la disponibilit� du moteur qui sera tiree", - ang= "Choose whether the power level or the availability of the motor will be set by the law", - defaut = "Motor Level", - ), - - Sampling = SIMP (statut= "o", typ = "TXM", - into = ("Same sample for all motors", "One sample per motor"), - fr = "Choisir si une seule tirage sera fait pour tous les moteurs ou si des tirages differents seront faits pour chaque moteur", - ang= "Choose whether one drawing/sample will be performed for all of the motors or whether a different drawing/sample will be performed for each motor.", - defaut = "Same sample for all motors", - ), - - Motor = SIMP(statut='o',typ=sd_moteur,max="**", homo="SansOrdreNiDoublon",), - - - b_moteur_level = BLOC (condition = "Type == 'Motor Level'", - - Law = SIMP ( statut = "o", typ = "TXM", - into = ( "Exponential", - "Histogram", - "Normal", - #"Rayleigh", - "PDF_from_file", - "TruncatedNormal", - "TimeSeries_from_file", - "Uniform", - "UserDefined", - "Weibull", - ), - fr = "Choix du type de la loi marginale", - ang = "1D marginal distribution", - ), - - -#==== -# Definition des parametres selon le type de la loi -#==== - - - EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ", - - Lambda = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Lambda | Lambda > 0", - ang = "Lambda parameter | Lambda > 0", - ), - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - - ), # Fin BLOC EXPONENTIAL - - - HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ", - - First = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du supoport de la loi", - ang = "Support lower bound", - ), - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Liste de couples : largeur de classe, hauteur de classe", - ang = "Class bandwidth, class height couple list", - validators=VerifTypeTuple(('R','R')), - ), - - ), # Fin BLOC HISTOGRAM - - - NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ", - - Mu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi", - ang = "Mean value", - ), - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart type de la loi", - ang = "Standard deviation", - ), - - ), # Fin BLOC NORMAL - - - RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ", - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Parametre Sigma de la loi | Sigma > 0", - ang = "Sigma parameter | Sigma > 0", - ), - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - ), # Fin BLOC RAYLEIGH - - PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), - fr = "Nom du fichier .csv", - ang = ".csv file name", - ), - ), - - - - TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ", - - MuN = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi Normale non tronqu�e", - ang = "Mean value of the associated non truncated normal distribution", - ), - - SigmaN = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart-type de la loi Normale non tronqu�e", - ang = "Standard deviation of the associated non truncated normal distribution", - ), - - A = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure de la loi | A < B", - ang = "Lower bound | A < B", - ), - - B = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne superieure de la loi | A < B", - ang = "Upper bound | A < B", - ), - - ), # Fin BLOC TRUNCATEDNORMAL - - - TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), - fr = "Fichier CSV d'une serie temporelle", - ang = "CSV file of a time series", - ), - ), - - - UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ", - - A = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi | A < B", - ang = "Support lower bound | A < B", - ), - - B = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne superieure du support de la loi | A < B", - ang = "Support upper bound | A < B", - ), - - ), # Fin BLOC UNIFORM - - - USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Liste de couples : (valeur, probabilite)", - ang = "List of pairs : (value, probability)", - validators=VerifTypeTuple(('R','R')), - ), - - ), # Fin BLOC USERDEFINED - - - WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ", - - Settings = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "AlphaBeta", "MuSigma" ), - defaut = "AlphaBeta", - fr = "Parametrage de la loi weibull", - ang = "Weibull distribution parameter set", - ), - - AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", - - Alpha = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Alpha de la loi | Alpha > 0", - ang = "Alpha parameter | Alpha > 0", - ), - - Beta = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Beta de la loi | Beta > 0", - ang = "Beta parameter | Beta > 0", - ), - - ), # Fin BLOC AlphaBeta_Parameters - - - MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", - - Mu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi", - ang = "Mean value", - ), - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart type de la loi", - ang = "Standard deviation", - ), - - ), # Fin BLOC MuSigma_Parameters - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - - ), # Fin BLOC WEIBULL - - ), #fin du block Load Level - - - b_moteur_avail = BLOC (condition = "Type == 'Motor Availability'", - - Law = SIMP ( statut = "o", typ = "TXM", - into = ( #"Exponential", - #"Histogram", - #"Normal", - #"Rayleigh", - #"PDF_from_file", - #"TruncatedNormal", - "TimeSeries_from_file", - #"Uniform", - "UserDefined", - #"Weibull", - ), - fr = "Choix du type de la loi marginale", - ang = "1D marginal distribution", - defaut = "UserDefined", - ), - - -#==== -# Definition des parametres selon le type de la loi -#==== - - TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), - fr = "Fichier CSV d'une serie temporelle", - ang = "CSV file of a time series", - ), - ), - - - - USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Liste de couples : (valeur, probabilite)", - ang = "List of pairs : (value, probability)", - validators=VerifTypeTuple(('R','R')), - defaut=((0,0.0),(1,1.0)), - ), - - ), # Fin BLOC USERDEFINED - - - ), #fin du block Load Avail - - - ), #fin du bloc moteur - - - b_ligne = BLOC (condition = "ComponentType == 'Line'", - - -#==== -# Type de distribution -#==== - - Type = SIMP (statut= "o", typ = "TXM", - into = ("Line Availability",), - fr = "La disponibilite de la ligne sera tiree", - ang= "Line availability will be set by the law", - defaut = "Line Availability", - ), - - Sampling = SIMP (statut= "o", typ = "TXM", - into = ("Same sample for all lines", "One sample per line"), - fr = "Choisir si une seule tirage sera fait pour tous les lignes ou si des tirages differents seront faits pour chaque ligne", - ang= "Choose whether one drawing/sample will be performed for all of the lines or whether a different drawing/sample will be performed for each line.", - defaut = "Same sample for all lines", - ), - - Line = SIMP(statut='o',typ=sd_ligne,max="**", homo="SansOrdreNiDoublon"), - - Law = SIMP ( statut = "o", typ = "TXM", - into = ( #"Exponential", - #"Histogram", - #"Normal", - #"Rayleigh", - #"PDF_from_file", - #"TruncatedNormal", - "TimeSeries_from_file", - #"Uniform", - "UserDefined", - #"Weibull", - ), - defaut = "UserDefined", - fr = "Choix du type de la loi marginale", - ang = "1D marginal distribution", - ), - - -#==== -# Definition des parametres selon le type de la loi -#==== - - - EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ", - - Lambda = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Lambda | Lambda > 0", - ang = "Lambda parameter | Lambda > 0", - ), - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - - ), # Fin BLOC EXPONENTIAL - - - HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ", - - First = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du supoport de la loi", - ang = "Support lower bound", - ), - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Liste de couples : largeur de classe, hauteur de classe", - ang = "Class bandwidth, class height couple list", - validators=VerifTypeTuple(('R','R')), - ), - - ), # Fin BLOC HISTOGRAM - - - NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ", - - Mu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi", - ang = "Mean value", - ), - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart type de la loi", - ang = "Standard deviation", - ), - - ), # Fin BLOC NORMAL - - - RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ", - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Parametre Sigma de la loi | Sigma > 0", - ang = "Sigma parameter | Sigma > 0", - ), - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - ), # Fin BLOC RAYLEIGH - - PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), - fr = "Nom du fichier .csv", - ang = ".csv file name", - ), - ), - - - - TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ", - - MuN = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi Normale non tronqu�e", - ang = "Mean value of the associated non truncated normal distribution", - ), - - SigmaN = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart-type de la loi Normale non tronqu�e", - ang = "Standard deviation of the associated non truncated normal distribution", - ), - - A = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure de la loi | A < B", - ang = "Lower bound | A < B", - ), - - B = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne superieure de la loi | A < B", - ang = "Upper bound | A < B", - ), - - ), # Fin BLOC TRUNCATEDNORMAL - - - TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), - fr = "Fichier CSV d'une serie temporelle", - ang = "CSV file of a time series", - ), - ), - - - UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ", - - A = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi | A < B", - ang = "Support lower bound | A < B", - ), - - B = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne superieure du support de la loi | A < B", - ang = "Support upper bound | A < B", - ), - - ), # Fin BLOC UNIFORM - - - USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Liste de couples : (valeur, probabilite)", - ang = "List of pairs : (value, probability)", - validators=VerifTypeTuple(('R','R')), - defaut=((0,0.0),(1,1.0)), - ), - - ), # Fin BLOC USERDEFINED - - - WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ", - - Settings = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "AlphaBeta", "MuSigma" ), - defaut = "AlphaBeta", - fr = "Parametrage de la loi weibull", - ang = "Weibull distribution parameter set", - ), - - AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", - - Alpha = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Alpha de la loi | Alpha > 0", - ang = "Alpha parameter | Alpha > 0", - ), - - Beta = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Beta de la loi | Beta > 0", - ang = "Beta parameter | Beta > 0", - ), - - ), # Fin BLOC AlphaBeta_Parameters - - - MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", - - Mu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi", - ang = "Mean value", - ), - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart type de la loi", - ang = "Standard deviation", - ), - - ), # Fin BLOC MuSigma_Parameters - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - - ), # Fin BLOC WEIBULL - - ), #fin du bloc ligne - - b_transfo = BLOC (condition = "ComponentType == 'Transformer'", - - -#==== -# Type de distribution -#==== - - Type = SIMP (statut= "o", typ = "TXM", - into = ("Transformer Availability",), - fr = "La disponibilite du transformateur sera tiree", - ang= "Transformer availability will be set by the law", - defaut = "Transformer Availability" - ), - - Sampling = SIMP (statut= "o", typ = "TXM", - into = ("Same sample for all transformers", "One sample per transformer"), - fr = "Choisir si une seule tirage sera fait pour tous les transforamteurs ou si des tirages differents seront faits pour chaque transformateur", - ang= "Choose whether one drawing/sample will be performed for all of the tranformers or whether a different drawing/sample will be performed for each transformer.", - defaut = "Same sample for all transformers", - ), - - Transformer = SIMP(statut='o',typ=sd_transfo,max="**", homo="SansOrdreNiDoublon"), - - Law = SIMP ( statut = "o", typ = "TXM", - into = ( #"Beta", - #"Exponential", - #"Gamma", - #"Geometric", - #"Gumbel", - #"Histogram", - #"Laplace", - #"Logistic", - #"LogNormal", - #"MultiNomial", - #"NonCentralStudent", - #"Normal", - #"Poisson", - #"Rayleigh", - #"Student", - #"PDF_from_file", - #"Triangular", - #"TruncatedNormal", - "TimeSeries_from_file", - #"Uniform", - "UserDefined", - #"Weibull", - ), - defaut="UserDefined", - fr = "Choix du type de la loi marginale", - ang = "1D marginal distribution", - ), - - -#==== -# Definition des parametres selon le type de la loi -#==== - -## NONPARAM = BLOC ( condition = " Law in ( 'NonParametrique', ) ", -## -## FileName = SIMP ( statut = "o", -## typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), -## fr = "Nom du modele physique", -## ang = "Physical model identifier", -## ), -## ), - -# BETA = BLOC ( condition = " Law in ( 'Beta', ) ", -# -# Settings = SIMP ( statut = "o", -# typ = "TXM", -# max = 1, -# into = ( "RT", "MuSigma" ), -# defaut = "RT", -# fr = "Parametrage de la loi beta", -# ang = "Beta distribution parameter set", -# ), -# -# RT_Parameters = BLOC ( condition = " Settings in ( 'RT', ) ", -# -# R = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Parametre R de la loi | R > 0", -# ang = "R parameter | R > 0", -# ), -# -# # T > R -# T = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Parametre T de la loi | T > R", -# ang = "T parameter | T > R", -# ), -# -# ), # Fin BLOC RT_Parameters -# -# -# MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", -# -# Mu = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Moyenne de la loi", -# ang = "Mean value", -# ), -# -# Sigma = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Ecart type de la loi", -# ang = "Standard deviation", -# ), -# -# ), # Fin BLOC MuSigma_Parameters -# -# -# A = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Borne inferieure du support de la loi", -# ang = "Support lower bound", -# ), -# -# # B > A -# B = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Borne superieure du support de la loi", -# ang = "Support upper bound", -# ), -# -# ), # Fin BLOC BETA - - - - EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ", - - Lambda = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Lambda | Lambda > 0", - ang = "Lambda parameter | Lambda > 0", - ), - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - - ), # Fin BLOC EXPONENTIAL - - - -# GAMMA = BLOC ( condition = " Law in ( 'Gamma', ) ", -# -# Settings = SIMP ( statut = "o", -# typ = "TXM", -# max = 1, -# into = ( "KLambda", "MuSigma" ), -# defaut = "KLambda", -# fr = "Parametrage de la loi gamma", -# ang = "Gamma distribution parameter set", -# ), -# -# KLambda_Parameters = BLOC ( condition = " Settings in ( 'KLambda', ) ", -# -# K = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Parametre K de la loi | K > 0", -# ang = "K parameter | K > 0", -# ), -# -# Lambda = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Parametre Lambda de la loi | Lambda > 0", -# ang = "Lambda parameter | Lambda > 0", -# ), -# -# ), # Fin BLOC KLambda_Parameters -# -# -# MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", -# -# Mu = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Moyenne de la loi", -# ang = "Mean value", -# ), -# -# Sigma = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Ecart type de la loi", -# ang = "Standard deviation", -# ), -# -# ), # Fin BLOC MuSigma_Parameters -# -# Gamma = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Borne inferieure du supoport de la loi", -# ang = "Support lower bound", -# ), -# -# -# ), # Fin BLOC GAMMA - - -# -# GEOMETRIC = BLOC ( condition = " Law in ( 'Geometric', ) ", -# -# P = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# val_max = 1., -# fr = "Parametre P | 0 < P < 1", -# ang = "P parameter | 0 < P < 1", -# ), -# -# ), # Fin BLOC GEOMETRIC -# -# -# -# GUMBEL = BLOC ( condition = " Law in ( 'Gumbel', ) ", -# -# Settings = SIMP ( statut = "o", -# typ = "TXM", -# max = 1, -# into = ( "AlphaBeta", "MuSigma" ), -# defaut = "AlphaBeta", -# fr = "Parametrage de la loi gumbel", -# ang = "Gumbel distribution parameter set", -# ), -# -# AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", -# -# Alpha = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Parametre Alpha de la loi | Alpha > 0", -# ang = "Alpha parameter | Alpha > 0", -# ), -# -# Beta = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Parametre Beta de la loi", -# ang = "Beta parameter", -# ), -# -# ), # Fin BLOC AlphaBeta_Parameters -# -# -# MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", -# -# Mu = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Moyenne de la loi", -# ang = "Mean value", -# ), -# -# Sigma = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Ecart type de la loi", -# ang = "Standard deviation", -# ), -# -# ), # Fin BLOC MuSigma_Parameters -# -# ), # Fin BLOC GUMBEL - - - - HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ", - - First = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du supoport de la loi", - ang = "Support lower bound", - ), - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Liste de couples : largeur de classe, hauteur de classe", - ang = "Class bandwidth, class height couple list", - validators=VerifTypeTuple(('R','R')), - ), - - ), # Fin BLOC HISTOGRAM - - - -# LAPLACE = BLOC ( condition = " Law in ( 'Laplace', ) ", -# -# Lambda = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Parametre Lambda | Lambda > 0", -# ang = "Lambda parameter | Lambda > 0", -# ), -# -# Mu = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Moyenne de la loi", -# ang = "Mean value", -# ), -# -# ), # Fin BLOC LAPLACE -# -# LOGNORMAL = BLOC ( condition = " Law in ( 'LogNormal', ) ", -# -# Settings = SIMP ( statut = "o", -# typ = "TXM", -# max = 1, -# into = ( "MuSigmaLog", "MuSigma", "MuSigmaOverMu" ), -# defaut = "MuSigmaLog", -# fr = "Parametrage de la loi lognormale", -# ang = "Lognormal distribution parameter set", -# ), -# -# MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", -# -# Mu = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Moyenne de la loi", -# ang = "Mean value", -# ), -# -# Sigma = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Ecart type de la loi", -# ang = "Standard deviation", -# ), -# -# ), # Fin BLOC MuSigma_Parameters -# -# MuSigmaOverMu_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaOverMu', ) ", -# -# Mu = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Moyenne de la loi", -# ang = "Mean value", -# ), -# -# SigmaOverMu = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Rapport ecart type / moyenne de la loi", -# ang = "Standard deviation / mean value ratio", -# ), -# -# ), # Fin BLOC MuSigmaOverMu_Parameters -# -# MuSigmaLog_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaLog', ) ", -# -# MuLog = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Moyenne du log", -# ang = "Log mean value", -# ), -# -# SigmaLog = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Ecart type du log", -# ang = "Log standard deviation", -# ), -# -# ), # Fin BLOC MuSigmaLog_Parameters -# -# Gamma = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Borne inferieure du support de la loi", -# ang = "Support lower bound", -# ), -# -# ), # Fin BLOC LOGNORMAL -# -# -# -# LOGISTIC = BLOC ( condition = " Law in ( 'Logistic', ) ", -# -# Alpha = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Borne inferieure du supoport de la loi", -# ang = "Support lower bound", -# ), -# -# Beta = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Parametre Beta de la loi | Beta > 0", -# ang = "Beta parameter | Beta > 0", -# ), -# -# ), # Fin BLOC LOGISTIC -# -# -# -# MULTINOMIAL = BLOC ( condition = " Law in ( 'MultiNomial', ) ", -# -# N = SIMP ( statut = "o", -# typ = "I", -# max = 1, -# fr = "Parametre N de la loi | N > 0", -# ang = "N parameter | N > 0", -# ), -# -# # Il faut definir une collection de couples ( x,p ) -# Values = SIMP ( statut = 'o', -# typ = "R", -# max = '**', -# fr = "Liste de probabilit�s", -# ang = "Probability list", -# validators=VerifTypeTuple(('R','R')), -# ), -# -# ), # Fin BLOC MULTINOMIAL -# -# -# NONCENTRALSTUDENT = BLOC ( condition = " Law in ( 'NonCentralStudent', ) ", -# -# Nu = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Parametre Nu de la loi | Nu > 0", -# ang = "Nu parameter | Nu > 0", -# ), -# -# Delta = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Parametre Delta de la loi | Delta > 0", -# ang = "Delta parameter | Delta > 0", -# ), -# -# Gamma = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Parametre Gamma de centrage de la loi", -# ang = "Gamma parameter", -# ), -# -# ), # Fin BLOC NONCENTRALSTUDENT - - - NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ", - - Mu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi", - ang = "Mean value", - ), - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart type de la loi", - ang = "Standard deviation", - ), - - ), # Fin BLOC NORMAL - - -# -# POISSON = BLOC ( condition = " Law in ( 'Poisson', ) ", -# -# Lambda = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 0., -# fr = "Parametre Lambda de la loi | Lambda > 0", -# ang = "Lambda parameter | Lambda > 0", -# ), -# -# ), # Fin BLOC POISSON -# -# -# -# RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ", -# -# Sigma = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Parametre Sigma de la loi | Sigma > 0", -# ang = "Sigma parameter | Sigma > 0", -# ), -# -# Gamma = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Borne inferieure du support de la loi", -# ang = "Support lower bound", -# ), -# ), # Fin BLOC RAYLEIGH - - PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), - fr = "Nom du fichier .csv", - ang = ".csv file name", - ), - ), - -# STUDENT = BLOC ( condition = " Law in ( 'Student', ) ", -# -# Mu = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Parametre Mu de la loi", -# ang = "Mu parameter", -# ), -# -# Nu = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# val_min = 2., -# fr = "Parametre Nu de la loi | Nu > 2", -# ang = "Nu parameter | Nu > 2", -# ), -# -# Sigma = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Parametre Sigma de la loi", -# ang = "Sigma parameter", -# ), -# -# ), # Fin BLOC STUDENT -# -# -# -# TRIANGULAR = BLOC ( condition = " Law in ( 'Triangular', ) ", -# -# A = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Borne inferieure du support de la loi | A < M < B", -# ang = "Support lower bound | A < M < B", -# ), -# -# M = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Mode de la loi | A < M < B", -# ang = "Mode | A < M < B", -# ), -# -# B = SIMP ( statut = "o", -# typ = "R", -# max = 1, -# fr = "Borne superieure du support de la loi | A < M < B", -# ang = "Support upper bound | A < M < B", -# ), -# -# ), # Fin BLOC TRIANGULAR -# -# - - TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ", - - MuN = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi Normale non tronqu�e", - ang = "Mean value of the associated non truncated normal distribution", - ), - - SigmaN = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart-type de la loi Normale non tronqu�e", - ang = "Standard deviation of the associated non truncated normal distribution", - ), - - A = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure de la loi | A < B", - ang = "Lower bound | A < B", - ), - - B = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne superieure de la loi | A < B", - ang = "Upper bound | A < B", - ), - - ), # Fin BLOC TRUNCATEDNORMAL - - - TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ", - - FileName = SIMP ( statut = "o", - typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), - fr = "Fichier CSV d'une serie temporelle", - ang = "CSV file of a time series", - ), - ), - - - UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ", - - A = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi | A < B", - ang = "Support lower bound | A < B", - ), - - B = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne superieure du support de la loi | A < B", - ang = "Support upper bound | A < B", - ), - - ), # Fin BLOC UNIFORM - - - USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ", - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = Tuple(2), - max = '**', - fr = "Liste de couples : (valeur, probabilite)", - ang = "List of pairs : (value, probability)", - validators=VerifTypeTuple(('R','R')), - defaut=((0,0.0),(1,1.0)), - ), - - ), # Fin BLOC USERDEFINED - - - WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ", - - Settings = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "AlphaBeta", "MuSigma" ), - defaut = "AlphaBeta", - fr = "Parametrage de la loi weibull", - ang = "Weibull distribution parameter set", - ), - - AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", - - Alpha = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Alpha de la loi | Alpha > 0", - ang = "Alpha parameter | Alpha > 0", - ), - - Beta = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Beta de la loi | Beta > 0", - ang = "Beta parameter | Beta > 0", - ), - - ), # Fin BLOC AlphaBeta_Parameters - - - MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", - - Mu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi", - ang = "Mean value", - ), - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart type de la loi", - ang = "Standard deviation", - ), - - ), # Fin BLOC MuSigma_Parameters - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - - ), # Fin BLOC WEIBULL - - - - ), #fin du bloc transformer - - -) - -Classement_Commandes_Ds_Arbre=('DIRECTORY', 'DISTRIBUTION', 'CORRELATION',) - -Ordre_Des_Commandes = ( 'DIRECTORY', 'PSSE_PARAMETERS', 'SIMULATION', 'DISTRIBUTION', 'CORRELATION', - 'N_1_GENERATORS', 'N_1_LINES', 'N_1_TRANSFORMERS', 'N_1_LOADS',) diff --git a/PSEN_Eficas/configuration_PSEN.py b/PSEN_Eficas/configuration_PSEN.py deleted file mode 100755 index 4ab64b85..00000000 --- a/PSEN_Eficas/configuration_PSEN.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -# CONFIGURATION MANAGEMENT OF EDF VERSION -# ====================================================================== -# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# -# -# ====================================================================== -""" - Ce module sert pour charger les paramètres de configuration d'EFICAS -""" -# Modules Python -from InterfaceQT4 import configuration -import os - - -class CONFIG(configuration.CONFIG_BASE): - - #----------------------------------- - def __init__(self,appli,repIni): - #----------------------------------- - - self.labels_user=['catalogues','lang'] - self.labels_eficas=['lang','rep_cata','catalogues'] - - configuration.CONFIG_BASE.__init__(self,appli,'.Eficas_monCode') - - -def make_config(appli,rep): - return CONFIG(appli,rep) - diff --git a/PSEN_Eficas/mesScripts.py b/PSEN_Eficas/mesScripts.py deleted file mode 100755 index 15f80ed6..00000000 --- a/PSEN_Eficas/mesScripts.py +++ /dev/null @@ -1,35 +0,0 @@ -def view_zone(listeparam) : - item=listeparam[0] - import visu_geom - visu_zone = visu_geom.VisuGeom(from_eficas=True, - eficas_item=item, - ligne_arbre=False) - visu_zone.visualize() - -def view_ligne_arbre(listeparam) : - item=listeparam[0] - import visu_geom - visu_arbre = visu_geom.VisuGeom(from_eficas=True, - eficas_item=item, - ligne_arbre=True) - visu_arbre.visualize() - -def import_zone(listeparam,appli) : - item=listeparam[0] - # simulation de la recuperation zone - #import eficasSalome - #eficasSalome.runEficas(code='MT',fichier='/home/I29518/test_zone.comm') - appli.viewmanager.handleOpen(fichier='/home/A96028/Install_EficasV1/EficasV1/MT/MT_include.comm') - -def import_zone2(listeparam,appli) : - editor=listeparam[0] - itemWidget=listeparam[1] - texte="sansnom=ZONE(NOEUDS=(_F(NOM='N1', X=0.0,), _F(NOM='N2', X=0.19,),), ELEMENTS=(_F(NOM='E1', DEBUT='N1', FIN='N2', RAFFINAGE='NON', MATERIAU=MAT_R01, SECTION_MASSE=_F(TYPE_SECTION='CONSTANTE', DIAM_EXTERN_DEBUT=0.1, DIAM_INTERN_DEBUT=0,), SECTION_RIGIDITE=_F(TYPE_SECTION='CONSTANTE', DIAM_EXTERN_DEBUT=0.1, DIAM_INTERN_DEBUT=0.0,),), _F(NOM='E2', DEBUT='N2', FIN='N3', RAFFINAGE='NON', MATERIAU=MAT_R01, SECTION_MASSE=_F(TYPE_SECTION='VARIABLE', DIAM_EXTERN_DEBUT=0.1, DIAM_INTERN_DEBUT=0, DIAM_EXTERN_SORTIE=0.2, DIAM_INTERN_SORTIE=0.0,), SECTION_RIGIDITE=_F(TYPE_SECTION='VARIABLE', DIAM_EXTERN_DEBUT=0.1, DIAM_INTERN_DEBUT=0.0, DIAM_EXTERN_SORTIE=0.2, DIAM_INTERN_SORTIE=0.0,),),),);" - editor.updateJdc(itemWidget,texte) - -def Source(): - print "jjjjjjjjjjjjjjjjjjj" - -dict_commandes={ - 'GENDOF':(Source,"Source",(),False,True,"affiche un message"), - } diff --git a/PSEN_Eficas/mesScripts_PSEN.py b/PSEN_Eficas/mesScripts_PSEN.py deleted file mode 100644 index 3e795416..00000000 --- a/PSEN_Eficas/mesScripts_PSEN.py +++ /dev/null @@ -1,113 +0,0 @@ -def exportToCsv(listeparam) : - texte="" - editor= listeparam[0] - item = listeparam[1] - fn=None - try : - from PyQt4.QtGui import QFileDialog, QMessageBox - fichier = QFileDialog.getOpenFileName() - if fichier == None : return - except : - try : - from PyQt5.QtWidgets import QFileDialog, QMessageBox - fichier = QFileDialog.getOpenFileName() - if fichier[0] == None : return - fichier=fichier[0] - except: - pass - - nouvelleVal=[] - prob=item.object.get_child('Probability') - valeur=prob.get_valeur() - texte="" - for v in valeur : - texte+=v[0].nom+";"+str(v[1]).replace('.',',')+"\n" - - try : - fn=open(fichier,'wb') - fn.write(texte) - fn.close() - except Exception, why: - QMessageBox.critical(editor, ("Save file failed"), - ('unable to save ')+str(fn) + str(why)) - - -def importFromCsv(listeparam) : - texte="" - editor= listeparam[0] - item = listeparam[1] - node = listeparam[2] - fn=None - try : - from PyQt4.QtGui import QFileDialog - fichier = QFileDialog.getOpenFileName() - if fichier == None : return - fn=open(fichier) - except : - try : - from PyQt5.QtWidgets import QFileDialog - fichier = QFileDialog.getOpenFileName() - if fichier[0] == None : return - fn=open(fichier[0]) - except: - pass - #fn=open('Classeur1.csv') - if not fn : return - nouvelleVal=[] - prob=item.object.get_child('Probability') - monType=prob.definition.validators.typeDesTuples[0] - listeObjet=item.object.etape.parent.get_sd_avant_du_bon_type(item.object.etape,(monType,)) - for ligne in fn.readlines(): - try : - nom,valeur = ligne.split(';') - except : - texte += "not able to process: "+ ligne - continue - if nom not in listeObjet : - texte += nom + " : ignored (not known in Eficas) \n " - continue - try : - concept=item.jdc.get_concept(nom) - except : - texte += nom + ": ignored (not known in Eficas) \n " - continue - try : - valNum=valeur.replace (',','.') - valeur=eval (valNum, {}) - except : - texte += valeur + " : unable to eval \n " - continue - nouvelleVal.append((concept,valeur)) - # exec nom in self.jdc - - if nouvelleVal != [] : prob.set_valeur(nouvelleVal) - if texte != "" : - try : - from PyQt5.QtWidgets import QMessageBox - except : - from PyQt4.QtGui import QMessageBox - QMessageBox.information( None,'unable to append values',texte,) - - node.affichePanneau() - - print "et ici" - -# le dictionnaire des commandes a la structure suivante : -# la clef est la commande qui va proposer l action -# puis un tuple qui contient -# - la fonction a appeler -# - le label dans le menu du clic droit -# - un tuple contenant les parametres attendus par la fonction -# - appelable depuis Salome uniquement -) -# - appelable depuis un item valide uniquement -# - toolTip -dict_commandes={ - 'N_1_GENERATORS':( - (exportToCsv,"exportToCsv",('editor','item'),False,False,"export values to cvs File"), - (importFromCsv,"importFromCsv",('editor','item','self'),False,False,"import values from cvs File"), - ), - 'N_1_LINES':( - (exportToCsv,"exportToCsv",('editor','item'),False,False,"export values to cvs File"), - (importFromCsv,"importFromCsv",('editor','item','self'),False,False,"import values from cvs File"), - ) - } diff --git a/PSEN_Eficas/opsPSEN.py b/PSEN_Eficas/opsPSEN.py deleted file mode 100755 index 09c331f4..00000000 --- a/PSEN_Eficas/opsPSEN.py +++ /dev/null @@ -1,113 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -#from ExtractGeneratorLoadLineandTransfoDico import ExtractGeneratorLoadLineandTransfoDico -from ExtractGeneratorLoadLineandTransfoDico import ExtractGeneratorLoadLineandTransfoDico2 - -def INCLUDE(self,PSSE_path,sav_file,**args): - """ - Fonction sd_prod pour la macro INCLUDE - """ - - if sav_file==None: return - reevalue=0 - listeADeTruire=[] - listeNouveau=[] - toClean=False - if hasattr(self,'fichier_ini'): - reevalue=1 - if self.fichier_ini == sav_file : return - self.fichier_ini=sav_file - if hasattr(self,'old_context_fichier_init' ): - toClean=True - for concept in self.old_context_fichier_init.values(): - #self.jdc.delete_concept(concept) - listeADeTruire.append(concept) - self.jdc_aux=None - self.contexte_fichier_init={} - #self.reevalue_sd_jdc() - self.jdc.reset_context() - - self.fichier_ini=sav_file - self.contexte_fichier_init = {} - self.fichier_unite = 999 - self.fichier_err = None - self.fichier_text="" - - unite = 999 - - #try : - if 1: - MachineDico,LoadDico,LineDico,TransfoDico, MotorDico = ExtractGeneratorLoadLineandTransfoDico2(sav_file,PSSE_path) - else : - #except : - if self.jdc.appli is not None: - self.jdc.appli.affiche_alerte("Error", 'An error happened in ExtractGeneratorandLoadList execution ') - self.g_context = {} - self.etapes = [] - self.jdc_aux = None - self.fichier_err = str(exc) - self.contexte_fichier_init = {} - - - for nom in MachineDico.keys(): - self.fichier_text += "%s=MONGENER(ID='%s',);\n" % (nom, 'a') - listeNouveau.append(nom) - - for nom in LoadDico.keys(): - self.fichier_text += "%s=MACHARGE(ID='%s',);\n" % (nom, 'a') - listeNouveau.append(nom) - - for nom in LineDico.keys(): - self.fichier_text += "%s=MALIGNE(ID='%s',);\n" % (nom,'a') - listeNouveau.append(nom) - - for nom in TransfoDico.keys(): - self.fichier_text += "%s=MONTRANSFO(ID='%s',);\n" % (nom,'a') - listeNouveau.append(nom) - - for nom in MotorDico.keys(): - self.fichier_text += "%s=MONMOTEUR(ID='%s',);\n" % (nom,'a') - listeNouveau.append(nom) - - import Extensions.jdc_include - self.JdC_aux = Extensions.jdc_include.JDC_CATA_INCLUDE(code='PSEN', execmodul=None) - self.make_contexte_include(None, self.fichier_text) - self.old_context_fichier_init = self.contexte_fichier_init - self.parent.record_unit(unite, self) - - self.jdc.MachineDico=MachineDico - self.jdc.LoadDico=LoadDico - self.jdc.LineDico=LineDico - self.jdc.TransfoDico=TransfoDico - self.jdc.MotorDico = MotorDico - - if toClean: - for concept in listeADeTruire : - if concept.nom not in listeNouveau: self.jdc.delete_concept(concept) - self.reevalue_sd_jdc() - -def INCLUDE_context(self,d): - """ - Fonction op_init pour macro INCLUDE - """ - for k,v in self.g_context.items(): - d[k]=v - diff --git a/PSEN_Eficas/prefs.py b/PSEN_Eficas/prefs.py deleted file mode 100755 index c19b171d..00000000 --- a/PSEN_Eficas/prefs.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2007-2012 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -code="PSEN" -import sys, os -if os.path.dirname(os.path.abspath(__file__)) not in sys.path : - sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/PSEN_Eficas/prefs_PSEN.py b/PSEN_Eficas/prefs_PSEN.py deleted file mode 100755 index 4d2dcc26..00000000 --- a/PSEN_Eficas/prefs_PSEN.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- -# CONFIGURATION MANAGEMENT OF EDF VERSION -# ====================================================================== -# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# -# -# ====================================================================== - -import os,sys -# repIni sert a localiser le fichier editeur.ini -# Obligatoire -repIni=os.path.dirname(os.path.abspath(__file__)) -INSTALLDIR=os.path.join(repIni,'..') -sys.path[:0]=[INSTALLDIR] - - -# lang indique la langue utilisee pour les chaines d'aide : fr ou ang -lang='ang' #'fr' - -# Codage des strings qui accepte les accents (en remplacement de 'ascii') -encoding='iso-8859-1' -docPath=repIni - - -# -catalogues=( - ('PSEN','default',os.path.join(repIni,'PSEN_Cata.py'),'PSEN','python'), -) diff --git a/PSEN_Eficas/properties.py b/PSEN_Eficas/properties.py deleted file mode 100755 index 1d328a46..00000000 --- a/PSEN_Eficas/properties.py +++ /dev/null @@ -1,24 +0,0 @@ -#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR -# RESPONSABLE D6BHHHH J-P.LEFEBVRE -# ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# ====================================================================== -# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR -# DE LA VERSION DU CODE_ASTER ASSOCIE -#---------------------------------------------------------------------- -version = "1.2" -date = "25/05/2010" -exploit = False diff --git a/PSEN_Eficas/qtEficas_PSEN.py b/PSEN_Eficas/qtEficas_PSEN.py deleted file mode 100755 index 94598c5f..00000000 --- a/PSEN_Eficas/qtEficas_PSEN.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -""" - Ce module sert a lancer EFICAS configure pour Code_Aster -""" -# Modules Python -# Modules Eficas - -import sys,os -#sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) -import prefs -name='prefs_'+prefs.code -__import__(name) - - -from InterfaceQT4 import eficas_go -eficas_go.lance_eficas(code=prefs.code) diff --git a/ProcessOutputs_Eficas/EssaiMulti.py b/ProcessOutputs_Eficas/EssaiMulti.py deleted file mode 100755 index 87f9905b..00000000 --- a/ProcessOutputs_Eficas/EssaiMulti.py +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -import os -import sys -from multiprocessing import Process -from multiprocessing import Lock -from multiprocessing import Pool - -def worker(num): - """thread worker function""" - print 'Worker:', num - return - -def test1(): - for i in range(5): - p = Process(target=worker, args=(i,)) - p.start() - p.join() - -def info(title): - print(title) - print('parent process:', os.getppid()) - print('process id:', os.getpid()) - -def f(name): - info('function f') - print('hello', name) - -def test2(): - info('test2') - p = Process(target=f, args=('pascale',)) - p.start() - p.join() - -def f(l, i): - l.acquire() - try: - print('hello world', i) - finally: - l.release() - - -def test3(lock): - for num in range(10): - Process(target=f, args=(lock, num)).start() - - # sorties evt desordonnees - for i in range(50): - p = Process(target=worker, args=(i,)).start() - -def g(x): - return x*x - - -def test4(): - import traceback - traceback.print_stack() - num_cores = 4 - FolderPath='tmp' - - monPool=Pool(maxtasksperchild=1) #create a multiprocessing.Pool object - for l in range(num_cores): - print(" lct on core "+str(l) ) - p= monPool.apply_async(g,(l,)) - - res = monPool.apply_async(g, (20,)) # runs in *only* one process - print res.get(timeout=1) # prints "400" - - # evaluate "os.getpid()" asynchronously - res = monPool.apply_async(os.getpid, ()) # runs in *only* one process - print res.get(timeout=1) # prints the PID of that process - - # launching multiple evaluations asynchronously *may* use more processes - multiple_results = [monPool.apply_async(os.getpid, ()) for i in range(4)] - print [res.get(timeout=1) for res in multiple_results] - - - -if __name__ == '__main__': - #test1() - - #test2() - - #lock = Lock() - #test3(lock) - print ('je suis dans main du run') - test4() - diff --git a/ProcessOutputs_Eficas/ExtractGeneratorLoadLineandTransfoDico.py b/ProcessOutputs_Eficas/ExtractGeneratorLoadLineandTransfoDico.py deleted file mode 100644 index d9188102..00000000 --- a/ProcessOutputs_Eficas/ExtractGeneratorLoadLineandTransfoDico.py +++ /dev/null @@ -1,620 +0,0 @@ -import os -import sys -import numpy as np -import copy - -#import Storage - - -def getNominalkV(NetworkFile): - print "begin getNominalkV for ", NetworkFile - - print "version en dur" - BusList=(1,2,3,4,6) - LinesList=(7,8,9,10) - TransfosList=('Transfos_A', 'Transfos_B', 'Transfos_C', 'Transfos_D') - return BusList, LinesList, TransfosList - - import psspy - import redirect - - psspy.psseinit(80000) - redirect.psse2py() - psspy.progress_output(6) - - psspy.case(NetworkFile) - print "before buses" - # Buses - - sid = -1 - flag = 2 - ierr, ret = psspy.abusreal(sid, flag, ['BASE']) - Storage.BusBase = ret[0] - - ierr, carray = psspy.abuschar(sid, flag, ['NAME']) - Storage.BusBaseList = {} - for i in range(len(carray[0])): - Storage.BusBaseList[carray[0][i]] = ret[0][i] - - BusList = [] - for item in Storage.BusBase: - if item not in BusList: - BusList.append(item) - BusList = sorted(BusList) - - print "after buses" - - # Lines - - owner = 1 - ties = 1 - flag = 2 - entry = 1 - string = ['FROMNAME', 'TONAME'] - ierr, carray = psspy.abrnchar(sid, owner, ties, flag, entry, string) - - for i in range(len(carray[0])): - nom = Storage.BusBaseList[carray[0][i]] - name = carray[0][i] + '-' + carray[1][i] - Storage.LinesBaseList[name] = nom - Storage.LinesBase.append(nom) - - LinesList = [] - for item in Storage.LinesBase: - if item not in LinesList: - LinesList.append(item) - LinesList = sorted(LinesList) - - print "after lines" - - # Transfos - - owner = 1 - ties = 1 - flag = 6 - entry = 1 - string = ['FROMNAME', 'TONAME'] - ierr, carray = psspy.abrnchar(sid, owner, ties, flag, entry, string) - - for i in range(len(carray[0])): - nom1 = Storage.BusBaseList[carray[0][i]] - nom2 = Storage.BusBaseList[carray[1][i]] - name = carray[0][i] + '-' + carray[1][i] - Storage.TransfoBaseList[name] = [nom1, nom2] - Storage.TransfoBase.append([nom1, nom2]) - - TransfosList = [] - for item in Storage.TransfoBase: - string = str(item[0]) + ' - ' + str(item[1]) - if string not in TransfosList: - TransfosList.append(string) - TransfosList = sorted(TransfosList) - - print "after transfos" - - # Generators - - sid = -1 #all buses - flag = 1 #all in service loads/generators (4 all loads/generators) - - string = ['NUMBER'] - ierr,iarray = psspy.amachint(sid,flag,string) - - string = ['NAME','ID'] - ierr,carray = psspy.amachchar(sid,flag,string) - - for i in range(len(iarray[0])): - idname = "GR" + carray[1][i] - machinename = carray[0][i].strip()+ "__" + idname - machinename = machinename.replace(" ","_") - machinename = machinename.replace("-","_") - machinename = machinename.replace(".","_") - machinename = machinename.replace("&","and") - try: - int(machinename[0]) - machinename = "_" + machinename - except: - pass - Storage.GenBaseList[machinename] = iarray[0][i] - - return BusList, LinesList, TransfosList - -#PN --> inutiles -#def getBusNominalkV(NetworkFile): -# import psspy -# import redirect -# -# psspy.psseinit(80000) -# redirect.psse2py() -# psspy.progress_output(6) -# -# psspy.case(NetworkFile) -# -# sid = -1 -# flag = 2 -# ierr, ret = psspy.abusreal(sid, flag, ['BASE']) -# Storage.BusBase = ret[0] -# -# ierr, carray = psspy.abuschar(sid, flag, ['NAME']) -# buses = {} -# for i in range(len(carray[0])): -# buses[carray[0][i]] = ret[0][i] -# Storage.BusNames = buses -# ret = [] -# for item in Storage.BusBase: -# if item not in ret: -# ret.append(item) -# return sorted(ret) - -#def updateConts(): -# Storage.ContFullList = [] -# tmp = Storage.BusBaseList.keys() -# tmp.sort() -# for key in tmp: -# Storage.ContFullList.append(key) -# tmp = Storage.GenBaseList.keys() -# tmp.sort() -# for key in tmp: -# Storage.ContFullList.append(key) -# tmp = Storage.LinesBaseList.keys() -# tmp.sort() -# for key in tmp: -# Storage.ContFullList.append(key) -# tmp = Storage.TransfoBaseList.keys() -# tmp.sort() -# for key in tmp: -# Storage.ContFullList.append(key) -# print Storage.ContFullList -# return Storage.ContFullList -# -#def newContingency(MatList): -# Storage.CustomContingencies.append(MatList) -# -#def checkIfBorder(graph, key, depth, tmplist): -# if key in tmplist: -# return True -# if depth == 0: -# return False -# NonBorders = 0 -# for item in graph[key]: -# if not checkIfBorder(graph, item, depth - 1, tmplist): -# NonBorders += 1 -# if NonBorders < 2: # A generator is considered as isolated if it has less than two non-borders neighbours -# if key not in tmplist: -# tmplist.append(key) -# return True -# return False -# -#def getTrueLines(NetworkFile): -# import psspy -# import redirect -# -# psspy.psseinit(80000) -# redirect.psse2py() -# psspy.progress_output(6) -# -# psspy.case(NetworkFile) -# -# sid = -1 -# owner = 1 -# ties = 1 -# flag = 4 # 6 for two-winding transfos -# entry = 1 #each branch once, not both directions -# string = ['FROMNAME', 'TONAME', 'ID'] -# ierr, iarray = psspy.abrnchar(sid, owner, ties, flag, entry, string) -# string = ['FROMNUMBER', 'TONUMBER'] -# ierr, carray = psspy.abrnint(sid, owner, ties, flag, entry, string) -# -# lst = [] -# tmplist = [] -# try: -# for i in range(len(carray[0])): -# if carray[0][i] not in lst and carray[0][i] not in tmplist: -# tmplist.append(carray[0][i]) -# elif carray[0][i] not in lst and carray[0][i] in tmplist: -# tmplist.remove(carray[0][i]) -# lst.append(carray[0][i]) -# if carray[1][i] not in lst and carray[1][i] not in tmplist: -# tmplist.append(carray[1][i]) -# elif carray[1][i] not in lst and carray[1][i] in tmplist: -# tmplist.remove(carray[1][i]) -# lst.append(carray[1][i]) -# except: -# pass -# -# # Create the graph -# graph = {} -# for i in range(len(carray[0])): -# try: -# if graph[carray[0][i]]: -# pass -# except: -# graph[carray[0][i]] = [] -# if carray[1][i] not in graph[carray[0][i]]: -# graph[carray[0][i]].append(carray[1][i]) -# try: -# if graph[carray[1][i]]: -# pass -# except: -# graph[carray[1][i]] = [] -# if carray[0][i] not in graph[carray[1][i]]: -# graph[carray[1][i]].append(carray[0][i]) -# -# # Search it twice, to ensure everything is mapped -# for key in sorted(graph.keys()): -# checkIfBorder(graph, key, Storage.RecursiveDepth, tmplist) -# for key in reversed(sorted(graph.keys())): -# checkIfBorder(graph, key, Storage.RecursiveDepth, tmplist) -# -# Storage.IsolatedGenList = [] -# # Unfold it -# for i in range(len(carray[0])): -# if carray[0][i] in tmplist: -# if iarray[0][i] not in Storage.IsolatedGenList: -# Storage.IsolatedGenList.append(iarray[0][i]) -# if carray[1][i] in tmplist: -# if iarray[1][i] not in Storage.IsolatedGenList: -# Storage.IsolatedGenList.append(iarray[1][i]) -# -# lines = [] -# outLines = [] -# for i in range(len(iarray[0])): -# name = iarray[0][i] + '-' + iarray[1][i] -# if '@' in iarray[2][i] or '*' in iarray[2][i]: -# outLines.append(name) -# elif iarray[0][i] not in Storage.IsolatedGenList and iarray[1][i] not in Storage.IsolatedGenList: -# lines.append(name) -# else: -# outLines.append(name) -# Storage.TrueLines = lines -# return lines -# -#NoBreakersandSwitches = True -# -#def ExtractGeneratorLoadLineandTransfoDico(NetworkFile,PSSE_PATH): -# import os -# import sys -# import numpy as np -# -# print NetworkFile -# print PSSE_PATH -# sys.path.append(PSSE_PATH) -# os.environ['PATH'] += ';' + PSSE_PATH + ';' -# -# import psspy -# import redirect -# -# ###initialization PSSE -# psspy.psseinit(10000) -# _i=psspy.getdefaultint() -# _f=psspy.getdefaultreal() -# _s=psspy.getdefaultchar() -# redirect.psse2py() -# -# # Silent execution of PSSe -# islct=6 # 6=no output; 1=standard -# psspy.progress_output(islct) -# -# #open Network File -# psspy.case(NetworkFile) -# -# # Extract Buses -# sid = -1 # all buses -# flag = 2 -# string = ['NUMBER'] -# ierr, iarray = psspy.abusint(sid, flag, string) -# -# string = ['NAME', 'EXNAME'] -# ierr, carray = psspy.abuschar(sid, flag, string) -# -# string = ['BASE'] -# ierr, ret = psspy.abusreal(sid, flag, string) -# -# BusDico = {} -# BusNominal = {} -# for i in range(len(iarray[0])): -# BusNum = iarray[0][i] -# BusDico[str(BusNum)] = carray[0][i].strip() -# BusNominal[BusDico[str(BusNum)]] = ret[0][i] -# -# #Extract Loads -# sid = -1 #all buses -# flag = 1 #all in service loads/generators (4 all loads/generators) -# -# -# string = ['NUMBER'] -# ierr,iarray = psspy.aloadint(sid,flag,string) -# -# string = ['NAME','ID','EXNAME'] -# ierr,carray = psspy.aloadchar(sid,flag,string) -# -# string = ['mvaact'] -# ierr, xdata = psspy.aloadcplx(sid, flag, string) -# -# LoadDico = {} # [Bus name, load ID, extended bus name, bus number] -# for i in range(len(iarray[0])): -# idname = "Lo" + carray[1][i].strip() -## try: #id is an integer -## idname = "Lo" + str(int(carray[1][i])) -## except: #id is not an integer -## idname = "Lo" + carray[1][i] -# loadname = carray[0][i].strip()+ "__" + idname -# loadname = loadname.replace(" ","_") -# loadname = loadname.replace("-","_") -# loadname = loadname.replace(".","_") -# loadname = loadname.replace("&","and") -# try: -# int(loadname[0]) -# loadname="_" + loadname -# except: -# pass -# LoadDico[loadname]= {} -# LoadDico[loadname]['NAME'] = carray[0][i].strip() -# LoadDico[loadname]['ID'] = carray[1][i] -# LoadDico[loadname]['EXNAME'] =carray[2][i] -# LoadDico[loadname]['NUMBER']=iarray[0][i] -# LoadDico[loadname]['P']=np.real(xdata)[0][i] -# LoadDico[loadname]['Q']=np.imag(xdata)[0][i] -# -# #Extract Generators -# sid = -1 #all buses -# flag = 1 #all in service loads/generators (4 all loads/generators) -# -# string = ['NUMBER'] -# ierr,iarray = psspy.amachint(sid,flag,string) -# -# string = ['NAME','ID','EXNAME'] -# ierr,carray = psspy.amachchar(sid,flag,string) -# -# rstrings = ['pgen','qgen','mbase','pmax','qmax','pmin','qmin'] -# ierr, rarray = psspy.amachreal(sid, flag, rstrings) -# -# MachineDico = {} # [Bus name, machine ID, extended bus name, bus number] -# for i in range(len(iarray[0])): -# idname = "Gr" + carray[1][i].strip() -### try: -### idname = "Gr" + str(int(carray[1][i])) -### except: -### idname = "Gr" + carray[1][i] -# machinename = carray[0][i].strip()+ "__" + idname -# machinename = machinename.replace(" ","_") -# machinename = machinename.replace("-","_") -# machinename = machinename.replace(".","_") -# machinename = machinename.replace("&","and") -# try: -# int(machinename[0]) -# machinename="_" + machinename -# except: -# pass -# MachineDico[machinename]={} -# MachineDico[machinename]['NAME'] = carray[0][i].strip() -# MachineDico[machinename]['ID'] = carray[1][i] -# MachineDico[machinename]['EXNAME'] =carray[2][i] -# MachineDico[machinename]['NUMBER']=iarray[0][i] -# MachineDico[machinename]['P']=rarray[0][i] -# MachineDico[machinename]['Q']=rarray[1][i] -# MachineDico[machinename]['PMAX']=rarray[3][i] -# MachineDico[machinename]['QMAX']=rarray[4][i] -# MachineDico[machinename]['PMIN']=rarray[5][i] -# MachineDico[machinename]['QMIN']=rarray[6][i] -# -# #Extract Motors -# sid = -1 #all buses -# flag = 1 #all in service loads/generators (4 all loads/generators) -# -# string = ['NUMBER','PSETCODE','BASECODE'] -# ierr,iarray = psspy.aindmacint(sid,flag,string) -# -# string = ['NAME','ID','EXNAME'] -# ierr,carray = psspy.aindmacchar(sid,flag,string) -# -# rstrings = ['psetpoint','mbase','p','q'] -# ierr, rarray = psspy.aindmacreal(sid, flag, rstrings) -# -# -# MotorDico = {} # [Bus name, machine ID, extended bus name, bus number] -# for i in range(len(iarray[0])): -# idname = "Mo" + carray[1][i].strip() -### try: -### idname = "Gr" + str(int(carray[1][i])) -### except: -### idname = "Gr" + carray[1][i] -# motorname = carray[0][i].strip()+ "__" + idname -# motorname = motorname.replace(" ","_") -# motorname = motorname.replace("-","_") -# motorname = motorname.replace(".","_") -# motorname = motorname.replace("&","and") -# try: -# int(motorname[0]) -# motorname="_" + motorname -# except: -# pass -# MotorDico[motorname]={} -# MotorDico[motorname]['NAME'] = carray[0][i].strip() -# MotorDico[motorname]['ID'] = carray[1][i] -# MotorDico[motorname]['EXNAME'] =carray[2][i] -# MotorDico[motorname]['NUMBER']=iarray[0][i] -# MotorDico[motorname]['PSETCODE']=iarray[1][i] -# MotorDico[motorname]['BASECODE']=iarray[2][i] -# MotorDico[motorname]['PSETPOINT']=rarray[0][i] -# MotorDico[motorname]['MBASE']=rarray[1][i] -# MotorDico[motorname]['P']=rarray[2][i] -# MotorDico[motorname]['Q']=rarray[3][i] -# -# -# #Extract Lignes -# sid = -1 -# owner = 1 -# ties = 1 -# flag = 2 #6 for two-winding transfos -# entry = 1 #each branch once, not both directions -# string = ['FROMNUMBER','TONUMBER'] -# ierr,iarray = psspy.abrnint(sid,owner,ties,flag,entry,string) -# string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] -# ierr,carray = psspy.abrnchar(sid,owner,ties,flag,entry,string) -# -# LineDico = {} #[linename, Bus name 1, Bus name 2, ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] -# for i in range(len(iarray[0])): -# idname = carray[4][i].strip() -# #idname = carray[4][i] -# if '@' in idname: -# idname = idname.replace('@','Br') -# elif '*' in idname: -# idname = idname.replace('*','Sw') -# else: -# try: -# idname = 'Li' + str(int(idname)) -# except: -# idname = 'Li' + idname -# linename =carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname -# linename = linename.replace(" ","_") -# linename = linename.replace("-","_") -# linename = linename.replace(".","_") -# linename = linename.replace("&","and") -# try: -# int(linename[0]) -# linename="_" + linename -# except: -# pass -# if NoBreakersandSwitches: -# if 'Br' not in idname and 'Sw' not in idname: -# LineDico[linename]={} -# LineDico[linename]['FROMNAME']=carray[0][i].strip() -# LineDico[linename]['TONAME']=carray[1][i].strip() -# LineDico[linename]['ID']=carray[4][i] -# LineDico[linename]['FROMEXNAME']=carray[2][i] -# LineDico[linename]['TOEXNAME']=carray[3][i] -# LineDico[linename]['FROMNUMBER']=iarray[0][i] -# LineDico[linename]['TONUMBER']=iarray[1][i] -# -# #Extract Branches -# sid = -1 -# owner = 1 -# ties = 1 -# flag = 4 # lines & transfos -# entry = 1 #each branch once, not both directions -# string = ['FROMNUMBER','TONUMBER'] -# ierr, iarray = psspy.abrnint(sid, owner, ties, flag, entry, string) -# string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] -# ierr, carray = psspy.abrnchar(sid, owner, ties, flag, entry, string) -# -# BranchesDico = {} #[linename, Bus name 1, Bus name 2, ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] -# for i in range(len(iarray[0])): -# idname = carray[4][i] -# if '@' in idname: -# idname = idname.replace('@','Br') -# elif '*' in idname: -# idname = idname.replace('*','Sw') -# else: -# idname = 'LI' + idname -# linename = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname -# linename = linename.replace(" ","_") -# linename = linename.replace("-","_") -# linename = linename.replace(".","_") -# linename = linename.replace("&","and") -# try: -# int(linename[0]) -# linename = "_" + linename -# except: -# pass -# if linename[-1] == '_': -# linename = linename[:-1] -# BranchesDico[linename] = {} -# BranchesDico[linename]['FROMNAME'] = carray[0][i].strip() -# BranchesDico[linename]['TONAME'] = carray[1][i].strip() -# BranchesDico[linename]['ID'] = carray[4][i] -# BranchesDico[linename]['FROMEXNAME'] = carray[2][i] -# BranchesDico[linename]['TOEXNAME'] = carray[3][i] -# BranchesDico[linename]['FROMNUMBER'] = iarray[0][i] -# BranchesDico[linename]['TONUMBER'] = iarray[1][i] -# -# -# #Extract Transfos -# sid = -1 -# owner = 1 -# ties = 1 -# flag = 6 #two-winding transfos -# entry = 1 #each branch once, not both directions -# string = ['FROMNUMBER','TONUMBER'] -# ierr,iarray = psspy.abrnint(sid,owner,ties,flag,entry,string) -# string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] -# ierr,carray = psspy.abrnchar(sid,owner,ties,flag,entry,string) -# -# TfoDico = {} #[linename, Bus name 1, Bus name 2, machine ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] -# for i in range(len(iarray[0])): -# idname = 'Tr' + carray[4][i].strip() -### try: -### idname = 'Tr' + str(int(carray[4][i])) -### except: -### idname = 'Tr' + carray[4][i] -# tfoname = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname -# tfoname = tfoname.replace(" ","_") -# tfoname = tfoname.replace("-","_") -# tfoname = tfoname.replace(".","_") -# tfoname = tfoname.replace("&","and") -# try: -# int(tfoname[0]) -# tfoname="_" + tfoname -# except: -# pass -# TfoDico[tfoname]={} -# TfoDico[tfoname]['FROMNAME']=carray[0][i].strip() -# TfoDico[tfoname]['TONAME']=carray[1][i].strip() -# TfoDico[tfoname]['ID']=carray[4][i] -# TfoDico[tfoname]['FROMEXNAME']=carray[2][i] -# TfoDico[tfoname]['TOEXNAME']=carray[3][i] -# TfoDico[tfoname]['FROMNUMBER']=iarray[0][i] -# TfoDico[tfoname]['TONUMBER']=iarray[1][i] -# TfoDico[tfoname]['#WIND']=2 -# print "Read Transfos" -# -# #Extract 3 winding Transfos -# sid = -1 #assume a subsystem containing all buses in working case -# owner_3flow = 1 #1 = use bus ownership 2 = use tfo ownership -# ties_3flow = 3 #ignored bc sid is negative. 3 = interior subsystem and subsystem tie 3 winding transformers -# flag=3 #all 3 winding transfo windings -# string = ['wind1number','wind2number','wind3number'] -# ierr,iarray = psspy.awndint(sid,owner,ties,flag,entry,string) -# string = ['wind1name','wind2name','wind3name','wind1exname','wind2exname','wind3exname','id'] -# ierr,carray = psspy.awndchar(sid,owner,ties,flag,entry,string) -# -# #[Bus name 1, Bus name 2, Bus name 3, machine ID, extended bus name 1, extended bus name 2, extended bus name 3, bus number 1, bus number 2, bus number 3] -# for i in range(len(iarray[0])): -# idname = 'Tr' + carray[6][i].strip() -### try: -### idname = 'Tr' + str(int(carray[4][i])) -### except: -### idname = 'Tr' + carray[4][i] -# tfoname = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + carray[2][i].strip() + "__" + idname -# tfoname = tfoname.replace(" ","_") -# tfoname = tfoname.replace("-","_") -# tfoname = tfoname.replace(".","_") -# tfoname = tfoname.replace("&","and") -# try: -# int(tfoname[0]) -# tfoname="_" + tfoname -# except: -# pass -# TfoDico[tfoname]={} -# TfoDico[tfoname]['FROMNAME']=carray[0][i].strip() -# TfoDico[tfoname]['TONAME']=carray[1][i].strip() -# TfoDico[tfoname]['3NAME']=carray[2][i].strip() -# TfoDico[tfoname]['ID']=carray[6][i] -# TfoDico[tfoname]['FROMEXNAME']=carray[3][i] -# TfoDico[tfoname]['TOEXNAME']=carray[4][i] -# TfoDico[tfoname]['3EXNAME']=carray[5][i] -# TfoDico[tfoname]['FROMNUMBER']=iarray[0][i] -# TfoDico[tfoname]['TONUMBER']=iarray[1][i] -# TfoDico[tfoname]['3NUMBER']=iarray[2][i] -# TfoDico[tfoname]['#WIND']=3 -# print "Read 3-Winding Transfos" -# -# return MachineDico, LoadDico, LineDico, TfoDico, MotorDico, BusDico, BranchesDico, BusNominal -# -# -##NetworkFile = r'\\Atlas.edf.fr\co\dpit-cist-siege\Der.012\Dpt-Etudes-Reseaux.001\Outils DER - Divers (excel, codes python, etc.)\PSEN_V15\Example\Results\N_20160705_17h36m34\package0_N_20160705_17h36m34\BaseCase.sav' -##PSSE_PATH=r"C:\Program Files (x86)\PTI\PSSE33\PSSBIN" -##sys.path.append(PSSE_PATH) -##os.environ['PATH'] += ';' + PSSE_PATH + ';' -##getNominalkV(NetworkFile) -##updateConts() diff --git a/ProcessOutputs_Eficas/ExtractGeneratorLoadLineandTransfoDicoProcess.py b/ProcessOutputs_Eficas/ExtractGeneratorLoadLineandTransfoDicoProcess.py deleted file mode 100644 index 653e23f8..00000000 --- a/ProcessOutputs_Eficas/ExtractGeneratorLoadLineandTransfoDicoProcess.py +++ /dev/null @@ -1,631 +0,0 @@ -import os -import sys -import numpy as np -import copy - -path1 = os.path.abspath(os.path.join(os.path.abspath(__file__), '../','TreatOutputs')) -sys.path.append(path1) -import Options - - -def getNominalkV(NetworkFile): - - print "version en dur" - - BusList=[11.0, 30.0, 90.0] - LinesList=[30.0, 90.0] - TransfosList=['11.0 - 30.0', '11.0 - 90.0', '30.0 - 90.0', '90.0 - 30.0'] - return BusList, LinesList, TransfosList - - - - - - import psspy - import redirect - - psspy.psseinit(80000) - redirect.psse2py() - psspy.progress_output(6) - - psspy.case(NetworkFile) - # Buses - - sid = -1 - flag = 2 - ierr, ret = psspy.abusreal(sid, flag, ['BASE']) - Options.BusBase = ret[0] - - ierr, carray = psspy.abuschar(sid, flag, ['NAME']) - Options.BusBaseList = {} - for i in range(len(carray[0])): - Options.BusBaseList[carray[0][i]] = ret[0][i] - - BusList = [] - for item in Options.BusBase: - if item not in BusList: - BusList.append(item) - BusList = sorted(BusList) - - # Lines - - owner = 1 - ties = 1 - flag = 2 - entry = 1 - string = ['FROMNAME', 'TONAME'] - ierr, carray = psspy.abrnchar(sid, owner, ties, flag, entry, string) - - for i in range(len(carray[0])): - nom = Options.BusBaseList[carray[0][i]] - name = carray[0][i] + '-' + carray[1][i] - Options.LinesBaseList[name] = nom - Options.LinesBase.append(nom) - - LinesList = [] - for item in Options.LinesBase: - if item not in LinesList: - LinesList.append(item) - LinesList = sorted(LinesList) - - # Transfos - - owner = 1 - ties = 1 - flag = 6 - entry = 1 - string = ['FROMNAME', 'TONAME'] - ierr, carray = psspy.abrnchar(sid, owner, ties, flag, entry, string) - - for i in range(len(carray[0])): - nom1 = Options.BusBaseList[carray[0][i]] - nom2 = Options.BusBaseList[carray[1][i]] - name = carray[0][i] + '-' + carray[1][i] - Options.TransfoBaseList[name] = [nom1, nom2] - Options.TransfoBase.append([nom1, nom2]) - - TransfosList = [] - for item in Options.TransfoBase: - string = str(item[0]) + ' - ' + str(item[1]) - if string not in TransfosList: - TransfosList.append(string) - TransfosList = sorted(TransfosList) - - # Generators - - sid = -1 #all buses - flag = 1 #all in service loads/generators (4 all loads/generators) - - string = ['NUMBER'] - ierr,iarray = psspy.amachint(sid,flag,string) - - string = ['NAME','ID'] - ierr,carray = psspy.amachchar(sid,flag,string) - - for i in range(len(iarray[0])): - idname = "GR" + carray[1][i] - machinename = carray[0][i].strip()+ "__" + idname - machinename = machinename.replace(" ","_") - machinename = machinename.replace("-","_") - machinename = machinename.replace(".","_") - machinename = machinename.replace("&","and") - try: - int(machinename[0]) - machinename = "_" + machinename - except: - pass - Options.GenBaseList[machinename] = iarray[0][i] - - return BusList, LinesList, TransfosList - -def getBusNominalkV(NetworkFile): - import psspy - import redirect - - psspy.psseinit(80000) - redirect.psse2py() - psspy.progress_output(6) - - psspy.case(NetworkFile) - - sid = -1 - flag = 2 - ierr, ret = psspy.abusreal(sid, flag, ['BASE']) - Options.BusBase = ret[0] - - ierr, carray = psspy.abuschar(sid, flag, ['NAME']) - buses = {} - for i in range(len(carray[0])): - buses[carray[0][i]] = ret[0][i] - Options.BusNames = buses - ret = [] - for item in Options.BusBase: - if item not in ret: - ret.append(item) - return sorted(ret) - -def updateConts(): - Options.ContFullList = [] - tmp = Options.BusBaseList - tmp.sort() - for key in tmp: - Options.ContFullList.append(key) - tmp = Options.GenBaseList - tmp.sort() - for key in tmp: - Options.ContFullList.append(key) - tmp = Options.LinesBaseList - tmp.sort() - for key in tmp: - Options.ContFullList.append(key) - tmp = Options.TransfoBaseList - tmp.sort() - for key in tmp: - Options.ContFullList.append(key) - print Options.ContFullList - return Options.ContFullList - -def newContingency(MatList): - Options.CustomContingencies.append(MatList) - -def checkIfBorder(graph, key, depth, tmplist): - #print "in checkifBorder" - #print "depth ",depth - #print graph - if key in tmplist: - return True - if depth == 0: - return False - NonBorders = 0 - for item in graph[key]: - if not checkIfBorder(graph, item, depth - 1, tmplist): - NonBorders += 1 - if NonBorders < 2: # A generator is considered as isolated if it has less than two non-borders neighbours - if key not in tmplist: - tmplist.append(key) - return True - return False - -def getTrueLines(NetworkFile): - import psspy - import redirect - - psspy.psseinit(80000) - redirect.psse2py() - psspy.progress_output(6) - - psspy.case(NetworkFile) - - sid = -1 - owner = 1 - ties = 1 - flag = 4 # 6 for two-winding transfos - entry = 1 #each branch once, not both directions - string = ['FROMNAME', 'TONAME', 'ID'] - ierr, iarray = psspy.abrnchar(sid, owner, ties, flag, entry, string) - string = ['FROMNUMBER', 'TONUMBER'] - ierr, carray = psspy.abrnint(sid, owner, ties, flag, entry, string) - - lst = [] - tmplist = [] - try: - for i in range(len(carray[0])): - if carray[0][i] not in lst and carray[0][i] not in tmplist: - tmplist.append(carray[0][i]) - elif carray[0][i] not in lst and carray[0][i] in tmplist: - tmplist.remove(carray[0][i]) - lst.append(carray[0][i]) - if carray[1][i] not in lst and carray[1][i] not in tmplist: - tmplist.append(carray[1][i]) - elif carray[1][i] not in lst and carray[1][i] in tmplist: - tmplist.remove(carray[1][i]) - lst.append(carray[1][i]) - except: - pass - - # Create the graph - graph = {} - for i in range(len(carray[0])): - try: - if graph[carray[0][i]]: - pass - except: - graph[carray[0][i]] = [] - if carray[1][i] not in graph[carray[0][i]]: - graph[carray[0][i]].append(carray[1][i]) - try: - if graph[carray[1][i]]: - pass - except: - graph[carray[1][i]] = [] - if carray[0][i] not in graph[carray[1][i]]: - graph[carray[1][i]].append(carray[0][i]) - - - # Search it twice, to ensure everything is mapped - for key in sorted(graph): - #print key - checkIfBorder(graph, key, Options.RecursiveDepth, tmplist) - #print "out of Checkif 0" - #print "" - for key in reversed(sorted(graph)): - checkIfBorder(graph, key, Options.RecursiveDepth, tmplist) - - Options.IsolatedGenList = [] - # Unfold it - for i in range(len(carray[0])): - if carray[0][i] in tmplist: - if iarray[0][i] not in Options.IsolatedGenList: - Options.IsolatedGenList.append(iarray[0][i]) - if carray[1][i] in tmplist: - if iarray[1][i] not in Options.IsolatedGenList: - Options.IsolatedGenList.append(iarray[1][i]) - - lines = [] - outLines = [] - for i in range(len(iarray[0])): - name = iarray[0][i] + '-' + iarray[1][i] - if '@' in iarray[2][i] or '*' in iarray[2][i]: - outLines.append(name) - elif iarray[0][i] not in Options.IsolatedGenList and iarray[1][i] not in Options.IsolatedGenList: - lines.append(name) - else: - outLines.append(name) - Options.TrueLines = lines - - return lines - -NoBreakersandSwitches = True - -def ExtractGeneratorLoadLineandTransfoDico(NetworkFile,PSSE_PATH): - - print "version en dur" - MachineDico={'M1':'M1','M2':'M2','M3':'M3','M4':'M4','B6_BUS13__1':'AZ','CSPRING__1':'DD','GT12B__1':'ER','BSTMB__1':'JJ'} - LoadDico={'C1':'C1','C2':'C2','C3':'C3','C4':'C4'} - LineDico={'L1':'L1','L2':'L2','L3':'L3','L4':'L4'} - TfoDico={'T1':'T1','T2':'T2','T3':'T3','T4':'T4'} - MDico={'MZ1':'MZ1','MZ2':'MZ2','MZ3':'MZ3','MZ4':'MZ4'} - BranchesDico={'B11':'B1','B2':'B2','B3':'B3','B4':'B4'} - BusNomial={'Bus1':'Bus1','Bus2':'Bus2','Bus3':'Bus3','Bus4':'Bus4'} - - return MachineDico, LoadDico, LineDico, TfoDico, MotorDico, BusDico, BranchesDico, BusNominal - - - import os - import sys - import numpy as np - - sys.path.append(PSSE_PATH) - os.environ['PATH'] += ';' + PSSE_PATH + ';' - - import psspy - import redirect - - ###initialization PSSE - psspy.psseinit(10000) - _i=psspy.getdefaultint() - _f=psspy.getdefaultreal() - _s=psspy.getdefaultchar() - redirect.psse2py() - - # Silent execution of PSSe - islct=6 # 6=no output; 1=standard - psspy.progress_output(islct) - - #open Network File - psspy.case(NetworkFile) - - # Extract Buses - sid = -1 # all buses - flag = 2 - string = ['NUMBER'] - ierr, iarray = psspy.abusint(sid, flag, string) - - string = ['NAME', 'EXNAME'] - ierr, carray = psspy.abuschar(sid, flag, string) - - string = ['BASE'] - ierr, ret = psspy.abusreal(sid, flag, string) - - BusDico = {} - BusNominal = {} - for i in range(len(iarray[0])): - BusNum = iarray[0][i] - BusDico[str(BusNum)] = carray[0][i].strip() - BusNominal[BusDico[str(BusNum)]] = ret[0][i] - - #Extract Loads - sid = -1 #all buses - flag = 1 #all in service loads/generators (4 all loads/generators) - - - string = ['NUMBER'] - ierr,iarray = psspy.aloadint(sid,flag,string) - - string = ['NAME','ID','EXNAME'] - ierr,carray = psspy.aloadchar(sid,flag,string) - - string = ['mvaact'] - ierr, xdata = psspy.aloadcplx(sid, flag, string) - - LoadDico = {} # [Bus name, load ID, extended bus name, bus number] - for i in range(len(iarray[0])): - idname = "Lo" + carray[1][i].strip() -# try: #id is an integer -# idname = "Lo" + str(int(carray[1][i])) -# except: #id is not an integer -# idname = "Lo" + carray[1][i] - loadname = carray[0][i].strip()+ "__" + idname - loadname = loadname.replace(" ","_") - loadname = loadname.replace("-","_") - loadname = loadname.replace(".","_") - loadname = loadname.replace("&","and") - try: - int(loadname[0]) - loadname="_" + loadname - except: - pass - LoadDico[loadname]= {} - LoadDico[loadname]['NAME'] = carray[0][i].strip() - LoadDico[loadname]['ID'] = carray[1][i] - LoadDico[loadname]['EXNAME'] =carray[2][i] - LoadDico[loadname]['NUMBER']=iarray[0][i] - LoadDico[loadname]['P']=np.real(xdata)[0][i] - LoadDico[loadname]['Q']=np.imag(xdata)[0][i] - - #Extract Generators - sid = -1 #all buses - flag = 1 #all in service loads/generators (4 all loads/generators) - - string = ['NUMBER'] - ierr,iarray = psspy.amachint(sid,flag,string) - - string = ['NAME','ID','EXNAME'] - ierr,carray = psspy.amachchar(sid,flag,string) - - rstrings = ['pgen','qgen','mbase','pmax','qmax','pmin','qmin'] - ierr, rarray = psspy.amachreal(sid, flag, rstrings) - - MachineDico = {} # [Bus name, machine ID, extended bus name, bus number] - for i in range(len(iarray[0])): - idname = "Gr" + carray[1][i].strip() -## try: -## idname = "Gr" + str(int(carray[1][i])) -## except: -## idname = "Gr" + carray[1][i] - machinename = carray[0][i].strip()+ "__" + idname - machinename = machinename.replace(" ","_") - machinename = machinename.replace("-","_") - machinename = machinename.replace(".","_") - machinename = machinename.replace("&","and") - try: - int(machinename[0]) - machinename="_" + machinename - except: - pass - MachineDico[machinename]={} - MachineDico[machinename]['NAME'] = carray[0][i].strip() - MachineDico[machinename]['ID'] = carray[1][i] - MachineDico[machinename]['EXNAME'] =carray[2][i] - MachineDico[machinename]['NUMBER']=iarray[0][i] - MachineDico[machinename]['P']=rarray[0][i] - MachineDico[machinename]['Q']=rarray[1][i] - MachineDico[machinename]['PMAX']=rarray[3][i] - MachineDico[machinename]['QMAX']=rarray[4][i] - MachineDico[machinename]['PMIN']=rarray[5][i] - MachineDico[machinename]['QMIN']=rarray[6][i] - - #Extract Motors - sid = -1 #all buses - flag = 1 #all in service loads/generators (4 all loads/generators) - - string = ['NUMBER','PSETCODE','BASECODE'] - ierr,iarray = psspy.aindmacint(sid,flag,string) - - string = ['NAME','ID','EXNAME'] - ierr,carray = psspy.aindmacchar(sid,flag,string) - - rstrings = ['psetpoint','mbase','p','q'] - ierr, rarray = psspy.aindmacreal(sid, flag, rstrings) - - - MotorDico = {} # [Bus name, machine ID, extended bus name, bus number] - for i in range(len(iarray[0])): - idname = "Mo" + carray[1][i].strip() -## try: -## idname = "Gr" + str(int(carray[1][i])) -## except: -## idname = "Gr" + carray[1][i] - motorname = carray[0][i].strip()+ "__" + idname - motorname = motorname.replace(" ","_") - motorname = motorname.replace("-","_") - motorname = motorname.replace(".","_") - motorname = motorname.replace("&","and") - try: - int(motorname[0]) - motorname="_" + motorname - except: - pass - MotorDico[motorname]={} - MotorDico[motorname]['NAME'] = carray[0][i].strip() - MotorDico[motorname]['ID'] = carray[1][i] - MotorDico[motorname]['EXNAME'] =carray[2][i] - MotorDico[motorname]['NUMBER']=iarray[0][i] - MotorDico[motorname]['PSETCODE']=iarray[1][i] - MotorDico[motorname]['BASECODE']=iarray[2][i] - MotorDico[motorname]['PSETPOINT']=rarray[0][i] - MotorDico[motorname]['MBASE']=rarray[1][i] - MotorDico[motorname]['P']=rarray[2][i] - MotorDico[motorname]['Q']=rarray[3][i] - - - #Extract Lignes - sid = -1 - owner = 1 - ties = 1 - flag = 2 #6 for two-winding transfos - entry = 1 #each branch once, not both directions - string = ['FROMNUMBER','TONUMBER'] - ierr,iarray = psspy.abrnint(sid,owner,ties,flag,entry,string) - string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] - ierr,carray = psspy.abrnchar(sid,owner,ties,flag,entry,string) - - LineDico = {} #[linename, Bus name 1, Bus name 2, ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] - for i in range(len(iarray[0])): - idname = carray[4][i].strip() - #idname = carray[4][i] - if '@' in idname: - idname = idname.replace('@','Br') - elif '*' in idname: - idname = idname.replace('*','Sw') - else: - try: - idname = 'Li' + str(int(idname)) - except: - idname = 'Li' + idname - linename =carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname - linename = linename.replace(" ","_") - linename = linename.replace("-","_") - linename = linename.replace(".","_") - linename = linename.replace("&","and") - try: - int(linename[0]) - linename="_" + linename - except: - pass - if NoBreakersandSwitches: - if 'Br' not in idname and 'Sw' not in idname: - LineDico[linename]={} - LineDico[linename]['FROMNAME']=carray[0][i].strip() - LineDico[linename]['TONAME']=carray[1][i].strip() - LineDico[linename]['ID']=carray[4][i] - LineDico[linename]['FROMEXNAME']=carray[2][i] - LineDico[linename]['TOEXNAME']=carray[3][i] - LineDico[linename]['FROMNUMBER']=iarray[0][i] - LineDico[linename]['TONUMBER']=iarray[1][i] - - #Extract Branches - sid = -1 - owner = 1 - ties = 1 - flag = 4 # lines & transfos - entry = 1 #each branch once, not both directions - string = ['FROMNUMBER','TONUMBER'] - ierr, iarray = psspy.abrnint(sid, owner, ties, flag, entry, string) - string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] - ierr, carray = psspy.abrnchar(sid, owner, ties, flag, entry, string) - - BranchesDico = {} #[linename, Bus name 1, Bus name 2, ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] - for i in range(len(iarray[0])): - idname = carray[4][i] - if '@' in idname: - idname = idname.replace('@','Br') - elif '*' in idname: - idname = idname.replace('*','Sw') - else: - idname = 'LI' + idname - linename = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname - linename = linename.replace(" ","_") - linename = linename.replace("-","_") - linename = linename.replace(".","_") - linename = linename.replace("&","and") - try: - int(linename[0]) - linename = "_" + linename - except: - pass - if linename[-1] == '_': - linename = linename[:-1] - BranchesDico[linename] = {} - BranchesDico[linename]['FROMNAME'] = carray[0][i].strip() - BranchesDico[linename]['TONAME'] = carray[1][i].strip() - BranchesDico[linename]['ID'] = carray[4][i] - BranchesDico[linename]['FROMEXNAME'] = carray[2][i] - BranchesDico[linename]['TOEXNAME'] = carray[3][i] - BranchesDico[linename]['FROMNUMBER'] = iarray[0][i] - BranchesDico[linename]['TONUMBER'] = iarray[1][i] - - - #Extract Transfos - sid = -1 - owner = 1 - ties = 1 - flag = 6 #two-winding transfos - entry = 1 #each branch once, not both directions - string = ['FROMNUMBER','TONUMBER'] - ierr,iarray = psspy.abrnint(sid,owner,ties,flag,entry,string) - string = ['FROMNAME','TONAME','FROMEXNAME','TOEXNAME','ID'] - ierr,carray = psspy.abrnchar(sid,owner,ties,flag,entry,string) - - TfoDico = {} #[linename, Bus name 1, Bus name 2, machine ID, extended bus name 1, extended bus name 2, bus number 1, bus number 2] - for i in range(len(iarray[0])): - idname = 'Tr' + carray[4][i].strip() -## try: -## idname = 'Tr' + str(int(carray[4][i])) -## except: -## idname = 'Tr' + carray[4][i] - tfoname = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + idname - tfoname = tfoname.replace(" ","_") - tfoname = tfoname.replace("-","_") - tfoname = tfoname.replace(".","_") - tfoname = tfoname.replace("&","and") - try: - int(tfoname[0]) - tfoname="_" + tfoname - except: - pass - TfoDico[tfoname]={} - TfoDico[tfoname]['FROMNAME']=carray[0][i].strip() - TfoDico[tfoname]['TONAME']=carray[1][i].strip() - TfoDico[tfoname]['ID']=carray[4][i] - TfoDico[tfoname]['FROMEXNAME']=carray[2][i] - TfoDico[tfoname]['TOEXNAME']=carray[3][i] - TfoDico[tfoname]['FROMNUMBER']=iarray[0][i] - TfoDico[tfoname]['TONUMBER']=iarray[1][i] - TfoDico[tfoname]['#WIND']=2 - - #Extract 3 winding Transfos - sid = -1 #assume a subsystem containing all buses in working case - owner_3flow = 1 #1 = use bus ownership 2 = use tfo ownership - ties_3flow = 3 #ignored bc sid is negative. 3 = interior subsystem and subsystem tie 3 winding transformers - flag=3 #all 3 winding transfo windings - string = ['wind1number','wind2number','wind3number'] - ierr,iarray = psspy.awndint(sid,owner,ties,flag,entry,string) - string = ['wind1name','wind2name','wind3name','wind1exname','wind2exname','wind3exname','id'] - ierr,carray = psspy.awndchar(sid,owner,ties,flag,entry,string) - - #[Bus name 1, Bus name 2, Bus name 3, machine ID, extended bus name 1, extended bus name 2, extended bus name 3, bus number 1, bus number 2, bus number 3] - for i in range(len(iarray[0])): - idname = 'Tr' + carray[6][i].strip() -## try: -## idname = 'Tr' + str(int(carray[4][i])) -## except: -## idname = 'Tr' + carray[4][i] - tfoname = carray[0][i].strip() + "__" + carray[1][i].strip() + "__" + carray[2][i].strip() + "__" + idname - tfoname = tfoname.replace(" ","_") - tfoname = tfoname.replace("-","_") - tfoname = tfoname.replace(".","_") - tfoname = tfoname.replace("&","and") - try: - int(tfoname[0]) - tfoname="_" + tfoname - except: - pass - TfoDico[tfoname]={} - TfoDico[tfoname]['FROMNAME']=carray[0][i].strip() - TfoDico[tfoname]['TONAME']=carray[1][i].strip() - TfoDico[tfoname]['3NAME']=carray[2][i].strip() - TfoDico[tfoname]['ID']=carray[6][i] - TfoDico[tfoname]['FROMEXNAME']=carray[3][i] - TfoDico[tfoname]['TOEXNAME']=carray[4][i] - TfoDico[tfoname]['3EXNAME']=carray[5][i] - TfoDico[tfoname]['FROMNUMBER']=iarray[0][i] - TfoDico[tfoname]['TONUMBER']=iarray[1][i] - TfoDico[tfoname]['3NUMBER']=iarray[2][i] - TfoDico[tfoname]['#WIND']=3 - - #print MachineDico, LoadDico, LineDico, TfoDico, MotorDico, BusDico, BranchesDico, BusNominal - return MachineDico, LoadDico, LineDico, TfoDico, MotorDico, BusDico, BranchesDico, BusNominal - - - diff --git a/ProcessOutputs_Eficas/PSEN_Cata_N1.py b/ProcessOutputs_Eficas/PSEN_Cata_N1.py deleted file mode 100644 index 92d795f4..00000000 --- a/ProcessOutputs_Eficas/PSEN_Cata_N1.py +++ /dev/null @@ -1,280 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# -------------------------------------------------- -# debut entete -# -------------------------------------------------- - -#from Accas import ASSD, JDC_CATA, AU_MOINS_UN, PROC, SIMP, FACT, OPER, MACRO, BLOC, A_VALIDATOR -from Accas import * -import opsPSEN_N1 -import pn -# -#class loi ( ASSD ) : pass -#class variable ( ASSD ) : pass -class sd_charge ( ASSD ) : pass -class sd_generateur ( ASSD ) : pass -class sd_ligne ( ASSD ) : pass -class sd_transfo ( ASSD ) : pass -class sd_moteur ( ASSD ) : pass -# - -# import types -class Tuple: - def __init__(self,ntuple): - self.ntuple=ntuple - - def __convert__(self,valeur): - import types - if type(valeur) == types.StringType: - return None - if len(valeur) != self.ntuple: - return None - return valeur - - def info(self): - return "Tuple de %s elements" % self.ntuple - - __repr__=info - __str__=info - -# class Matrice: -# def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None): -# self.nbLigs=nbLigs -# self.nbCols=nbCols -# self.methodeCalculTaille=methodeCalculTaille -# self.formatSortie=formatSortie -# self.valSup=valSup -# self.valMin=valMin -# self.structure=structure -# -# def __convert__(self,valeur): -# # Attention ne verifie pas grand chose -# if type(valeur) != types.ListType : -# return None -# return valeur -# -# def info(self): -# return "Matrice %s x %s" % (self.nbLigs, self.nbCols) -# -# __repr__=info -# __str__=info - - -#CONTEXT.debug = 1 -JdC = JDC_CATA ( code = 'PSEN', - execmodul = None, - regles = ( AU_MOINS_UN ( 'CASE_SELECTION', 'CONTINGENCY_PROCESSING' ), - AU_MOINS_UN ( 'CONTINGENCY_SELECTION','N_PROCESSING_OPTIONS','CONTINGENCY_PROCESSING' ), - PRESENT_PRESENT ( 'CONTINGENCY_SELECTION','CONTINGENCY_OPTIONS' ), - PRESENT_PRESENT ( 'CONTINGENCY_PROCESSING','CONTINGENCY_OPTIONS' ), - AU_MOINS_UN ( 'SIMULATION' ), - # AU_PLUS_UN ( 'PSSE_PARAMETERS' ), - AU_PLUS_UN ( 'CASE_SELECTION' ), - AU_PLUS_UN ( 'CONTINGENCY_OPTIONS' ), - AU_PLUS_UN ( 'CONTINGENCY_SELECTION' ), - AU_PLUS_UN ( 'CONTINGENCY_PROCESSING' ), - AU_PLUS_UN ( 'N_PROCESSING_OPTIONS' ), - # AU_PLUS_UN ( 'N_1_LINES' ), - # AU_PLUS_UN ( 'N_1_LOADS' ), - # AU_PLUS_UN ( 'N_1_TRANSFORMERS' ), - - ), - ) # Fin JDC_CATA - -MODIFICATION_CATALOGUE = MACRO ( nom = "MODIFICATION_CATALOGUE", - sd_prod = pn.modification_catalogue, - op_init= pn.modification_catalogue2, - op=None, - UIinfo={"groupes":("CACHE")}, - Fonction=SIMP(statut='o', typ='TXM', into=['ajoutDefinitionMC']), - Etape=SIMP(statut='o', typ='TXM',), - Genea=SIMP(statut='o', typ='TXM', min=0, max='**'), - NomSIMP=SIMP(statut='o', typ='TXM',), - TypeSIMP=SIMP(statut='o', typ='TXM',), - PhraseArguments=SIMP(statut='o', typ='TXM',),) - - -# -------------------------------------------------- -# fin entete -# -------------------------------------------------- -## TODO : RUN -CASE_SELECTION = MACRO ( nom = "CASE_SELECTION", - sd_prod = opsPSEN_N1.INCLUDE, - op_init = opsPSEN_N1.INCLUDE_context, - fichier_ini = 1, - op = None, - fr = "Selectionnez les cas a analyser", - ang = 'Select the cases to analyze', - PSSE_path = SIMP(statut="o",typ='Repertoire',defaut='C:\Program Files (x86)\PTI\PSSE33\PSSBIN'), - output_folder = SIMP(statut="o", typ="Repertoire"), - - - BusesList = SIMP(statut = 'f', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - LinesList = SIMP(statut = 'f', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - TransformersList = SIMP(statut = 'f', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - MaxDepth = SIMP(statut = 'o', typ = 'I', defaut = 5), - OutputNewCsv = SIMP ( statut = "o",typ=bool,defaut=False,), - ) -N_PROCESSING_OPTIONS = PROC ( nom = 'N_PROCESSING_OPTIONS', - op = None, - ang = "Select whether the program should be displaying data about the different categories.\nThe values displayed will be the min, max, and mean of each item, plus a chart.", - Output_bus_values = SIMP(statut = 'o', typ = bool, defaut = True), - Output_lines_values = SIMP(statut = 'o', typ = bool, defaut = True), - Output_transformer_values = SIMP(statut = 'o', typ = bool, defaut = True), - Threshold_selection_for_the_treated_cases = FACT( - statut = 'f', - Branches = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), - Transformers = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), - High_voltage = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), - Low_voltage = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), - ), - ) - - -CONTINGENCY_OPTIONS = PROC (nom = 'CONTINGENCY_OPTIONS', - op = None, - - GeneralOptions = FACT(statut='o', - Vmin = SIMP(statut = 'o', typ = 'R', defaut = 0.9, val_min = 0), - Vmax = SIMP(statut = 'o', typ = 'R', defaut = 1.1, val_min = 0), - ContingencyRate = SIMP(statut = 'o', typ = 'TXM', defaut = 'a', into=['a', 'b']), - FlowLimitLines = SIMP(statut = 'o', typ = 'I', defaut = 120, val_min = 0), - FlowLimitTransformers = SIMP(statut = 'o', typ = 'I', defaut = 120, val_min = 0), - Tolerance = SIMP(statut = 'o', typ = 'R', defaut = 0.5, val_min = 0), - TripLines = SIMP(statut = 'o', typ = bool, defaut = True), - TripTransfos = SIMP(statut = 'o', typ = bool, defaut = True), - TripGenerators = SIMP(statut = 'o', typ = bool, defaut = True), - TripBuses = SIMP(statut = 'o', typ = bool, defaut = False), - ), - - LoadFlowOptions = FACT(statut='o', - AdjustTaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Lock', '1 - Stepping', '2 - Direct'], defaut = '1 - Stepping'), - AdjustDCtaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable'], defaut = '1 - Enable'), - SolutionMethod = SIMP(statut = 'o', typ = 'TXM', into = ['0 - FDNS', '1 - FNSL', '2 - Optimized FDNS'], defaut = '1 - FNSL'), - AdjustSwitchedShunts = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable', '2 - Enable continuous mode'], defaut = '1 - Enable'), - DispatchMode = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Reserve', '2 - Pmax', '3 - Inertia', '4 - Droop'], defaut = '1 - Reserve'), - FlatStart = SIMP(statut = 'o', typ = bool, defaut = False), - VarLimits = SIMP(statut = 'o', typ = 'I', defaut = 99,ang = 'if set to -1, var limits will not be applied'), - ), - -# OutputOptions = FACT(statut='o', -# consigne1 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Output PSSE multiple contingency report to Shell?'), -# MultipleContingencyReport = SIMP(statut = 'o', typ = bool, defaut = True, ang = 'Output PSSE multiple contingency report to Shell?'), -# consigne2 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Write an Excel file for the results of each case file?'), -# WriteIndivExcels = SIMP(statut = 'o', typ = bool, defaut = True), -# consigne3 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Add a tab in Excel results file for the differences between the max flow rate (MVAR) and the actual flow rate in lines and transformers?'), -# WriteFlowDifs = SIMP(statut = 'o', typ = bool, defaut = True), -# ), - ) - - - - -CONTINGENCY_SELECTION = PROC(nom='CONTINGENCY_SELECTION',op = None, - SelectionMethod = SIMP(statut='o',typ='TXM',into=['CaseSelectionFromFile','SelectAllCases','SelectWorstCases'], - ), - - b_file = BLOC(condition="SelectionMethod=='CaseSelectionFromFile'", - CaseSelectionFromFiles = FACT( - statut = 'o', - case = FACT(statut='o',max='**', - case_name=SIMP(statut='o',typ='TXM'), - csv_file= SIMP(statut='o', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)',),),), -# regles=(AU_MOINS_UN('branch_cases','transformer_cases','high_voltage_cases','low_voltage_cases',),), -# branch_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), -# transformer_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde',),), -# high_voltage_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), -# low_voltage_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), - ), - -# CaseSelectionFromFile = FACT( -# statut = 'o', -# input_path = SIMP(statut="o",typ='Repertoire'), -# branch_cases = SIMP(statut='o', typ='TXM'), -# transformer_cases = SIMP(statut='o', typ='TXM'), -# high_cases = SIMP(statut='o', typ='TXM'), -# low_cases = SIMP(statut='o', typ='TXM'), -# ), - - ), - -# b_all = BLOC(condition="SelectionMethod=='SelectAllCases'", -# SelectAllCases = FACT( -# statut='o', -# all_cases = SIMP(statut='o', typ=bool, defaut = True), -# ), -# ), - - b_worst = BLOC(condition="SelectionMethod=='SelectWorstCases'", - SelectWorstCases = FACT( - regles = (AU_MOINS_UN('AvgLineLoad', 'AvgLineLoadPercent','AvgTransformerLoad','AvgTransformerLoadPercent','AvgHighVoltage', 'AvgHighVoltagePercent','AvgLowVoltage', 'AvgLowVoltagePercent'), - EXCLUS('AvgLineLoad', 'AvgLineLoadPercent'),EXCLUS('AvgTransformerLoad','AvgTransformerLoadPercent'),EXCLUS('AvgHighVoltage', 'AvgHighVoltagePercent'),EXCLUS('AvgLowVoltage', 'AvgLowVoltagePercent'),), - statut = 'o', - consigne = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Choose at least one of the potential selection criteria from the SelectWorstCases list on the right.'), - AvgLineLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), - AvgLineLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), - AvgTransformerLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), - AvgTransformerLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), - AvgHighVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), - AvgHighVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), - AvgLowVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), - AvgLowVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), - ), - ), - - - Automatic_N_2_Selection = FACT(statut='f', - - BusesList = SIMP(statut = 'o', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - LinesList = SIMP(statut = 'o', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - TransformersList = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - ), - - MultipleContingencyList = FACT (statut='f', - max="**", - ComponentList=SIMP(statut='o', typ = 'TXM', max='**', homo = 'SansOrdreNiDoublon',), - ), - - ) - -CONTINGENCY_PROCESSING = MACRO ( nom = 'CONTINGENCY_PROCESSING', - sd_prod = opsPSEN_N1.PROCESS, - op_init = opsPSEN_N1.PROCESS_context, - - #sd_prod=None, - - op = None, - fichier_ini = 1, - fr = "", - ang="", - XLS_file = SIMP(statut="o", typ = ('Fichier', 'XLS file (*.xls);;All Files (*)',),), - b_TabList = BLOC(condition="XLS_file != None and XLS_file != ''", - TabList = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), ), - -# b_highVoltage = BLOC(condition="'High Voltage 0' in TabList", -# HighVoltageBuses = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), -# HighVoltageContingencies = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), -# ), - - ) - -Ordre_Des_Commandes = ('CASE_SELECTION' , 'N_PROCESSING_OPTIONS' , 'CONTINGENCY_SELECTION', 'CONTINGENCY_OPTIONS' ,'CONTINGENCY_PROCESSING',) -Classement_Commandes_Ds_Arbre = ('CASE_SELECTION' , 'N_PROCESSING_OPTIONS' , 'CONTINGENCY_SELECTION', 'CONTINGENCY_OPTIONS' ,'CONTINGENCY_PROCESSING',) diff --git a/ProcessOutputs_Eficas/PSEN_Cata_N1.py.ok b/ProcessOutputs_Eficas/PSEN_Cata_N1.py.ok deleted file mode 100644 index f2598161..00000000 --- a/ProcessOutputs_Eficas/PSEN_Cata_N1.py.ok +++ /dev/null @@ -1,250 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# -------------------------------------------------- -# debut entete -# -------------------------------------------------- - -#from Accas import ASSD, JDC_CATA, AU_MOINS_UN, PROC, SIMP, FACT, OPER, MACRO, BLOC, A_VALIDATOR -from Accas import * -import opsPSEN_N1 -# -# - -# import types -class Tuple: - def __init__(self,ntuple): - self.ntuple=ntuple - - def __convert__(self,valeur): - if type(valeur) == types.StringType: - return None - if len(valeur) != self.ntuple: - return None - return valeur - - def info(self): - return "Tuple de %s elements" % self.ntuple - - __repr__=info - __str__=info - -# class Matrice: -# def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None): -# self.nbLigs=nbLigs -# self.nbCols=nbCols -# self.methodeCalculTaille=methodeCalculTaille -# self.formatSortie=formatSortie -# self.valSup=valSup -# self.valMin=valMin -# self.structure=structure -# -# def __convert__(self,valeur): -# # Attention ne verifie pas grand chose -# if type(valeur) != types.ListType : -# return None -# return valeur -# -# def info(self): -# return "Matrice %s x %s" % (self.nbLigs, self.nbCols) -# -# __repr__=info -# __str__=info - - -#CONTEXT.debug = 1 -JdC = JDC_CATA ( code = 'PSEN', - execmodul = None, - regles = ( AU_MOINS_UN ( 'CASE_SELECTION' ), - # AU_MOINS_UN ( 'DIRECTORY' ), - # AU_MOINS_UN ( 'DISTRIBUTION' ), - # AU_MOINS_UN ( 'SIMULATION' ), - # AU_PLUS_UN ( 'PSSE_PARAMETERS' ), - # AU_PLUS_UN ( 'DIRECTORY' ), - # AU_PLUS_UN ( 'SIMULATION' ), - # AU_PLUS_UN ( 'CORRELATION' ), - # AU_PLUS_UN ( 'N_1_GENERATORS' ), - # AU_PLUS_UN ( 'N_1_LINES' ), - # AU_PLUS_UN ( 'N_1_LOADS' ), - # AU_PLUS_UN ( 'N_1_TRANSFORMERS' ), - - ), - ) # Fin JDC_CATA - - -# -------------------------------------------------- -# fin entete -# -------------------------------------------------- -## TODO : RUN -CASE_SELECTION = MACRO ( nom = "CASE_SELECTION", - sd_prod = opsPSEN_N1.INCLUDE, - op_init = opsPSEN_N1.INCLUDE_context, - fichier_ini = 1, - op = None, - fr = "Sélectionnez les cas à analyser", - ang = 'Select the cases to analyze', - PSSE_path = SIMP(statut="o",typ='Repertoire',defaut='C:\Program Files (x86)\PTI\PSSE33\PSSBIN'), - output_folder = SIMP(statut="o", typ="Repertoire"), - - - BusesList = SIMP(statut = 'f', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - LinesList = SIMP(statut = 'f', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - TransformersList = SIMP(statut = 'f', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - MaxDepth = SIMP(statut = 'o', typ = 'I', defaut = 5), - OutputNewCsv = SIMP ( statut = "o",typ=bool,defaut=False,), - ) -N_PROCESSING_OPTIONS = PROC ( nom = 'N_PROCESSING_OPTIONS', - op = None, - ang = "Select whether the program should be displaying data ablout the different categories. The values displayed will be the min, max, and mean of each item, plus a chart.", - Output_bus_values = SIMP(statut = 'o', typ = bool, defaut = True), - Output_lines_values = SIMP(statut = 'o', typ = bool, defaut = True), - Output_transformer_values = SIMP(statut = 'o', typ = bool, defaut = True), - Threshold_selection_for_the_treated_cases = FACT( - statut = 'f', - Branches = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), - Transformers = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), - High_voltage = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), - Low_voltage = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), - ), - ) - - -CONTINGENCY_OPTIONS = PROC (nom = 'CONTINGENCY_OPTIONS', - op = None, - - GeneralOptions = FACT(statut='o', - Vmin = SIMP(statut = 'o', typ = 'R', defaut = 0.9, val_min = 0), - Vmax = SIMP(statut = 'o', typ = 'R', defaut = 1.1, val_min = 0), - ContingencyRate = SIMP(statut = 'o', typ = 'TXM', defaut = 'a', into=['a', 'b']), - FlowLimitLines = SIMP(statut = 'o', typ = 'I', defaut = 120, val_min = 0), - FlowLimitTransformers = SIMP(statut = 'o', typ = 'I', defaut = 120, val_min = 0), - Tolerance = SIMP(statut = 'o', typ = 'R', defaut = 0.5, val_min = 0), - TripLines = SIMP(statut = 'o', typ = bool, defaut = True), - TripTransfos = SIMP(statut = 'o', typ = bool, defaut = True), - TripGenerators = SIMP(statut = 'o', typ = bool, defaut = True), - ), - - LoadFlowOptions = FACT(statut='o', - AdjustTaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Lock', '1 - Stepping', '2 - Direct'], defaut = '1 - Stepping'), - AdjustDCtaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable'], defaut = '1 - Enable'), - SolutionMethod = SIMP(statut = 'o', typ = 'TXM', into = ['0 - FDNS', '1 - FNSL', '2 - Optimized FDNS'], defaut = '1 - FNSL'), - AdjustSwitchedShunts = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable', '2 - Enable continuous mode'], defaut = '1 - Enable'), - DispatchMode = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Reserve', '2 - Pmax', '3 - Inertia', '4 - Droop'], defaut = '1 - Reserve'), - FlatStart = SIMP(statut = 'o', typ = bool, defaut = False), - VarLimits = SIMP(statut = 'o', typ = 'I', defaut = 99,ang = 'if set to -1, var limits will not be applied'), - ), - - OutputOptions = FACT(statut='o', - consigne1 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Output PSSE multiple contingency report to Shell?'), - MultipleContingencyReport = SIMP(statut = 'o', typ = bool, defaut = True, ang = 'Output PSSE multiple contingency report to Shell?'), - consigne2 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Write an Excel file for the results of each case file?'), - WriteIndivExcels = SIMP(statut = 'o', typ = bool, defaut = True), - consigne3 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Add a tab in Excel results file for the differences between the max flow rate (MVAR) and the actual flow rate in lines and transformers?'), - WriteFlowDifs = SIMP(statut = 'o', typ = bool, defaut = True), - ), - ) - - - - -CONTINGENCY_SELECTION = PROC(nom='CONTINGENCY_SELECTION',op = None, - SelectionMethod = SIMP(statut='o',typ='TXM',into=['CaseSelectionFromFile','SelectAllCases','SelectWorstCases'], - ), - - b_file = BLOC(condition="SelectionMethod=='CaseSelectionFromFile'", - CaseSelectionFromFiles = FACT( - statut = 'o', - regles=(AU_MOINS_UN('branch_cases','transformer_cases','high_voltage_cases','low_voltage_cases',),), - branch_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), - transformer_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde',),), - high_voltage_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), - low_voltage_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), - ), - -# CaseSelectionFromFile = FACT( -# statut = 'o', -# input_path = SIMP(statut="o",typ='Repertoire'), -# branch_cases = SIMP(statut='o', typ='TXM'), -# transformer_cases = SIMP(statut='o', typ='TXM'), -# high_cases = SIMP(statut='o', typ='TXM'), -# low_cases = SIMP(statut='o', typ='TXM'), -# ), - - ), - -# b_all = BLOC(condition="SelectionMethod=='SelectAllCases'", -# SelectAllCases = FACT( -# statut='o', -# all_cases = SIMP(statut='o', typ=bool, defaut = True), -# ), -# ), - - b_worst = BLOC(condition="SelectionMethod=='SelectWorstCases'", - SelectWorstCases = FACT( - regles = (UN_PARMI('AvgBranchLoad', 'AvgBranchLoadPercent'), UN_PARMI('AvgTransformerLoad', 'AvgTransformerLoadPercent'), UN_PARMI('AvgHighVoltage', 'AvgHighVoltagePercent'), UN_PARMI('AvgLowVoltage', 'AvgLowVoltagePercent'),), - statut = 'o', - consigne = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Choose at least one of the potential selection criteria from the SelectWorstCases list on the right.'), - AvgBranchLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), - AvgBranchLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), - AvgTransformerLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), - AvgTransformerLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), - AvgHighVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), - AvgHighVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), - AvgLowVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), - AvgLowVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), - ), - ), - - - Automatic_N_2_Selection = FACT(statut='f', - - BusesList = SIMP(statut = 'o', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - LinesList = SIMP(statut = 'o', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - TransformersList = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - ), - - MultipleContingencyList = FACT (statut='f', - max="**", - ComponentList=SIMP(statut='o', typ = 'TXM', max='**', homo = 'SansOrdreNiDoublon',), - ), - - ) - -CONTINGENCY_PROCESSING = MACRO ( nom = 'CONTINGENCY_PROCESSING', - sd_prod = opsPSEN_N1.PROCESS, - op_init = opsPSEN_N1.PROCESS_context, - - #sd_prod=None, - - op = None, - fichier_ini = 1, - fr = "", - ang="", - XLS_file = SIMP(statut="o", typ = ('Fichier', 'XLS file (*.xls);;All Files (*)',),), - TabList = SIMP(statut = 'f', typ = 'TXM', min = 0, max = '**', homo = 'SansOrdreNiDoublon'), - -# b_highVoltage = BLOC(condition="'High Voltage 0' in TabList", -# HighVoltageBuses = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), -# HighVoltageContingencies = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), -# ), - - ) - -Ordre_Des_Commandes = ('CASE_SELECTION' , 'N_PROCESSING_OPTIONS' , 'CONTINGENCY_OPTIONS' , 'CONTINGENCY_SELECTION',) diff --git a/ProcessOutputs_Eficas/ProcessOutputs_Cata.py b/ProcessOutputs_Eficas/ProcessOutputs_Cata.py deleted file mode 100644 index 70144662..00000000 --- a/ProcessOutputs_Eficas/ProcessOutputs_Cata.py +++ /dev/null @@ -1,240 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# -------------------------------------------------- -# debut entete -# -------------------------------------------------- - -from Accas import * -import opsPSEN_N1 -import pn -# - -# import types -class Tuple: - def __init__(self,ntuple): - self.ntuple=ntuple - - def __convert__(self,valeur): - import types - if type(valeur) == types.StringType: - return None - if len(valeur) != self.ntuple: - return None - return valeur - - def info(self): - return "Tuple de %s elements" % self.ntuple - - __repr__=info - __str__=info - - -#CONTEXT.debug = 1 -JdC = JDC_CATA ( code = 'PSEN', - execmodul = None, - regles = ( AU_MOINS_UN ( 'CASE_SELECTION', 'CONTINGENCY_PROCESSING' ), - AU_MOINS_UN ( 'CONTINGENCY_SELECTION','N_PROCESSING_OPTIONS','CONTINGENCY_PROCESSING' ), - PRESENT_PRESENT ( 'CONTINGENCY_SELECTION','CONTINGENCY_OPTIONS' ), - # AU_MOINS_UN ( 'SIMULATION' ), - # AU_PLUS_UN ( 'PSSE_PARAMETERS' ), - AU_PLUS_UN ( 'CASE_SELECTION' ), - AU_PLUS_UN ( 'CONTINGENCY_OPTIONS' ), - AU_PLUS_UN ( 'CONTINGENCY_SELECTION' ), - AU_PLUS_UN ( 'CONTINGENCY_PROCESSING' ), - AU_PLUS_UN ( 'N_PROCESSING_OPTIONS' ), - # AU_PLUS_UN ( 'N_1_LINES' ), - # AU_PLUS_UN ( 'N_1_LOADS' ), - # AU_PLUS_UN ( 'N_1_TRANSFORMERS' ), - - ), - ) # Fin JDC_CATA - -MODIFICATION_CATALOGUE = MACRO ( nom = "MODIFICATION_CATALOGUE", - sd_prod = pn.modification_catalogue, - op_init= pn.modification_catalogue2, - op=None, - UIinfo={"groupes":("CACHE")}, - Fonction=SIMP(statut='o', typ='TXM', into=['ajoutDefinitionMC']), - Etape=SIMP(statut='o', typ='TXM',), - Genea=SIMP(statut='o', typ='TXM', min=0, max='**'), - NomSIMP=SIMP(statut='o', typ='TXM',), - TypeSIMP=SIMP(statut='o', typ='TXM',), - PhraseArguments=SIMP(statut='o', typ='TXM',), -) -# -------------------------------------------------- -# fin entete -# -------------------------------------------------- -## TODO : RUN -CASE_SELECTION = MACRO ( nom = "CASE_SELECTION", - sd_prod = opsPSEN_N1.INCLUDE, - op_init = opsPSEN_N1.INCLUDE_context, - fichier_ini = 1, - op = None, - fr = "Sélectionnez les cas à analyser", - ang = 'Select the cases to analyze', - PSSE_path = SIMP(statut="o",typ='Repertoire',defaut='C:\Program Files (x86)\PTI\PSSE33\PSSBIN'), - output_folder = SIMP(statut="o", typ="Repertoire"), - - - BusesList = SIMP(statut = 'f', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - LinesList = SIMP(statut = 'f', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - TransformersList = SIMP(statut = 'f', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - MaxDepth = SIMP(statut = 'o', typ = 'I', defaut = 5), - OutputNewCsv = SIMP ( statut = "o",typ=bool,defaut=False,), - ) -N_PROCESSING_OPTIONS = PROC ( nom = 'N_PROCESSING_OPTIONS', - op = None, - ang = "Select whether the program should be displaying data about the different categories.\nThe values displayed will be the min, max, and mean of each item, plus a chart.", - Output_bus_values = SIMP(statut = 'o', typ = bool, defaut = True), - Output_lines_values = SIMP(statut = 'o', typ = bool, defaut = True), - Output_transformer_values = SIMP(statut = 'o', typ = bool, defaut = True), - Threshold_selection_for_the_treated_cases = FACT( - statut = 'f', - Branches = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), - Transformers = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), - High_voltage = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), - Low_voltage = SIMP(statut="o",typ=Tuple(3),defaut=(0,0,0),validators=VerifTypeTuple(('R','R','R'),),), - ), - ) - - -CONTINGENCY_OPTIONS = PROC (nom = 'CONTINGENCY_OPTIONS', - op = None, - - GeneralOptions = FACT(statut='o', - Vmin = SIMP(statut = 'o', typ = 'R', defaut = 0.9, val_min = 0), - Vmax = SIMP(statut = 'o', typ = 'R', defaut = 1.1, val_min = 0), - ContingencyRate = SIMP(statut = 'o', typ = 'TXM', defaut = 'a', into=['a', 'b']), - FlowLimitLines = SIMP(statut = 'o', typ = 'I', defaut = 120, val_min = 0), - FlowLimitTransformers = SIMP(statut = 'o', typ = 'I', defaut = 120, val_min = 0), - Tolerance = SIMP(statut = 'o', typ = 'R', defaut = 0.5, val_min = 0), - TripLines = SIMP(statut = 'o', typ = bool, defaut = True), - TripTransfos = SIMP(statut = 'o', typ = bool, defaut = True), - TripGenerators = SIMP(statut = 'o', typ = bool, defaut = True), - ), - - LoadFlowOptions = FACT(statut='o', - AdjustTaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Lock', '1 - Stepping', '2 - Direct'], defaut = '1 - Stepping'), - AdjustDCtaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable'], defaut = '1 - Enable'), - SolutionMethod = SIMP(statut = 'o', typ = 'TXM', into = ['0 - FDNS', '1 - FNSL', '2 - Optimized FDNS'], defaut = '1 - FNSL'), - AdjustSwitchedShunts = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable', '2 - Enable continuous mode'], defaut = '1 - Enable'), - DispatchMode = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Reserve', '2 - Pmax', '3 - Inertia', '4 - Droop'], defaut = '1 - Reserve'), - FlatStart = SIMP(statut = 'o', typ = bool, defaut = False), - VarLimits = SIMP(statut = 'o', typ = 'I', defaut = 99,ang = 'if set to -1, var limits will not be applied'), - ), - -# OutputOptions = FACT(statut='o', -# consigne1 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Output PSSE multiple contingency report to Shell?'), -# MultipleContingencyReport = SIMP(statut = 'o', typ = bool, defaut = True, ang = 'Output PSSE multiple contingency report to Shell?'), -# consigne2 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Write an Excel file for the results of each case file?'), -# WriteIndivExcels = SIMP(statut = 'o', typ = bool, defaut = True), -# consigne3 = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Add a tab in Excel results file for the differences between the max flow rate (MVAR) and the actual flow rate in lines and transformers?'), -# WriteFlowDifs = SIMP(statut = 'o', typ = bool, defaut = True), -# ), - ) - - - - -CONTINGENCY_SELECTION = PROC(nom='CONTINGENCY_SELECTION',op = None, - SelectionMethod = SIMP(statut='o',typ='TXM',into=['CaseSelectionFromFile','SelectAllCases','SelectWorstCases'], - ), - - b_file = BLOC(condition="SelectionMethod=='CaseSelectionFromFile'", - CaseSelectionFromFiles = FACT( - statut = 'o', - case = FACT(statut='o',max='**', - case_name=SIMP(statut='o',typ='TXM'), - csv_file= SIMP(statut='o', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)',),),), -# regles=(AU_MOINS_UN('branch_cases','transformer_cases','high_voltage_cases','low_voltage_cases',),), -# branch_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), -# transformer_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde',),), -# high_voltage_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), -# low_voltage_cases = SIMP(statut='o', defaut='', typ = ('Fichier', 'CSV file (*.csv);;All Files (*)','Sauvegarde'),), - ), -# ', -# CaseSelectionFromFile = FACT( -# statut = 'o', -# input_path = SIMP(statut="o",typ='Repertoire'), -# branch_cases = SIMP(statut='o', typ='TXM'), -# transformer_cases = SIMP(statut='o', typ='TXM'), -# high_cases = SIMP(statut='o', typ='TXM'), -# low_cases = SIMP(statut='o', typ='TXM'), -# ), - - ), - -# b_all = BLOC(condition="SelectionMethod=='SelectAllCases'", -# SelectAllCases = FACT( -# statut='o', -# all_cases = SIMP(statut='o', typ=bool, defaut = True), -# ), -# ), - - b_worst = BLOC(condition="SelectionMethod=='SelectWorstCases'", - SelectWorstCases = FACT( - regles = (AU_MOINS_UN('AvgBranchLoad', 'AvgBranchLoadPercent','AvgTransformerLoad','AvgTransformerLoadPercent','AvgHighVoltage', 'AvgHighVoltagePercent','AvgLowVoltage', 'AvgLowVoltagePercent'), - EXCLUS('AvgBranchLoad', 'AvgBranchLoadPercent'),EXCLUS('AvgTransformerLoad','AvgTransformerLoadPercent'),EXCLUS('AvgHighVoltage', 'AvgHighVoltagePercent'),EXCLUS('AvgLowVoltage', 'AvgLowVoltagePercent'),), - statut = 'o', - consigne = SIMP(statut='o',homo='information',typ = "TXM",defaut = 'Choose at least one of the potential selection criteria from the SelectWorstCases list on the right.'), - AvgBranchLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), - AvgBranchLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), - AvgTransformerLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), - AvgTransformerLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), - AvgHighVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), - AvgHighVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), - AvgLowVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0), - AvgLowVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100), - ), - ), - - - Automatic_N_2_Selection = FACT(statut='f', - - BusesList = SIMP(statut = 'o', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - LinesList = SIMP(statut = 'o', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - TransformersList = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - ), - - MultipleContingencyList = FACT (statut='f', - max="**", - ComponentList=SIMP(statut='o', typ = 'TXM', max='**', homo = 'SansOrdreNiDoublon',), - ), - - ) - -CONTINGENCY_PROCESSING = MACRO ( nom = 'CONTINGENCY_PROCESSING', - sd_prod = opsPSEN_N1.PROCESS, - op_init = opsPSEN_N1.PROCESS_context, - op = None, - fichier_ini = 1, - fr = "", - ang="", - XLS_file = SIMP(statut="f", typ = ('Fichier', 'XLS file (*.xls);;All Files (*)',),), - b_TabList = BLOC(condition="XLS_file != None and XLS_file != ''", - TabList = SIMP(statut = 'o', typ = 'TXM', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'), - - ), - - ) - -Ordre_Des_Commandes = ('CASE_SELECTION' , 'N_PROCESSING_OPTIONS' , 'CONTINGENCY_SELECTION', 'CONTINGENCY_OPTIONS' ,'CONTINGENCY_PROCESSING',) -Classement_Commandes_Ds_Arbre = ('CASE_SELECTION' , 'N_PROCESSING_OPTIONS' , 'CONTINGENCY_SELECTION', 'CONTINGENCY_OPTIONS' ,'CONTINGENCY_PROCESSING',) diff --git a/ProcessOutputs_Eficas/configuration_PSEN_N1.py b/ProcessOutputs_Eficas/configuration_PSEN_N1.py deleted file mode 100644 index e17d4912..00000000 --- a/ProcessOutputs_Eficas/configuration_PSEN_N1.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -# CONFIGURATION MANAGEMENT OF EDF VERSION -# ====================================================================== -# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# -# -# ====================================================================== -""" - Ce module sert pour charger les paramètres de configuration d'EFICAS -""" -# Modules Python -from InterfaceQT4 import configuration -import os - - -class CONFIG(configuration.CONFIG_BASE): - ## test - #----------------------------------- - def __init__(self,appli,repIni): - #----------------------------------- - - self.labels_user=['catalogues','lang'] - self.labels_eficas=['lang','rep_cata','catalogues','affiche'] - - configuration.CONFIG_BASE.__init__(self,appli,'.Eficas_monCode') - - -def make_config(appli,rep): - return CONFIG(appli,rep) - diff --git a/ProcessOutputs_Eficas/mesScripts_PSEN_N1.py b/ProcessOutputs_Eficas/mesScripts_PSEN_N1.py deleted file mode 100644 index 12bf5db9..00000000 --- a/ProcessOutputs_Eficas/mesScripts_PSEN_N1.py +++ /dev/null @@ -1,23 +0,0 @@ -def EficasProcessXLS(listeparam) : - print "dans processXLS" - item=listeparam[0] - dico=item.process_N1() - print dico - - print "version pour Pascale --> decommenter les 2 lignes suivantes pour Laura" - #from Processor import processXLS - #processXLS(dico) - - -# le dictionnaire des commandes a la structure suivante : -# la clef est la commande qui va proposer l action -# puis un tuple qui contient -# - la fonction a appeler -# - le label dans le menu du clic droit -# - un tuple contenant les parametres attendus par la fonction -# - appelable depuis Salome uniquement -) -# - appelable depuis un item valide uniquement -# - toolTip -dict_commandes={ - 'CONTINGENCY_PROCESSING': ( (EficasProcessXLS,"process",('editor','item',),False,True,"process values "),), - } diff --git a/ProcessOutputs_Eficas/opsPSEN_N1.py b/ProcessOutputs_Eficas/opsPSEN_N1.py deleted file mode 100644 index 9554556b..00000000 --- a/ProcessOutputs_Eficas/opsPSEN_N1.py +++ /dev/null @@ -1,195 +0,0 @@ - -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -from ExtractGeneratorLoadLineandTransfoDicoProcess import * -import os - -path1 = os.path.abspath(os.path.join(os.path.abspath(__file__), '../','TreatOutputs')) -sys.path.append(path1) -import Options - -def INCLUDE(self,PSSE_path,**args): - """ - Fonction sd_prod pour la macro INCLUDE - """ - CaseFolder = args['output_folder'] - Options.RecursiveDepth = args['MaxDepth'] - if CaseFolder==None: - return - reevalue=0 - if hasattr(self,'fichier_ini'): - reevalue=1 - if self.fichier_ini == CaseFolder : return - if hasattr(self,'old_context_fichier_init' ): - for concept in self.old_context_fichier_init.values(): - self.jdc.delete_concept(concept) - self.jdc_aux=None - self.contexte_fichier_init={} - self.reevalue_sd_jdc() - self.jdc.reset_context() - - self.fichier_ini=CaseFolder - self.contexte_fichier_init = {} - self.fichier_unite = 999 - self.fichier_err = None - self.fichier_text="" - - unite = 999 - - CaseFile = '' - FolderList = os.listdir(CaseFolder) - for folder in FolderList: - if folder[0:7] == 'package' or folder[0:4]== 'core': - # Get BaseCase.sav inside the first package folder we find - FolderContents = os.listdir(os.path.join(CaseFolder, folder)) - for file in FolderContents: - if file == 'BaseCase.sav': - CaseFile = os.path.join(os.path.join(CaseFolder, folder), file) - break - break - - - #try: - if 1 : - BusList, LinesList, TransfosList = getNominalkV(CaseFile) - #print "version en dur : decommenter la ligne suivante" - #getTrueLines(CaseFile) - #except Exception, e: - # exc_type, exc_obj, exc_tb = sys.exec_info() - # print(e) - # print(exc_type, exc_tb.tb_lineno) - - - for e in self.jdc.etapes: - if e.nom == 'CASE_SELECTION' : - etape=e - break - self.jdc.editor.changeIntoMC(e, 'BusesList', BusList) - self.jdc.editor.changeIntoMC(e, 'LinesList', LinesList) - self.jdc.editor.changeIntoMC(e, 'TransformersList', TransfosList) - - self.jdc.editor.changeIntoDefMC('CONTINGENCY_SELECTION', ('Automatic_N_2_Selection', 'BusesList'), BusList) - self.jdc.editor.changeIntoDefMC('CONTINGENCY_SELECTION', ('Automatic_N_2_Selection', 'LinesList'), LinesList) - self.jdc.editor.changeIntoDefMC('CONTINGENCY_SELECTION', ('Automatic_N_2_Selection', 'TransformersList'), TransfosList) - - - try: - print "version en dur : decommenter la ligne suivante" - #a = updateConts() - self.jdc.editor.changeIntoDefMC('CONTINGENCY_SELECTION', ('MultipleContingencyList', 'ComponentList'), Options.ContFullList) - except Exception as e: - exc_type, exc_obj, exc_tb = sys.exec_info() - print(e) - print(exc_type, exc_tb.tb_lineno) - - - - - -def INCLUDE_context(self,d): - """ - Fonction op_init pour macro INCLUDE - """ - for k,v in self.g_context.items(): - d[k]=v - - -def PROCESS_context(self,d): - print "dans le init du Process" - if self.get_child('XLS_file').valeur == "" or self.get_child('XLS_file').valeur== None : return - self.OngletsSelectionnes= self.get_child('b_TabList').get_child('TabList').valeur - print "fin de PROCESS_context" - -def PROCESS(self,XLS_file,**args): - - # self = Accas.A_MACRO_ETAPE.MACRO_ETAPE - self.sauve_args=args - if XLS_file == "" or XLS_file == None: return - #print XLS_file - #Storage.csvFileName = XLS_file - # c est la premiere fois - - if not (hasattr(self,'sheets')) : - #print 'attention en dur' - #from Processor_Storage import * - #print getSheets - #getSheets() - #ComponentList, ContingencyList = getComponentandContingencyList(Storage.sheets[0]) - #print ComponentList - #print ContingencyList - #Storage.selectedDoubleRow[Storage.sheets[0]]=['PV MATIMBA'] - #Storage.selectedDoubleCol[Storage.sheets[0]]=['MAZENOD_MHDAM_LI1_'] - #self.jdc.editor.changeIntoMC(self,'TabList',Storage.sheets) - #self.sheets=Storage.sheets - #self.OngletsValeurs=[] - - from Processor import getXLSinfo - self.sheets = getXLSinfo(XLS_file) - self.jdc.editor.changeIntoMC(self,'TabList',self.sheets.keys(),('b_TabList',)) - - self.MCAjoutes=[] - self.OngletsSelectionnes=[] - - else : - # On a selectionne un onglet - # On teste si on a modifie la liste des onglets - - nouveauxOngletsSelectionnes= self.get_child('b_TabList').get_child('TabList').valeur - if nouveauxOngletsSelectionnes==self.OngletsSelectionnes : return - if nouveauxOngletsSelectionnes==() or nouveauxOngletsSelectionnes == [] : - for MC in self.MCAjoutes : self.jdc.editor.deleteMC(self,MC,('b_TabList',)) - self.MCAjoutes=[] - self.OngletsSelectionnes=[] - self.jdc.editor.fenetreCentraleAffichee.reaffiche() - return - - for Onglet in nouveauxOngletsSelectionnes: - if Onglet in self.OngletsSelectionnes : continue - - MCFils='Component_List_For_'+Onglet - monInto=self.sheets[Onglet][0] - self.jdc.editor.ajoutDefinitionMC('CONTINGENCY_PROCESSING',('b_TabList',),MCFils,'TXM',min=0, max='**', into=monInto, homo= 'SansOrdreNiDoublon') - self.jdc.editor.ajoutMC(self,MCFils,[],('b_TabList',)) - self.MCAjoutes.append(MCFils) - - MCFils='Contingency_List_For_'+Onglet - monInto=self.sheets[Onglet][1] - self.jdc.editor.ajoutDefinitionMC('CONTINGENCY_PROCESSING',('b_TabList',),MCFils,'TXM',min=0, max='**', into=monInto, homo= 'SansOrdreNiDoublon') - self.jdc.editor.ajoutMC(self,MCFils,[],('b_TabList',)) - self.MCAjoutes.append(MCFils) - - - for Onglet in self.OngletsSelectionnes: - if Onglet in nouveauxOngletsSelectionnes : continue - - MCFils='Contingency_List_For_'+Onglet - self.jdc.editor.deleteMC(self,MCFils,('b_TabList',)) - self.jdc.editor.deleteDefinitionMC('CONTINGENCY_PROCESSING',('b_TabList',),MCFils) - self.MCAjoutes.remove(MCFils) - - MCFils='Component_List_For_'+Onglet - self.jdc.editor.deleteMC(self,MCFils,('b_TabList',)) - self.jdc.editor.deleteDefinitionMC('CONTINGENCY_PROCESSING',('b_TabList',),MCFils) - self.MCAjoutes.remove(MCFils) - - self.OngletsSelectionnes=nouveauxOngletsSelectionnes - self.jdc.editor.fenetreCentraleAffichee.reaffiche() - diff --git a/ProcessOutputs_Eficas/prefs.py b/ProcessOutputs_Eficas/prefs.py deleted file mode 100644 index 647d0ae9..00000000 --- a/ProcessOutputs_Eficas/prefs.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2007-2012 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -code="PSEN_N1" -import sys, os -if os.path.dirname(os.path.abspath(__file__)) not in sys.path : - sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/ProcessOutputs_Eficas/prefs_PSEN_N1.py b/ProcessOutputs_Eficas/prefs_PSEN_N1.py deleted file mode 100644 index ffebe865..00000000 --- a/ProcessOutputs_Eficas/prefs_PSEN_N1.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -# CONFIGURATION MANAGEMENT OF EDF VERSION -# ====================================================================== -# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# -# -# ====================================================================== - -import os,sys -# repIni sert a localiser le fichier editeur.ini -# Obligatoire -repIni=os.path.dirname(os.path.abspath(__file__)) -INSTALLDIR=os.path.join(repIni,'..') -sys.path[:0]=[INSTALLDIR] - - -# lang indique la langue utilisee pour les chaines d'aide : fr ou ang -lang='en' #'fr' - -# Codage des strings qui accepte les accents (en remplacement de 'ascii') -encoding='iso-8859-1' -docPath=repIni - -affiche='ordre' - -# -catalogues=( - ('PSEN_N1','default',os.path.join(repIni,'PSEN_Cata_N1.py'),'ProcessOutputs','python'), -) diff --git a/ProcessOutputs_Eficas/properties.py b/ProcessOutputs_Eficas/properties.py deleted file mode 100644 index 1d328a46..00000000 --- a/ProcessOutputs_Eficas/properties.py +++ /dev/null @@ -1,24 +0,0 @@ -#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR -# RESPONSABLE D6BHHHH J-P.LEFEBVRE -# ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# ====================================================================== -# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR -# DE LA VERSION DU CODE_ASTER ASSOCIE -#---------------------------------------------------------------------- -version = "1.2" -date = "25/05/2010" -exploit = False diff --git a/ProcessOutputs_Eficas/qtEficas_PSEN_N1.py b/ProcessOutputs_Eficas/qtEficas_PSEN_N1.py deleted file mode 100755 index 948867b5..00000000 --- a/ProcessOutputs_Eficas/qtEficas_PSEN_N1.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -""" - Ce module sert a lancer EFICAS configure pour Code_Aster -""" -# Modules Python -# Modules Eficas - -import sys,os -#sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) -import prefs -name='prefs_'+prefs.code -__import__(name) - -#acceder scripts de Lucie -path1 = os.path.abspath(os.path.join(os.path.abspath(__file__),'TreatOutputs')) -path1 = 'C:\\Logiciels DER\\PSEN_V15\\Code\\ProcessOutputs_Eficas\TreatOutputs' -sys.path.append(path1) - -print ('kjlkjlkjkl') -print ('kjlkjlkjkl') -print ('kjlkjlkjkl') -print ('kjlkjlkjkl') -print ('kjlkjlkjkl') -print ('kjlkjlkjkl') -print ('kjlkjlkjkl') - -from InterfaceQT4 import eficas_go -if __name__ == '__main__': eficas_go.lance_eficas(code=prefs.code) diff --git a/SPECA/SPECA_Cata_V1.py b/SPECA/SPECA_Cata_V1.py deleted file mode 100644 index 72771cf5..00000000 --- a/SPECA/SPECA_Cata_V1.py +++ /dev/null @@ -1,542 +0,0 @@ -## -*- coding: utf-8 -*- -# -## -------------------------------------------------- -## debut entete -## -------------------------------------------------- -# -from Accas import * - - -# rend disponible le type tuple (liste) -import types -class Tuple: - def __init__(self,ntuple): - self.ntuple=ntuple - - def __convert__(self,valeur): - if type(valeur) == types.StringType: - return None - if len(valeur) != self.ntuple: - return None - return valeur - - def info(self): - return "Tuple de %s elements" % self.ntuple - - __repr__=info - __str__=info - - - -# -#CONTEXT.debug = 1 - -VERSION_CATALOGUE="2.0.0"; - -JdC = JDC_CATA ( code = 'SPECA', - execmodul = None, - regles=(AU_MOINS_UN('SPECIFICATION_ANALYSE',), - AU_PLUS_UN('SPECIFICATION_ANALYSE',), - ), - )# Fin JDC_CATA - -## ----- SPECIFICATION DE L'ETUDE ----- ## -SPECIFICATION_ANALYSE= MACRO (nom = 'SPECIFICATION_ANALYSE', - op = None, - UIinfo = {"groupes":("Machine tournante",)}, - fr = "Specification des analyses", - TYPE_ANALYSE = SIMP(statut='o', typ='TXM',into=('STATIQUE', 'MODALE', 'HARMONIQUE', 'TRANSITOIRE', 'TRANSITOIRE_ACCIDENTEL','SYNTHESE')), - # pour V1.1 flexion uniquement - TYPE_COMPORTEMENT = BLOC(condition = "TYPE_ANALYSE in ('MODALE','HARMONIQUE','STATIQUE','TRANSITOIRE','TRANSITOIRE_ACCIDENTEL','SYNTHESE')", - FLEXION = SIMP(statut='o',typ='TXM',into=('OUI',),defaut='OUI',fr="Inclure la flexion ?"), - TORSION = SIMP(statut='f',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Inclure la torsion ?"), - COMPRESSION = SIMP(statut='f',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Inclure la compression ?"), - ), -### ----- CALCUL STATIQUE ----- ## - ANALYSE_STATIQUE = BLOC(condition = "TYPE_ANALYSE == 'STATIQUE' ", - - POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), - CHARGES = SIMP(statut='o',typ='TXM',into=('DELIGNAGE','FORCE','AUCUNE'),defaut=None,fr="Choix d'application d'une charge"), - DELIGNAGE = BLOC(condition = "CHARGES == 'DELIGNAGE' ",fr="Application d'un delignage", - PARAM_DELIGNAGE = FACT(statut='o',min=1,max='**',fr="Parametres du delignage", - NOM_PALIER = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom d'un palier deligne"), - #VALEURS = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des valeurs du delignage du palier"), - DX = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du DX du delignage du palier"), - DY = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du DY du delignage du palier"), - ), # fin PARAM_DELIGNAGE - ), # fin DELIGNAGE - # min=1,max=2, - FORCE = BLOC(condition = "CHARGES == 'FORCE' ",fr="Application d'une force", - PARAM_FORCE = FACT(statut='o',min=1,max='**',fr="Parametres de la force", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la coordonnee de la force"), - MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement de la magnitude de la force"), - FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), - ), # fin PARAM_FORCE - ), # fin FORCE - ## fin specification calcul statique - - ## POST-TRAITEMENTS DU CALCUL STATIQUE - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Choix du type de post-traitement", - TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','REAC_NODA','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), - DEPL = BLOC(condition="TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement",regles=UN_PARMI('POSITION','PALIER'), - POSITION = SIMP(statut='f',typ='R',defaut=None,fr="Renseignement de la coordonnee du deplacement"), - PALIER = SIMP(statut='f',max='**',typ='TXM',defaut=None,fr="Renseignement du nom du palier"), - ), # fin DEPL - CONTRAINTES = BLOC(condition="TYPE == 'CONTRAINTES' ",fr="Contraintes",regles=UN_PARMI('POSITION','ZONE','TOUT'), - POSITION = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), - ZONE = SIMP(statut='f',typ='TXM',defaut=None,fr="Renseignement de la zone de la contrainte"), - TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),fr="Choix de toutes les containtes"), - ), # fin CONTRAINTES - #REAC_NODA = BLOC(condition="TYPE == 'REAC_NODA' ", fr="Reaction nodale",regles=UN_PARMI('POSITION','ZONE','TOUT'), - #REAC_NODA = BLOC(condition="TYPE == 'REAC_NODA' ", fr="Reaction nodale",regles=UN_PARMI('POSITION','TOUT'), - REAC_NODA = BLOC(condition="TYPE == 'REAC_NODA' ", fr="Reaction nodale",regles=UN_PARMI('POSITION','PALIER'), - POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la reaction"), - #ZONE = SIMP(statut='f',typ='TXM',defaut=None,fr="Renseignement de l'etiquette de la zone de la reaction"), - PALIER = SIMP(statut='f',max='**',typ='TXM',defaut=None,fr="Renseignement du nom du palier"), - ), # fin REAC_NODA - ), # fin POST_TRAITEMENT - ## fin bloc POST_TRAITEMENTS - - ),# fin ANALYSE_STATIQUE - -### ----- CALCUL MODALE ----- ## - ANALYSE_MODALE = BLOC(condition = "TYPE_ANALYSE == 'MODALE' ", - BASE_CALCUL = SIMP(statut='o',typ="TXM",into=('MODALE','PHYSIQUE'),defaut=None,fr="Choix de la base du calcul modal"), - BASE_MODALE = BLOC(condition="BASE_CALCUL=='MODALE'",fr="Calcul sur base modale", - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES=SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de mode"), - FREQ_MAX=SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale"), - ), # fin BASE_MODALE - AMORTISSEMENT = SIMP(statut='o',typ='TXM',min=1,max=1,into=('OUI','NON'),defaut='OUI',fr="Choix de prise en compte de l'amortissment"), - GYROSCOPIE = SIMP(statut='o',typ='TXM',min=1,max=1,into=('OUI','NON'),defaut='OUI',fr="Choix de prise en compte de la gyroscopie"), - VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste des vitesses de rotation (tr/min)"), - OPTION_CALCUL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('PLUS_PETITE','CENTRE'),defaut=None,fr="Choix de l'option de calcul"), - # 20121018 EDF demande de retirer cette option : l'option bande ne fonctionne pas avec MODE_ITER_SIMULT - #OPTION_CALCUL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('BANDE','PLUS_PETITE','CENTRE'),defaut=None,fr="Choix de l'option de calcul"), - #BANDE = BLOC(condition="OPTION_CALCUL=='BANDE'",fr="Option BANDE", - # FREQ_MIN = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence minimale (Hz)"), - # FREQ_MAX = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale (Hz)"), - #), # fin BANDE - PLUS_PETITE = BLOC(condition="OPTION_CALCUL=='PLUS_PETITE'",fr="Option PLUS_PETITE", - NMAX_FREQ = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre maximal de frequence"), - ), # fin PLUS_PETITE - CENTRE = BLOC(condition="OPTION_CALCUL=='CENTRE'",fr="Option CENTRE", - FREQ = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence centrale (Hz)"), - NMAX_FREQ = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre maximal de frequence"), - ), # fin CENTRE - METHODE=SIMP(statut='f',typ='TXM',min=1,max=1,into=('QZ','SORENSEN'),defaut='SORENSEN',fr="Choix de la méthode de résolution"), - - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Choix du type de post-traitement", - TYPE = SIMP(statut='o',typ='TXM',defaut=None,into=('TABLEAU_PARAM_MODAUX','DIAG_CAMPBELL'),), - #TABLEAU_PARAM_MODAUX = SIMP(statut='f',typ='TXM',min=1,max=1,defaut=None,into=('SIMPLE','COMPLET'),fr="Choix du type de tableau"), - TABLEAU_PARAM_MODAUX = BLOC(condition = "TYPE == 'TABLEAU_PARAM_MODAUX'",fr="Choix du type de tableau", - TABLEAU = SIMP(statut='o',max=1,typ='TXM',defaut='SIMPLE',into=('SIMPLE','COMPLET'),), - ), # fin TABLEAU_PARAM_MODAUX - DIAG_CAMPBELL = BLOC(condition = "TYPE == 'DIAG_CAMPBELL'", fr = "Choix des options du diagramme de Campbell", - PRECESSION = SIMP(statut='o',typ='TXM',max=1,defaut=None,into=('SOMME','PLUS_GRANDE_ORBITE'),), - SUIVI = SIMP(statut='o',typ='TXM',max=1,defaut=None,into=('SANS_TRI','TRI_PREC','TRI_FORM_MOD'),), - # 20121018 ajout de NB_MODES a la demande de Ionel Nistor - NB_MODES = SIMP(statut='o',typ='I',max=1,defaut=None,fr="Nombre de modes affiches dans le diagramme, doit etre inferieur au nombre de modes calcules"), - ), # fin DIAG_CAMPBELL - #DIAG_CAMPBELL = SIMP(statut='f',typ='TXM',min=1,max=1,defaut=None,into=('OUI','NON'),fr="Choix de calcul du diagramme de Campbell (uniquement si plusieurs vitesses de rotation ont ete renseignees)",), - ), # fin POST_TRAITEMENTS - - - ), # fin ANALYSE_MODALE - -## ----- CALCUL HARMONIQUE ----- ## - ANALYSE_HARMONIQUE = BLOC(condition = "TYPE_ANALYSE == 'HARMONIQUE' ",fr="Analyse harmonique", - - ## specification calcul harmonique - BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('PHYSIQUE','MODALE'),defaut=None,fr="Choix de la base du calcul harmonique"), - BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Calcul harmonique sur base modale", - #MODALE = FACT(statut='o', - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de mode"), - FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale"), - #),# fin MODALE - ),# fin BASE_MODALE - AMORTISSEMENT_P = BLOC(condition = "BASE_CALCUL == 'PHYSIQUE' ", - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - ), # fin AMORTISSEMENT_P - AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - # cft modif 20130603 - #AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - # LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), - #),# fin AMOR_REDUIT - AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - #AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), - AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes"), - ),# fin AMOR_MODALE - ), # fin AMORTISSEMENT_M - VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste des vitesses de rotation"), - # 20121018 retrait de defaut_fn a la demande de EDF - #CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','HARMONIQUE','DEFAUT_FN','EXTERNE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), - #CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','DELIGNAGE','HARMONIQUE','EXTERNE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), - CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','HARMONIQUE','EXTERNE','AUCUNE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), - BALOURD = BLOC(condition = "CHARGES == 'BALOURD' ",fr="Charge balourd appliquee", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge balourd"), - MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la magnitude de la charge balourd (en kg.m)"), - FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge balourd (autant de valeurs que de vitesses de rotation)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (en degres)"), - ),# fin BALOURD - # 20121106 retrait de delgnage a le demande de EDF - #DELIGNAGE = BLOC(condition = "CHARGES == 'DELIGNAGE' ",fr="Application d'un delignage", - #PARAM_DELIGNAGE = FACT(statut='o',min=1,max='**',fr="Parametres du delignage", - #PALIERS = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom d'un palier deligne"), - #VALEURS = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des valeurs du delignage du palier"), - #), # fin PARAM_DELIGNAGE - #), # fin DELIGNAGE - HARMONIQUE = BLOC(condition = "CHARGES == 'HARMONIQUE' ",fr="Charge harmonique appliquee", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge harmonique"), - PUIS_PULS = SIMP(statut='o',typ='I',min=1,max=1,into=(0,1,2),defaut=None,fr="Renseignement de la puissance de pulsation de la charge harmonique"), - PULSATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la pulsation d'excitation harmonique (en rad/s)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la magnitude de la charge harmonique, (unite : N.s^i (avec i = PUIS_PULS))"), - FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge harmonique (autant de valeurs que de vitesses de rotation)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (en degres)"), - TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY'),defaut=None,fr="Renseignement du type de DDL excite sur lequel porte la charge"), - ), # fin HARMONIQUE - # 20121018 retrait de defaut_fn a la demande de EDF - #DEFAUT_FN = BLOC(condition = "CHARGES == 'DEFAUT_FN' ",fr="Charge defaut de fibre neutre appliquee", - #POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du defaut de fibre neutre"), - #TR_Y = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du vecteur de translation en Y du defaut de fibre neutre"), - #TR_Z = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du vecteur de translation en Z du defaut de fibre neutre"), - #ROT_Y = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du moment de rotation en Y du defaut de fibre neutre"), - #ROT_Z = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du moment de rotation en Z du defaut de fibre neutre"), - #), # fin DEFAUT_FN - EXTERNE = BLOC(condition = "CHARGES == 'EXTERNE' ",fr="Charge externe appliquee", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge externe"), - FONC_APPLI = SIMP(typ=('Fichier','Charge Externe (*.csv)'),docu='',min=1,max=1,statut='o',defaut=None,fr="Renseignement de la fonction appliquee à la charge externe (fichier cvs)"), - ), # fin EXTERNE - ## fin secification calcul harmonique - - # test cft 20120531 - ## POST-TRAITEMENTS DU CALCUL HARMONIQUE - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Choix du type de post-traitement", - #TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), - # 2012119 retrait de DEPL_ABS - #TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_RELA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), - # 20130513 ajout de REAC_NODA - TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_RELA','REAC_NODA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), - DEPL = BLOC(condition = "TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement",regles=UN_PARMI('POSITION','PALIER'), - POSITION = SIMP(statut='f',typ='R',defaut=None,fr="Renseignement de la coordonnee du deplacement"), - PALIER = SIMP(statut='f',max='**',typ='TXM',defaut=None,fr="Renseignement du nom du palier"), - ), # fin DEPL - # pas d'options pour EFFORTS_PAL et REAC_NODA - #EFFORTS_PAL = BLOC(condition = "TYPE == 'EFFORTS_PAL'", fr = "Efforts paliers", - #PALIER = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), - #), # fin EFFORTS_PAL - # BASE_CALCUL == 'MODALE' - CONTRAINTES = BLOC(condition="TYPE == 'CONTRAINTES' ",fr="Contraintes",regles=UN_PARMI('POSITION','ZONE','TOUT'), - POSITION = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), - ZONE = SIMP(statut='f',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la zone de la contrainte"), - TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),min=1,max=1,fr="Renseignement de la contrainte"), - ), # fin CONTRAINTES - ), - ## fin bloc POST_TRAITEMENTS - - ),# fin ANALYSE_HARMONIQUE - -### ----- CALCUL TRANSITOIRE ----- ## - ANALYSE_TRANSISTOIRE = BLOC(condition = "TYPE_ANALYSE == 'TRANSITOIRE' ",fr="Analyse transitoire", - POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), - VITESSE = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,into=('CONSTANTE','VARIABLE'),fr="Renseignement du type de vitesse de rotation"), - BASE_C = BLOC(condition ="VITESSE == 'CONSTANTE'", - BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('PHYSIQUE','MODALE'),defaut=None,fr="Choix de la base du calcul transitoire"), - BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Calcul transitoire sur base modale", - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de mode"), - FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale"), - ),# fin BASE_MODALE - AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - # cft modif 20130603 - #AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - # LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), - #),# fin AMOR_REDUIT - AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes"), - ),# fin AMOR_MODALE - ), # fin AMORTISSEMENT_M - ), # fin BASE_C - BASE_V = BLOC(condition ="VITESSE == 'VARIABLE'", - BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('MODALE'),defaut='MODALE',fr="Choix de la base du calcul transitoire"), - BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Calcul transitoire sur base modale", - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de mode"), - FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale"), - ),# fin BASE_MODALE - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - # cft modif 20130603 - #AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - # LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), - #),# fin AMOR_REDUIT - AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - #AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), - AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes"), - ),# fin AMOR_MODALE - ), # fin BASE_C - #BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Calcul transitoire sur base modale", - # regles=UN_PARMI('NB_MODES','FREQ_MAX'), - # NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de mode"), - # FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale"), - #),# fin BASE_MODALE - # cft modif 20130603 - - #AMORTISSEMENT_P = BLOC(condition = "BASE_CALCUL == 'PHYSIQUE' ", - # AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - #), # fin AMORTISSEMENT_P - #AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", - # AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - # # cft modif 20130603 - # #AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - # # LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), - # #),# fin AMOR_REDUIT - # AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - # AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), - # ),# fin AMOR_MODALE - #), # fin AMORTISSEMENT_M - - - #AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL','REDUIT'),defaut=None,fr="Choix du type d'amortissement"), - #AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - # LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), - #),# fin AMOR_REDUIT - #AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - # AMOR_REDUIT = SIMP(statut='o', typ='R', min=1,max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), - #),# fin AMOR_MODALE - #VITESSE = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,into=('CONSTANTE','VARIABLE'),fr="Renseignement du type de vitesse de rotation"), - VITESSE_CONSTANTE = BLOC(condition = "VITESSE == 'CONSTANTE' ", fr="Vitesse de rotation constante", - VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation"), - ),# fin VITESSE_CONSTANTE - VITESSE_VARIABLE = BLOC(condition = "VITESSE == 'VARIABLE' ", fr="Vitesse de rotation variable", regles=UN_PARMI('LINEAIRE','EXPONENTIELLE','FORMULE'), - LINEAIRE = FACT(statut='f',min=1,max=1,fr="Renseignement de la fonction lineaire de la vitesse de rotation", - VITESSE_INITIALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation initiale (en tr/min)",), - VITESSE_FINALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation finale (en tr/min)",), - DEPHASAGE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la postion angulaire (en degre)"), - PAS_MAJ = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement du pas (ou liste) de mise a jour des matrices des paliers (en tours)"), - ),# fin LINEAIRE - EXPONENTIELLE = FACT(statut='f',min=1,max=1,fr="Renseignement de la fonction exponentielle de la vitesse de rotation", - VITESSE_INITIALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation initiale (en tr/min)",), - VITESSE_FINALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation finale (en tr/min)",), - DEPHASAGE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la postion angulaire (en degre)"), - LAMBDA = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du parametre de l'exponentielle"), - PAS_MAJ = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement du pas (ou liste) de mise a jour des matrices des paliers (en tours)"), - ),# fin VITESSE_EXPONENTIELLE - FORMULE = FACT(statut='f',min=1,max=1,fr="Renseignement de la fonction de la vitesse de rotation", - FICHIER = SIMP(statut='o',typ=('Fichier','Formule vitesse rotation (*.*)'),min=1,max=1,defaut=None,fr="Renseignement du fichier contenant les fonctions de la vitesse de rotation"), - OM = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule de position angulaire (max 8 caractere)"), - PHI = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule de vitesse angulaire (max 8 caractere)"), - ACC = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule d'acceleration angulaire (max 8 caractere)"), - PAS_MAJ = SIMP(statut='f',typ='R',min=1,max='**',defaut=None,fr="Renseignement du pas (ou liste) de mise a jour des matrices des paliers (en tours)"), - ),# fin VITESSE_EXPONENTIELLE - ),# fin VITESSE_VARIABLE - #POIDS_PROPRE = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Choix d'application du poids propre (pesanteur)"), - # 20121018 retrait de defaut_fn a la demande de EDF - #CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','DEFAUT_FN','DELIGNAGE','EXTERNE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), - # 20121119 retrait de delignage - #CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','DELIGNAGE','EXTERNE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), - CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','FORCE','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), - BALOURD = BLOC(condition = "CHARGES == 'BALOURD' ",fr="Charge balourd appliquee", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge balourd"), - MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la magnitude de la charge balourd (en kg.m)"), - FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge balourd (autant de valeurs que de vitesses de rotation)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (en degres)"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseigner l'instant pour déclencher le balourd"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseigner le temps pour la montée jusqu'à la valeur finale du balourd"), - ),# fin BALOURD - FORCE = BLOC(condition = "CHARGES == 'FORCE' ",fr="Application d'une force", - PARAM_FORCE = FACT(statut='o',min=1,max='**',fr="Parametres de la force", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la coordonnee de la force"), - MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement de la magnitude de la force"), - FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), - ), # fin PARAM_FORCE - ), # fin FORCE - HARMONIQUE = BLOC(condition = "CHARGES == 'HARMONIQUE' ",fr="Charge harmonique appliquee", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge harmonique"), - PUIS_PULS = SIMP(statut='o',typ='I',min=1,max=1,into=(0,1,2),defaut=None,fr="Renseignement de la puissance de pulsation de la charge harmonique"), - PULSATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la pulsation d'excitation harmonique (en rad/s)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la magnitude de la charge harmonique, (unite : N.s^i (avec i = PUIS_PULS)"), - FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge harmonique (autant de valeurs que de vitesses de rotation)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (en degres)"), - TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY'),defaut=None,fr="Renseignement du type de DDL excite sur lequel porte la charge"), - ), # fin HARMONIQUE - # 20121018 retrait de defaut_fn a la demande de EDF - #DEFAUT_FN = BLOC(condition = "CHARGES == 'DEFAUT_FN' ",fr="Charge defaut de fibre neutre appliquee", - #POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du defaut de fibre neutre"), - #TR_Y = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du vecteur de translation en Y du defaut de fibre neutre"), - #TR_Z = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du vecteur de translation en Z du defaut de fibre neutre"), - #ROT_Y = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du moment de rotation en Y du defaut de fibre neutre"), - #ROT_Z = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du moment de rotation en Z du defaut de fibre neutre"), - #), # fin DEFAUT_FN - # 20121119 retrait de delignage - #DELIGNAGE = BLOC(condition = "CHARGES == 'DELIGNAGE' ",fr="Application d'un delignage", - #PARAM_DELIGNAGE = FACT(statut='o',min=1,max='**',fr="Parametres du delignage", - #PALIERS = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom d'un palier deligne"), - #VALEURS = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des valeurs du delignage du palier"), - #), # fin PARAM_DELIGNAGE - #), # fin DELIGNAGE - # retrait force fichier externe - #EXTERNE = BLOC(condition = "CHARGES == 'EXTERNE' ",fr="Charge externe appliquee", - #POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge externe"), - #FONC_APPLI = SIMP(typ=('Fichier','Charge Externe (*.csv)'),docu='',min=1,max=1,statut='o',defaut=None,fr="Renseignement de la fonction appliquee à la charge externe (fichier cvs)"), - #), # fin EXTERNE - ETAT_INIT = FACT(statut='o',fr="Renseignement de l'etat initial", - #RESULTAT = SIMP(statut='o',typ=('sd_resultat'),max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), - RESULTAT = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), - INST_INIT = SIMP(statut='f',typ='R',max=1,defaut=0.0,fr="Renseignement de l'instant initial"), - ), # fin ETAT_INIT - PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS','LISTE'),defaut=None,fr="Choix du type de parametrage temporel"), - #PAS = BLOC(condition = "VITESSE == 'VARIABLE'",fr="Renseignement des parametres des pas", - PAS = BLOC(condition = "PARAM_TEMPS == 'PAS'",fr="Renseignement des parametres des pas", - TEMPS_PAS = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps (en s)"), - INST_INI = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de l'instant initial du pas"), - INST_FIN = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de l'instant final du pas"), - ), # fin TEMPS_PAS - LIST_INST = BLOC(condition = "PARAM_TEMPS == 'LISTE'",fr="Renseignement d'une liste de pas", - LISTE = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement d'une liste de pas"), - ), # fin LIST_INST - PAS_ARCHIVAGE = SIMP(statut='o',typ='I',max=1,defaut=None,fr="Renseignement du pas d'archivage",), - SCHEMA_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('NEWMARK','EULER','WILSON','ADAPT_ORDRE1','ADAPT_ORDRE2','DIFF_CENTRE'),defaut='NEWMARK',fr="Choix d'un schema temporel"), - NEWMARK = BLOC(condition = "SCHEMA_TEMPS == 'NEWMARK' ",fr="Choix de la methode de NEWMARK", - BETA = SIMP(statut='f',typ='R',max=1,defaut=0.25,fr="Renseignement de la valeur beta pour la methode de NEWMARK"), - GAMMA = SIMP(statut='f',typ='R',max=1,defaut=0.25,fr="Renseignement de la valeur gamma pour la methode de NEWMARK"), - ),# fin NEWMARK - WILSON = BLOC(condition = "SCHEMA_TEMPS == 'WILSON' ",fr="Choix de la methode de WILSON", - THETA = SIMP(statut='f',typ='R',max=1,defaut=1.4,fr="Renseignement de la valeur theta pour la methode de WILSON"), - ), # fin WILSON - #Ionel le 19122012, FISSURE n'est pas dans la V1 - #FISSURE = BLOC(condition = "BASE_CALCUL == 'MODALE' ",fr="Choix de calcul avec fissure", - # EMPLACEMENT = FACT(statut='o',fr="Renseignement de l'emplacement de la fissure", - # regles=UN_PARMI('POSITION','NOEUD'), - # POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la fissure"), - # NOEUD = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du noeud de la fissure"), - # ), # fin EMPLACEMENT - # VITE_ROTA = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de ?? "), - # ANGL_INIT = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de ?? "), - # K_PHI = SIMP(statut='o',typ=('Fichier','K.PHI (*.*)'),docu='',min=1,max=1,defaut=None,fr="Renseignement de la loi de comportement en raideur de la fissure"), - # DK_DPHI = SIMP(statut='o',typ=('Fichier','DK.DPHI (*.*)'),docu='',min=1,max=1,defaut=None,fr="Renseignement de la deivee de la loi de comportement en raideur de la fissure"), - #), # fin FISSURE - - ## POST_TRAITEMENTS de l'analyse transitoire - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Choix des post-traitements", - TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), - DEPL = BLOC(condition = "TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement",regles=UN_PARMI('POSITION','PALIER'), - #POSITION_DEPL = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du deplacement"), - POSITION = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du deplacement"), - PALIER = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), - ), # fin DEPL - # 20121119 pas de mots-cles specifique pour efforts_paliers - #EFFORTS_PAL = BLOC(condition = "TYPE == 'EFFORTS_PAL'", fr = "Efforts paliers", - #PALIER = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), - #), # fin EFFORTS_PAL - CONTRAINTES = BLOC(condition = "TYPE == 'CONTRAINTES' ",fr="Contraintes", - regles=UN_PARMI('POSITION','ZONE','TOUT'), - POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), - ZONE = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette de la zone de la contrainte"), - TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),max=1,fr="tout"), - ), # fin CONTRAINTES - ), # fin POST_TRAITEMENTS - - ), # fin ANALYSE_TRANSISTOIRE - - -### ----- CALCUL COUPLE CODE_ASTER/EYDOS ----- ## - ANALYSE_TRANSITOIRE_ACCIDENTEL = BLOC(condition = "TYPE_ANALYSE == 'TRANSITOIRE_ACCIDENTEL' ",fr="Analyse transitoire accidentelle", - #BASE_MODALE = FACT(statut='o', fr="Choix des parametres de la base modale", - POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), - BASE_MODALE = BLOC(condition = "True", fr="Choix des parametres de la base modale", - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de mode"), - FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale"), - ),# fin BASE_MODALE - # cft 20131217 suppression amortissement reduit - #AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL','REDUIT'),defaut=None,fr="Choix du type d'amortissement"), - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - #LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), - LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements modaux reduits (en %), la taille de la liste doit etre egale au nombre de modes"), - ),# fin AMOR_REDUIT - VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation"), - #POIDS_PROPRE = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Choix d'application du poids propre (pesanteur)"), - # 20121018 retrait de defaut_fn a la demande de EDF - #CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','DEFAUT_FN','DELIGNAGE','EXTERNE','EFFORTS_PALIERS'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), - #CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','DELIGNAGE','EXTERNE','EFFORTS_PALIERS'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), - CHARGES = SIMP(statut='o',typ='TXM',into=('BALOURD','EXTERNE'),defaut=None,min=1,max=1,fr="Choix du type de charge a appliquer"), - BALOURD = BLOC(condition = "CHARGES == 'BALOURD' ",fr="Charge balourd appliquee", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge balourd"), - MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la magnitude de la charge balourd (en kg.m)"), - FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge balourd (autant de valeurs que de vitesses de rotation)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (en degres)"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseigner l'instant pour déclencher le balourd"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseigner le temps pour la montée jusqu'à la valeur finale du balourd"), - ),# fin BALOURD - # a commenter - # 20121018 retrait de defaut_fn a la demande de EDF - #DEFAUT_FN = BLOC(condition = "CHARGES == 'DEFAUT_FN' ",fr="Charge defaut de fibre neutre appliquee", - #POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du defaut de fibre neutre"), - #TR_Y = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du vecteur de translation en Y du defaut de fibre neutre"), - #TR_Z = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du vecteur de translation en Z du defaut de fibre neutre"), - #ROT_Y = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du moment de rotation en Y du defaut de fibre neutre"), - #ROT_Z = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du moment de rotation en Z du defaut de fibre neutre"), - #), # fin DEFAUT_FN - #DELIGNAGE = BLOC(condition = "CHARGES == 'DELIGNAGE' ",fr="Application d'un delignage", - #PARAM_DELIGNAGE = FACT(statut='o',min=1,max='**',fr="Parametres du delignage", - #PALIERS = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom d'un palier deligne"), - #VALEURS = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des valeurs du delignage du palier"), - #), # fin PARAM_DELIGNAGE - #), # fin DELIGNAGE - EXTERNE = BLOC(condition = "CHARGES == 'EXTERNE' ",fr="Charge externe appliquee", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la charge externe"), - FONC_APPLI = SIMP(typ=('Fichier','Charge Externe (*.csv)'),docu='',min=1,max=1,statut='o',defaut=None,fr="Renseignement de la fonction appliquee à la charge externe (fichier cvs)"), - ), # fin EXTERNE - #EFFORTS_PALIERS = BLOC(condition = "CHARGES == 'EFFORTS_PALIERS' ",fr="Application d'un effort palier", - #PALIER = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier de l'effort"), - #VALEURS = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignment de la valeur de l'effort sur le palier"), - #), # fin EFFORTS_PALIERS - ETAT_INIT = FACT(statut='o',fr="Renseignement de l'etat initial", - #RESULTAT = SIMP(statut='o',typ=('sd_resultat'),max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), - # 20121126 - #RESULTAT = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), - INST_INIT = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de l'instant initial"), - ), # fin ETAT_INIT - #PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS','LIST_INST'),defaut=None,fr="Choix du type de parametrage temporel"), - # 20121126 - PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS'),defaut="PAS",fr="Choix du type de parametrage temporel",), - PAS = BLOC(condition = "PARAM_TEMPS == 'PAS' ",fr="Renseignement des parametres des pas", - PAS_ASTER = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps Aster (en s)",), - PAS_EDYOS = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps Edyos (en s)",), - INST_FIN = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de l'instant final (en s)",), - ), # fin TEMPS_PAS - #LIST_INST = BLOC(condition = "PARAM_TEMPS == 'LIST_INST' ",fr="Renseignement d'une liste de pas", - #LISTE = SIMP(statut='f',typ='R',min=1,max='**',defaut=None,fr="Renseignement d'une liste de pas"), - #), # fin LIST_INST - PAS_ARCHIVAGE = SIMP(statut='o',typ='I',max=1,defaut=None,fr="Renseignement du pas d'archivage",), - PARA_MEM = SIMP(statut='f',typ='I',max=1,defaut=6400,fr="Renseigner la taille de la memoire en Mo",), - PARA_CPU = SIMP(statut='f',typ='I',max=1,defaut=10000,fr="Renseigner le temps CPU max en secondes",), - SCHEMA_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('EULER','ADAPT_ORDRE1','ADAPT_ORDRE2'),defaut='ADAPT_ORDRE2',fr="Choix d'un schema temporel"), - - ## POST_TRAITEMENTS de l'analyse transitoire - POST_TRAITEMENTS = FACT(statut='o',fr="Choix des post-traitements", - TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), - DEPL = BLOC(condition = "TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du deplacement"), - PALIER = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), - ), # fin DEPL - # pas d'info à rentrer pour les efforts palier (post-traitement sur tout les paliers) - #EFFORTS_PAL = BLOC(condition = "TYPE == 'EFFORTS_PAL'", fr = "Efforts paliers", - #PALIER = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), - #), # fin EFFORTS_PAL - CONTRAINTES = BLOC(condition = "TYPE == 'CONTRAINTES' ",fr="Contraintes", - regles=UN_PARMI('POSITION','ZONE','TOUT'), - POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), - ZONE = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette de la zone de la contrainte"), - TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),max=1,fr="tout"), - ), # fin CONTRAINTES - ), # fin POST_TRAITEMENTS - - - ), # fin ANALYSE_TRANSITOIRE_ACCIDENTEL - -)# fin SPECIFICATION_ANALYSE diff --git a/SPECA/SPECA_Cata_V2016.py b/SPECA/SPECA_Cata_V2016.py deleted file mode 100644 index fddaecb4..00000000 --- a/SPECA/SPECA_Cata_V2016.py +++ /dev/null @@ -1,415 +0,0 @@ -## -*- coding: utf-8 -*- -# -## -------------------------------------------------- -## debut entete -## -------------------------------------------------- -# -from Accas import * - - -# rend disponible le type tuple (liste) -import types -class Tuple: - def __init__(self,ntuple): - self.ntuple=ntuple - - def __convert__(self,valeur): - if type(valeur) == types.StringType: - return None - if len(valeur) != self.ntuple: - return None - return valeur - - def info(self): - return "Tuple de %s elements" % self.ntuple - - __repr__=info - __str__=info - - - -# -#CONTEXT.debug = 1 - -VERSION_CATALOGUE="2016.0.0"; - -JdC = JDC_CATA ( code = 'SPECA', - execmodul = None, - regles=(AU_MOINS_UN('SPECIFICATION_ANALYSE',), - AU_PLUS_UN('SPECIFICATION_ANALYSE',), - ), - )# Fin JDC_CATA - -## ----- SPECIFICATION DE L'ETUDE ----- ## -SPECIFICATION_ANALYSE= MACRO (nom = 'SPECIFICATION_ANALYSE', - op = None, - UIinfo = {"groupes":("Machine tournante",)}, - fr = "Specification des analyses", - TYPE_ANALYSE = SIMP(statut='o', typ='TXM',into=('STATIQUE', 'MODALE', 'HARMONIQUE', 'TRANSITOIRE', 'TRANSITOIRE_ACCIDENTEL','SYNTHESE')), - # pour V1.1 flexion uniquement - #TYPE_COMPORTEMENT = SIMP(statut='o', typ='TXM',into=('FLEXION',),defaut='FLEXION',fr="Renseignement du type de comportement voulu"), - TYPE_COMPORTEMENT = BLOC(condition = "TYPE_ANALYSE in ('MODALE','HARMONIQUE','STATIQUE','TRANSITOIRE','TRANSITOIRE_ACCIDENTEL')", - FLEXION = SIMP(statut='o',typ='TXM',into=('OUI',),defaut='OUI',fr="Prise en compte la flexion de la ligne d'arbres: obligatoire"), - TORSION = SIMP(statut='f',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Choix de la prise en compte la torsion de la ligne d'arbres"), - COMPRESSION = SIMP(statut='f',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Choix de la prise en compte la traction/compression de la ligne d'arbres"), - ), - - SURCHARGE=BLOC(condition = "TYPE_ANALYSE in ('MODALE','HARMONIQUE','STATIQUE','TRANSITOIRE','TRANSITOIRE_ACCIDENTEL','SYNTHESE')",statut="f", - TEMPLATE=SIMP( statut="f", - typ=("Fichier","Fichier Template (*.tpl)"), - min=1,max=1, - fr="Utiliser un template d'analyse modifie" - ), - PARAMETRES= FACT(statut='f',min=1,max='**',fr="Definition et renseignement des parametres utilises dans le template surcharge", - CLE=SIMP(statut='o',typ='TXM',defaut=None,fr="Nom du parametre dans le template"), - TYPE=SIMP(statut='o',typ='TXM',into=('ENTIER','REEL','CHAINE','FICHIER','REPERTOIRE'),fr="Nature du parametre a renseigner"), - ENTIER=BLOC(condition="TYPE=='ENTIER'", - VALUE=SIMP(statut='o',typ='I',defaut=0,fr="Renseignement d'un nombre entier"), - ), - REEL=BLOC(condition="TYPE=='REEL'", - VALUE=SIMP(statut='o',typ='R',defaut=0.0,fr="Renseignement d'un nombre reel"), - ), - CHAINE=BLOC(condition="TYPE=='CHAINE'", - VALUE=SIMP(statut='o',typ='TXM',defaut='',fr="Renseignement d'une chaine de caracteres"), - ), - FICHIER=BLOC(condition="TYPE=='FICHIER'", - VALUE=SIMP(statut='o',typ=("Fichier","All files (*.*)"),fr="Renseignement d'un fichier") - ), - REPERTOIRE =BLOC(condition="TYPE=='REPERTOIRE'", - VALUE=SIMP(statut='o',typ="Repertoire",fr="Renseignement d'un repertoire") - ), - - ), - ), - - - -### ----- CALCUL STATIQUE ----- ## - ANALYSE_STATIQUE = BLOC(condition = "TYPE_ANALYSE == 'STATIQUE' ",fr="Analyse statique (vitesse de rotation nulle de la ligne d'arbres)", - CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", - TYPE = SIMP(statut='o',typ='TXM',into=('POIDS','FORCE','MOMENT','DELIGNAGE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), - POIDS = BLOC(condition = "TYPE == 'POIDS' ",fr="Prise en compte du champ de pesanteur", - GRAVITE = SIMP(statut='o',typ='R',defaut=9.81,fr="Renseignement de l'intensite de la gravite (m/s^2)"), - DIRECTION = SIMP(statut='o',typ='R',min=3,max=3,defaut=(1,0,0),fr="Renseignement de la direction de la force de gravite"), - ), # fin POIDS - FORCE = BLOC(condition = "TYPE == 'FORCE' ",fr="Application d'une force ponctuelle", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique la force (m)"), - AMPLITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant la force (N)"), - #FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), - ), # fin FORCE - MOMENT = BLOC(condition = "TYPE == 'MOMENT' ",fr="Application d'un moment ponctuel", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), - AMPLITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), - ), # fin MOMENT - DELIGNAGE = BLOC(condition = "TYPE == 'DELIGNAGE' ",fr="Application d'un delignage sur un ou plusieurs paliers", - NOM_PALIER = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom du palier deligne"), - DX = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du delignage suivant X du palier (m)"), - DY = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du delignage suivant Y du palier (m)"), - ), # fin Delignage - ), #fin CHARGES - - # POST-TRAITEMENTS DU CALCUL STATIQUE - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", - CONTRAINTES = SIMP(statut='o',typ='TXM',into=('OUI', 'NON'),defaut='NON',fr="Export des contraintes en tout noeud de la ligne d'arbres"), - ), #fin POST_TRAITEMENTS - ),# fin ANALYSE_STATIQUE - -### ----- CALCUL MODALE ----- ## - ANALYSE_MODALE = BLOC(condition = "TYPE_ANALYSE == 'MODALE' ",fr="Analyse modale de la ligne d'arbres", - BASE_CALCUL = SIMP(statut='o',typ="TXM",into=('MODALE','PHYSIQUE'),defaut=None,fr="Choix du type de resolution de l'analyse modale (sur base physique ou sur base modale)"), - BASE_MODALE = BLOC(condition="BASE_CALCUL=='MODALE'",fr="Resolution sur base modale", - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES=SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), - FREQ_MAX=SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), - ), # fin BASE_MODALE - AMORTISSEMENT = SIMP(statut='o',typ='TXM',min=1,max=1,into=('OUI','NON'),defaut='OUI',fr="Choix de la prise en compte de l'amortissment"), - GYROSCOPIE = SIMP(statut='o',typ='TXM',min=1,max=1,into=('OUI','NON'),defaut='OUI',fr="Choix de la prise en compte de la gyroscopie"), - VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste des vitesses de rotation etudiees (tr/min)"), - OPTION_CALCUL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('PLUS_PETITE','CENTRE'),defaut=None,fr="Choix de l'option de calcul"), - PLUS_PETITE = BLOC(condition="OPTION_CALCUL=='PLUS_PETITE'",fr="Calcul des n premieres frequences", - NMAX_FREQ = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre maximal de frequences a calculer"), - ), # fin PLUS_PETITE - CENTRE = BLOC(condition="OPTION_CALCUL=='CENTRE'",fr="Calcul d'un nombre n de frequences autour d'une frequence donnee", - FREQ = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence centrale (Hz)"), - NMAX_FREQ = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre maximal de frequences"), - ), # fin CENTRE - METHODE=SIMP(statut='f',typ='TXM',min=1,max=1,into=('QZ','SORENSEN'),defaut='SORENSEN',fr="Choix de la methode de resolution"), - - # POST-TRAITEMENTS DU CALCUL MODAL - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", - TYPE = SIMP(statut='o',typ='TXM',into=('AUCUN','DIAG_CAMPBELL'), defaut = 'AUCUN'), - DIAG_CAMPBELL = BLOC(condition="TYPE == 'DIAG_CAMPBELL'",fr="Choix des options du diagramme de Campbell", - PRECESSION = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,into=('SOMME','PLUS_GRANDE_ORBITE'),fr="Critere de determination de la precession"), - SUIVI= SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,into=('SANS_TRI','TRI_PREC','TRI_FORM_MOD'),fr="Methode de suivi des modes"), - NB_MODES = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Nombre de modes affiches dans le diagramme, doit etre inferieur au nombre de modes calcules (NMAX_FREQ)"), - ), # fin DIAG_CAMPBELL - ),# fin POST_TRAITEMENTS - ), # fin ANALYSE_MODALE - -## ----- CALCUL HARMONIQUE ----- ## - ANALYSE_HARMONIQUE = BLOC(condition = "TYPE_ANALYSE == 'HARMONIQUE' ",fr="Analyse harmonique de la ligne d'arbres", - - ## specification calcul harmonique - BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('PHYSIQUE','MODALE'),defaut=None,fr="Choix du type de resolution de l'analyse modale (sur base physique ou sur base modale)"), - BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Resolution sur base modale", - #MODALE = FACT(statut='o', - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), - FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), - #),# fin MODALE - ),# fin BASE_MODALE - AMORTISSEMENT_P = BLOC(condition = "BASE_CALCUL == 'PHYSIQUE' ", - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL',),defaut='STRUCTUREL',fr="Choix du type d'amortissement"), - ), # fin AMORTISSEMENT_P - AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - #AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), - AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), - ),# fin AMOR_MODALE - ), # fin AMORTISSEMENT_M - VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste des vitesses de rotation etudiees (tr/min)"), - # 20121018 retrait de defaut_fn a la demande de EDF - CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", - TYPE = SIMP(statut='o',typ='TXM',into=('BALOURD','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), - BALOURD = BLOC(condition = "TYPE == 'BALOURD' ",fr="Chargement de type balourd", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique le balourd (m)"), - AMPLITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude du balourd (kg.m)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (degres)"), - ),# fin BALOURD - HARMONIQUE = BLOC(condition = "TYPE == 'HARMONIQUE' ",fr="Charge harmonique", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique la charge harmonique (m)"), - FREQUENCE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence d'excitation harmonique (Hz)"), - AMPLITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude de la charge harmonique, (N)"), - FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste de coefficients appliques sur la charge harmonique (autant que de vitesses de rotation)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (degres)"), - TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY','DZ','DRZ'),defaut=None,fr="Renseignement du DDL sur lequel s'applique la charge harmonique"), - ), # fin HARMONIQUE - ), #FIN CHARGES - - # POST-TRAITEMENTS DU CALCUL HARMONIQUE - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", - CONTRAINTES = SIMP(statut='o',typ='TXM',into=('OUI', 'NON'),defaut='NON',fr="Export des contraintes en tout noeud de la ligne d'arbres"), - ), - ## fin POST_TRAITEMENTS - - ),# fin ANALYSE_HARMONIQUE - -### ----- CALCUL TRANSITOIRE ----- ## - ANALYSE_TRANSISTOIRE = BLOC(condition = "TYPE_ANALYSE == 'TRANSITOIRE' ",fr="Analyse transitoire de la ligne d'arbres", - - VITESSE = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,into=('CONSTANTE','VARIABLE'),fr="Renseignement du type de vitesse de rotation consideree"), - BASE_C = BLOC(condition ="VITESSE == 'CONSTANTE'",fr="Analyse transitoire a vitesse constante", - BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('PHYSIQUE','MODALE'),defaut=None,fr="Choix du type de resolution de l'analyse transitoire (sur base physique ou sur base modale)"), - BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Resolution sur base modale", - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), - FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), - ),# fin BASE_MODALE - AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), - ),# fin AMOR_MODALE - ), # fin AMORTISSEMENT_M - ), # fin BASE_C - BASE_V = BLOC(condition ="VITESSE == 'VARIABLE'",fr="Analyse transitoire a vitesse variable", - BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('MODALE',),defaut='MODALE',fr="Choix du type de resolution de l'analyse transitoire (obligatoirement sur base modale)"), - BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Resolution sur base modale", - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), - FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), - ),# fin BASE_MODALE - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - #AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), - AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), - ),# fin AMOR_MODALE - ), # fin BASE_C - VITESSE_CONSTANTE = BLOC(condition = "VITESSE == 'CONSTANTE' ", fr="Vitesse de rotation constante", - VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation (tr/min)"), - ),# fin VITESSE_CONSTANTE - VITESSE_VARIABLE = BLOC(condition = "VITESSE == 'VARIABLE' ", fr="Vitesse de rotation variable", regles=UN_PARMI('LINEAIRE','EXPONENTIELLE','FORMULE'), - LINEAIRE = FACT(statut='f',min=1,max=1,fr="Variation lineaire de la vitesse de rotation", - VITESSE_INITIALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation initiale (tr/min)",), - VITESSE_FINALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation finale (tr/min)",), - DEPHASAGE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la postion angulaire initiale (degres)"), - PAS_MAJ = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement du pas de mise a jour des matrices des paliers (tr/min)"), - ),# fin LINEAIRE - EXPONENTIELLE = FACT(statut='f',min=1,max=1,fr="Variation exponentielle de la vitesse de rotation", - VITESSE_INITIALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation initiale (tr/min)",), - VITESSE_FINALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation finale (tr/min)",), - DEPHASAGE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la postion angulaire initiale (degres)"), - LAMBDA = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du parametre de la loi exponentielle (Hz)"), - PAS_MAJ = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement du pas de mise a jour des matrices des paliers (tr/min)"), - ),# fin EXPONENTIELLE - FORMULE = FACT(statut='f',min=1,max=1,fr="Fonction personnalisee decrivant la variation de la vitesse de rotation", - FICHIER = SIMP(statut='o',typ=('Fichier','Formule vitesse rotation (*.*)'),min=1,max=1,defaut=None,fr="Renseignement du fichier contenant les fonctions de la vitesse de rotation"), - PHI = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule de position angulaire (max 8 caractere)"), - OM = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule de vitesse angulaire (max 8 caractere)"), - ACC = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule d'acceleration angulaire (max 8 caractere)"), - VITE_MOY = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la moyenne des vitesses balayees (tr/min)"), - PAS_MAJ = SIMP(statut='f',typ='R',min=1,max='**',defaut=None,fr="Renseignement du pas de mise a jour des matrices des paliers (tr/min)"), - ),# fin FORMULE - ),# fin VITESSE_VARIABLE - #POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), - - CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", - TYPE = SIMP(statut='o',typ='TXM',into=('POIDS','BALOURD','FORCE','MOMENT','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), - BALOURD = BLOC(condition = "TYPE == 'BALOURD' ",fr="Chargement de type balourd", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique le balourd (m)"), - AMPLITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude du balourd (kg.m)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (degres)"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du balourd (s)"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre l'amplitude nominale du balourd (s)"), - ),# fin BALOURD - POIDS = BLOC(condition = "TYPE == 'POIDS' ",fr="Prise en compte du champ de pesanteur", - GRAVITE = SIMP(statut='o',typ='R',defaut=9.81,fr="Renseignement de l'intensite de la gravite (m/s^2)"), - DIRECTION = SIMP(statut='o',typ='R',min=3,max=3,defaut=(1,0,0),fr="Renseignement de la direction de la force de gravite"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du poids (s)"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale du poids (s)"), - ), # fin POIDS - FORCE = BLOC(condition = "TYPE == 'FORCE' ",fr="Application d'une force ponctuelle", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique la force (m)"), - AMPLITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant la force (N)"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition de la force (s)"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale de la force (s)"), - #FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), - ), # fin FORCE - MOMENT = BLOC(condition = "TYPE == 'MOMENT' ",fr="Application d'un moment ponctuel", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), - AMPLITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du moment (s)"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale du moment (s)"), - ), # fin MOMENT - HARMONIQUE = BLOC(condition = "TYPE == 'HARMONIQUE' ",fr="Charge harmonique", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique la charge harmonique (m)"), - FREQUENCE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence d'excitation harmonique (Hz)"), - AMPLITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude de la charge harmonique, (N)"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition de la charge harmonique (s)"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale de la charge harmonique (s)"), - #FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge harmonique (autant de valeurs que de vitesses de rotation)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (degres)"), - TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY','DZ','DRZ'),defaut=None,fr="Renseignement du DDL sur lequel s'applique la charge harmonique"), - ), # fin HARMONIQUE - ), #fin CHARGES - - ETAT_INIT = FACT(statut='o',fr="Renseignement de l'etat initial du calcul", - #RESULTAT = SIMP(statut='o',typ=('sd_resultat'),max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), - RESULTAT = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Choix de la structure de donnees de type 'resultat' de Code_Aster"), - INST_INIT = SIMP(statut='f',typ='R',max=1,defaut=0.0,fr="Renseignement de l'instant de la structure de donnees a partir duquel il faut lancer le calcul (s)"), - ), # fin ETAT_INIT - PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS','LISTE'),defaut=None,fr="Choix du type de discretisation temporelle"), - #PAS = BLOC(condition = "VITESSE == 'VARIABLE'",fr="Renseignement des parametres des pas", - PAS = BLOC(condition = "PARAM_TEMPS == 'PAS'",fr="Renseignement de pas de temps", - TEMPS_PAS = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps d'integration(en s)"), - INST_INI = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de l'instant initial du calcul (s)"), - INST_FIN = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de l'instant final du calcul (s)"), - ), # fin TEMPS_PAS - LIST_INST = BLOC(condition = "PARAM_TEMPS == 'LISTE'",fr="Renseignement d'une liste d'instants", - LISTE = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement d'une liste d'instants auxquels resoudre le calcul (s)"), - ), # fin LIST_INST - PAS_ARCHIVAGE = SIMP(statut='o',typ='I',max=1,defaut=1,fr="Renseignement du pas d'archivage des resultats (une sauvegarde tous les 'PAS_ARCHIVAGE' instants d'integration)",), - SCHEMA_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('NEWMARK','EULER','WILSON','ADAPT_ORDRE1','ADAPT_ORDRE2','DIFF_CENTRE'),defaut='NEWMARK',fr="Choix d'un schema d'integration temporelle"), - NEWMARK = BLOC(condition = "SCHEMA_TEMPS == 'NEWMARK' ",fr="Methode de NEWMARK", - BETA = SIMP(statut='f',typ='R',max=1,defaut=0.25,fr="Renseignement de la valeur beta pour la methode de NEWMARK"), - GAMMA = SIMP(statut='f',typ='R',max=1,defaut=0.25,fr="Renseignement de la valeur gamma pour la methode de NEWMARK"), - ),# fin NEWMARK - WILSON = BLOC(condition = "SCHEMA_TEMPS == 'WILSON' ",fr="Methode de WILSON", - THETA = SIMP(statut='f',typ='R',max=1,defaut=1.4,fr="Renseignement de la valeur theta pour la methode de WILSON"), - ), # fin WILSON - - # POST-TRAITEMENTS DU CALCUL TRANSITOIRE - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", - CONTRAINTES = SIMP(statut='o',typ='TXM',into=('OUI', 'NON'),defaut='NON',fr="Export des contraintes en tout noeud de la ligne d'arbres"), - ), # fin POST_TRAITEMENTS - - ), # fin ANALYSE_TRANSISTOIRE - - -### ----- CALCUL COUPLE CODE_ASTER/EYDOS ----- ## - ANALYSE_TRANSITOIRE_ACCIDENTEL = BLOC(condition = "TYPE_ANALYSE == 'TRANSITOIRE_ACCIDENTEL' ",fr="Analyse transitoire accidentelle de la ligne d'arbres", - #BASE_MODALE = FACT(statut='o', fr="Choix des parametres de la base modale", - #POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), - BASE_MODALE = BLOC(condition = "True", fr="Resolution sur base modale", - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), - FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), - ),# fin BASE_MODALE - # cft 20131217 suppression amortissement reduit - #AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL','REDUIT'),defaut=None,fr="Choix du type d'amortissement"), - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL',),defaut='STRUCTUREL',fr="Choix du type d'amortissement"), - AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - #LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), - LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements modaux reduits (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), - ),# fin AMOR_REDUIT - VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation (tr/min)"), - - CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", - TYPE = SIMP(statut='o',typ='TXM',into=('POIDS','BALOURD','FORCE','MOMENT','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), - BALOURD = BLOC(condition = "TYPE == 'BALOURD' ",fr="Chargement de type balourd", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique le balourd (m)"), - AMPLITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude du balourd (kg.m)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (degres)"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du balourd (s)"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre l'amplitude nominale du balourd (s)"), - ),# fin BALOURD - POIDS = BLOC(condition = "TYPE == 'POIDS' ",fr="Prise en compte du champ de pesanteur", - GRAVITE = SIMP(statut='o',typ='R',defaut=9.81,fr="Renseignement de l'intensite de la gravite (m/s^2)"), - DIRECTION = SIMP(statut='o',typ='R',min=3,max=3,defaut=(1,0,0),fr="Renseignement de la direction de la force de gravite"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du poids (s)"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale du poids (s)"), - ), # fin POIDS - FORCE = BLOC(condition = "TYPE == 'FORCE' ",fr="Application d'une force ponctuelle", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), - AMPLITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition de la force (s)"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale de la force (s)"), - #FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), - ), # fin FORCE - MOMENT = BLOC(condition = "TYPE == 'MOMENT' ",fr="Application d'un moment ponctuel", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), - AMPLITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du moment (s)"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale du moment (s)"), - ), # fin MOMENT - HARMONIQUE = BLOC(condition = "TYPE == 'HARMONIQUE' ",fr="Charge harmonique", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique la charge harmonique (m)"), - FREQUENCE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence d'excitation harmonique (Hz)"), - AMPLITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude de la charge harmonique, (N)"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition de la charge harmonique (s)"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre la valeur nominale de la charge harmonique (s)"), - #FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge harmonique (autant de valeurs que de vitesses de rotation)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (degres)"), - TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY','DZ','DRZ'),defaut=None,fr="Renseignement du DDL sur lequel s'applique la charge harmonique"), - ), # fin HARMONIQUE - ), #fin CHARGES - ETAT_INIT = FACT(statut='o',fr="Renseignement de l'etat initial du calcul", - #RESULTAT = SIMP(statut='o',typ=('sd_resultat'),max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), - # 20121126 - #RESULTAT = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), - INST_INIT = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de l'instant initial a partir duquel il faut lancer le calcul (s)"), - ), # fin ETAT_INIT - #PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS','LIST_INST'),defaut=None,fr="Choix du type de parametrage temporel"), - # 20121126 - PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS',),defaut="PAS",fr="Choix du type de discretisation temporelle",), - PAS = BLOC(condition = "PARAM_TEMPS == 'PAS' ",fr="Renseignement de pas de temps", - PAS_ASTER = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps d'integration Code_Aster (en s)",), - PAS_EDYOS = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps d'integration Edyos (en s)",), - INST_FIN = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de l'instant final du calcul (en s)",), - ), # fin TEMPS_PAS - #LIST_INST = BLOC(condition = "PARAM_TEMPS == 'LIST_INST' ",fr="Renseignement d'une liste de pas", - #LISTE = SIMP(statut='f',typ='R',min=1,max='**',defaut=None,fr="Renseignement d'une liste de pas"), - #), # fin LIST_INST - PAS_ARCHIVAGE = SIMP(statut='o',typ='I',max=1,defaut=1,fr="Renseignement du pas d'archivage des resultats (une sauvegarde tous les 'PAS_ARCHIVAGE' instants d'integration)",), - PARA_MEM = SIMP(statut='f',typ='I',max=1,defaut=6400,fr="Renseigner la taille maximale de la memoire (Mo)",), - PARA_CPU = SIMP(statut='f',typ='I',max=1,defaut=10000,fr="Renseigner le temps CPU maximal (s)",), - SCHEMA_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('EULER','ADAPT_ORDRE1','ADAPT_ORDRE2'),defaut='ADAPT_ORDRE2',fr="Choix d'un schema d'integration temporelle"), - - # POST-TRAITEMENTS DU CALCUL TRANSITOIRE ACCIDENTEL - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", - CONTRAINTES = SIMP(statut='o',typ='TXM',into=('OUI', 'NON'),defaut='NON',fr="Export des contraintes en tout noeud de la ligne d'arbres"), - ), # fin POST_TRAITEMENTS - ), # fin ANALYSE_TRANSITOIRE_ACCIDENTEL - -)# fin SPECIFICATION_ANALYSE diff --git a/SPECA/SPECA_Cata_V2_00.py b/SPECA/SPECA_Cata_V2_00.py deleted file mode 100644 index f6c34acf..00000000 --- a/SPECA/SPECA_Cata_V2_00.py +++ /dev/null @@ -1,458 +0,0 @@ -## -*- coding: utf-8 -*- -# -## -------------------------------------------------- -## debut entete -## -------------------------------------------------- -# -from Accas import * - - -# rend disponible le type tuple (liste) -import types -class Tuple: - def __init__(self,ntuple): - self.ntuple=ntuple - - def __convert__(self,valeur): - if type(valeur) == types.StringType: - return None - if len(valeur) != self.ntuple: - return None - return valeur - - def info(self): - return "Tuple de %s elements" % self.ntuple - - __repr__=info - __str__=info - - - -# -#CONTEXT.debug = 1 - -VERSION_CATALOGUE="2.0.0"; - -JdC = JDC_CATA ( code = 'SPECA', - execmodul = None, - regles=(AU_MOINS_UN('SPECIFICATION_ANALYSE',), - AU_PLUS_UN('SPECIFICATION_ANALYSE',), - ), - )# Fin JDC_CATA - -## ----- SPECIFICATION DE L'ETUDE ----- ## -SPECIFICATION_ANALYSE= MACRO (nom = 'SPECIFICATION_ANALYSE', - op = None, - UIinfo = {"groupes":("Machine tournante",)}, - fr = "Specification des analyses", - TYPE_ANALYSE = SIMP(statut='o', typ='TXM',into=('STATIQUE', 'MODALE', 'HARMONIQUE', 'TRANSITOIRE', 'TRANSITOIRE_ACCIDENTEL','SYNTHESE')), - # pour V1.1 flexion uniquement - #TYPE_COMPORTEMENT = SIMP(statut='o', typ='TXM',into=('FLEXION'),defaut='FLEXION',fr="Renseignement du type de comportement voulu"), - TYPE_COMPORTEMENT = BLOC(condition = "TYPE_ANALYSE in ('MODALE','HARMONIQUE','STATIQUE','TRANSITOIRE','TRANSITOIRE_ACCIDENTEL','SYNTHESE')", - FLEXION = SIMP(statut='o',typ='TXM',into=('OUI',),defaut='OUI',fr="Prise en compte la flexion de la ligne d'arbres: obligatoire"), - TORSION = SIMP(statut='f',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Choix de la prise en compte la torsion de la ligne d'arbres"), - COMPRESSION = SIMP(statut='f',typ='TXM',into=('OUI','NON'),defaut='NON',fr="Choix de la prise en compte la traction/compression de la ligne d'arbres"), - ), - - SURCHARGE=BLOC(condition = "TYPE_ANALYSE in ('MODALE','HARMONIQUE','STATIQUE','TRANSITOIRE','TRANSITOIRE_ACCIDENTEL','SYNTHESE')",statut="f", - TEMPLATE=SIMP( statut="f", - typ=("Fichier","Fichier Template (*.tpl)"), - min=1,max=1, - fr="Utiliser un template d'analyse modifie" - ), - PARAMETRES= FACT(statut='f',min=1,max='**',fr="Definition et renseignement des parametres utilises dans le template surcharge", - CLE=SIMP(statut='o',typ='TXM',defaut=None,fr="Nom du parametre dans le template"), - TYPE=SIMP(statut='o',typ='TXM',into=('ENTIER','REEL','CHAINE','FICHIER','REPERTOIRE'),fr="Nature du parametre a renseigner"), - ENTIER=BLOC(condition="TYPE=='ENTIER'", - VALUE=SIMP(statut='o',typ='I',defaut=0,fr="Renseignement d'un nombre entier"), - ), - REEL=BLOC(condition="TYPE=='REEL'", - VALUE=SIMP(statut='o',typ='R',defaut=0.0,fr="Renseignement d'un nombre reel"), - ), - CHAINE=BLOC(condition="TYPE=='CHAINE'", - VALUE=SIMP(statut='o',typ='TXM',defaut='',fr="Renseignement d'une chaine de caracteres"), - ), - FICHIER=BLOC(condition="TYPE=='FICHIER'", - VALUE=SIMP(statut='o',typ=("Fichier","All files (*.*)"),fr="Renseignement d'un fichier") - ), - REPERTOIRE =BLOC(condition="TYPE=='REPERTOIRE'", - VALUE=SIMP(statut='o',typ="Repertoire",fr="Renseignement d'un repertoire") - ), - - ), - ), - - - -### ----- CALCUL STATIQUE ----- ## - ANALYSE_STATIQUE = BLOC(condition = "TYPE_ANALYSE == 'STATIQUE' ",fr="Analyse statique (vitesse de rotation nulle de la ligne d'arbres)" - - CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", - TYPE = SIMP(statut='o',typ='TXM',into=('POIDS','FORCE','MOMENT','DELIGNAGE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), - POIDS = BLOC(condition = "TYPE == 'POIDS' ",fr="Prise en compte du champ de pesanteur", - GRAVITE = SIMP(statut='o',typ='R',defaut=9.81,fr="Renseignement de l'intensite de la gravite (m/s^2)"), - DIRECTION = SIMP(statut='o',typ='R',min=3,max=3,defaut=(1,0,0),fr="Renseignement de la direction de la force de gravite"), - ), # fin POIDS - FORCE = BLOC(condition = "TYPE == 'FORCE' ",fr="Application d'une force ponctuelle", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique la force (m)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant la force (N)"), - #FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), - ), # fin FORCE - MOMENT = BLOC(condition = "TYPE == 'MOMENT' ",fr="Application d'un moment ponctuel", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), - ), # fin MOMENT - DELIGNAGE = BLOC(condition = "TYPE == 'DELIGNAGE' ",fr="Application d'un delignage sur un ou plusieurs paliers", - NOM_PALIER = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom du palier deligne"), - DX = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du delignage suivant X du palier (m)"), - DY = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du delignage suivant Y du palier (m)"), - ), # fin Delignage - ), #fin CHARGES - - ## POST-TRAITEMENTS DU CALCUL STATIQUE - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", - TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','REAC_NODA','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), - DEPL = BLOC(condition="TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement",regles=UN_PARMI('POSITION','PALIER'), - POSITION = SIMP(statut='f',typ='R',defaut=None,fr="Renseignement de la coordonnee du deplacement"), - PALIER = SIMP(statut='f',max='**',typ='TXM',defaut=None,fr="Renseignement du nom du palier"), - ), # fin DEPL - CONTRAINTES = BLOC(condition="TYPE == 'CONTRAINTES' ",fr="Export des contraintes",regles=UN_PARMI('POSITION','ZONE','TOUT'), - POSITION = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), - ZONE = SIMP(statut='f',typ='TXM',defaut=None,fr="Renseignement de la zone de la contrainte"), - TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),fr="Export pour tous les noeuds"), - ), # fin CONTRAINTES - REAC_NODA = BLOC(condition="TYPE == 'REAC_NODA' ", fr="Reaction nodale",regles=UN_PARMI('POSITION','PALIER'), - POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la reaction"), - #ZONE = SIMP(statut='f',typ='TXM',defaut=None,fr="Renseignement de l'etiquette de la zone de la reaction"), - PALIER = SIMP(statut='f',max='**',typ='TXM',defaut=None,fr="Renseignement du nom du palier"), - ), # fin REAC_NODA - ), # fin POST_TRAITEMENT - ## fin bloc POST_TRAITEMENTS - - ),# fin ANALYSE_STATIQUE - -### ----- CALCUL MODALE ----- ## - ANALYSE_MODALE = BLOC(condition = "TYPE_ANALYSE == 'MODALE' ",fr="Analyse modale de la ligne d'arbres" - BASE_CALCUL = SIMP(statut='o',typ="TXM",into=('MODALE','PHYSIQUE'),defaut=None,fr="Choix du type de resolution de l'analyse modale (sur base physique ou sur base modale)"), - BASE_MODALE = BLOC(condition="BASE_CALCUL=='MODALE'",fr="Resolution sur base modale", - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES=SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), - FREQ_MAX=SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), - ), # fin BASE_MODALE - AMORTISSEMENT = SIMP(statut='o',typ='TXM',min=1,max=1,into=('OUI','NON'),defaut='OUI',fr="Choix de la prise en compte de l'amortissment"), - GYROSCOPIE = SIMP(statut='o',typ='TXM',min=1,max=1,into=('OUI','NON'),defaut='OUI',fr="Choix de la prise en compte de la gyroscopie"), - VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste des vitesses de rotation etudiees (tr/min)"), - OPTION_CALCUL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('PLUS_PETITE','CENTRE'),defaut=None,fr="Choix de l'option de calcul"), - PLUS_PETITE = BLOC(condition="OPTION_CALCUL=='PLUS_PETITE'",fr="Option PLUS_PETITE",fr="Calcul des n premieres frequences" - NMAX_FREQ = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre maximal de frequences a calculer"), - ), # fin PLUS_PETITE - CENTRE = BLOC(condition="OPTION_CALCUL=='CENTRE'",fr="Option CENTRE",fr="Calcul d'un nombre n de frequences autour d'une frequence donnee" - FREQ = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence centrale (Hz)"), - NMAX_FREQ = SIMP(statut='o',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre maximal de frequences"), - ), # fin CENTRE - METHODE=SIMP(statut='f',typ='TXM',min=1,max=1,into=('QZ','SORENSEN'),defaut='SORENSEN',fr="Choix de la methode de resolution"), - - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", - TYPE = SIMP(statut='o',typ='TXM',defaut=None,into=('TABLEAU_PARAM_MODAUX','DIAG_CAMPBELL'),fr="Choix du type de post-traitement",), - #TABLEAU_PARAM_MODAUX = SIMP(statut='f',typ='TXM',min=1,max=1,defaut=None,into=('SIMPLE','COMPLET'),fr="Choix du type de tableau"), - TABLEAU_PARAM_MODAUX = BLOC(condition = "TYPE == 'TABLEAU_PARAM_MODAUX'",fr="Choix du type de tableau", - TABLEAU = SIMP(statut='o',max=1,typ='TXM',defaut='SIMPLE',into=('SIMPLE','COMPLET'),), - ), # fin TABLEAU_PARAM_MODAUX - DIAG_CAMPBELL = BLOC(condition = "TYPE == 'DIAG_CAMPBELL'", fr = "Choix des options du diagramme de Campbell", - PRECESSION = SIMP(statut='o',typ='TXM',max=1,defaut=None,into=('SOMME','PLUS_GRANDE_ORBITE'),fr="Critere de determination de la precession"), - SUIVI = SIMP(statut='o',typ='TXM',max=1,defaut=None,into=('SANS_TRI','TRI_PREC','TRI_FORM_MOD'),fr="Methode de suivi des modes"), - # 20121018 ajout de NB_MODES a la demande de Ionel Nistor - NB_MODES = SIMP(statut='o',typ='I',max=1,defaut=None,fr="Nombre de modes affiches dans le diagramme, doit etre inferieur au nombre de modes calcules (NMAX_FREQ)"), - ), # fin DIAG_CAMPBELL - #DIAG_CAMPBELL = SIMP(statut='f',typ='TXM',min=1,max=1,defaut=None,into=('OUI','NON'),fr="Choix de calcul du diagramme de Campbell (uniquement si plusieurs vitesses de rotation ont ete renseignees)",), - ), # fin POST_TRAITEMENTS - - - ), # fin ANALYSE_MODALE - -## ----- CALCUL HARMONIQUE ----- ## - ANALYSE_HARMONIQUE = BLOC(condition = "TYPE_ANALYSE == 'HARMONIQUE' ",fr="Analyse harmonique de la ligne d'arbres", - - ## specification calcul harmonique - BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('PHYSIQUE','MODALE'),defaut=None,fr="Choix du type de resolution de l'analyse modale (sur base physique ou sur base modale)"), - BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Resolution sur base modale", - #MODALE = FACT(statut='o', - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), - FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), - #),# fin MODALE - ),# fin BASE_MODALE - AMORTISSEMENT_P = BLOC(condition = "BASE_CALCUL == 'PHYSIQUE' ", - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - ), # fin AMORTISSEMENT_P - AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - #AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), - AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), - ),# fin AMOR_MODALE - ), # fin AMORTISSEMENT_M - VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste des vitesses de rotation etudiees (tr/min)"), - # 20121018 retrait de defaut_fn a la demande de EDF - CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", - TYPE = SIMP(statut='o',typ='TXM',into=('BALOURD','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), - BALOURD = BLOC(condition = "TYPE == 'BALOURD' ",fr="Chargement de type balourd", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique le balourd (m)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude du balourd (kg.m)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (degres)"), - ),# fin BALOURD - HARMONIQUE = BLOC(condition = "TYPE == 'HARMONIQUE' ",fr="Charge harmonique", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique la charge harmonique (m)"), - FREQUENCE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence d'excitation harmonique (Hz)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude de la charge harmonique, (N)"), - FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la liste de coefficients appliques sur la charge harmonique (autant que de vitesses de rotation)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (degres)"), - TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY','DZ','DRZ'),defaut=None,fr="Renseignement du DDL sur lequel s'applique la charge harmonique"), - ), # fin HARMONIQUE - ), #FIN CHARGES - ## POST-TRAITEMENTS DU CALCUL HARMONIQUE - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", - TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_RELA','REAC_NODA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), - DEPL = BLOC(condition = "TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement",regles=UN_PARMI('POSITION','PALIER'), - POSITION = SIMP(statut='f',typ='R',defaut=None,fr="Renseignement de la coordonnee du deplacement"), - PALIER = SIMP(statut='f',max='**',typ='TXM',defaut=None,fr="Renseignement du nom du palier"), - ), # fin DEPL - CONTRAINTES = BLOC(condition="TYPE == 'CONTRAINTES' ",fr="Export des contraintes",regles=UN_PARMI('POSITION','ZONE','TOUT'), - POSITION = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), - ZONE = SIMP(statut='f',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la zone de la contrainte"), - TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),min=1,max=1,fr="Export pour tous les noeuds"), - ), # fin CONTRAINTES - ), - ## fin bloc POST_TRAITEMENTS - - ),# fin ANALYSE_HARMONIQUE - -### ----- CALCUL TRANSITOIRE ----- ## - ANALYSE_TRANSISTOIRE = BLOC(condition = "TYPE_ANALYSE == 'TRANSITOIRE' ",fr="Analyse transitoire de la ligne d'arbres", - - VITESSE = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,into=('CONSTANTE','VARIABLE'),fr="Renseignement du type de vitesse de rotation consideree"), - BASE_C = BLOC(condition ="VITESSE == 'CONSTANTE'",fr="Analyse transitoire a vitesse constante" - BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('PHYSIQUE','MODALE'),defaut=None,fr="Choix du type de resolution de l'analyse transitoire (sur base physique ou sur base modale)"), - BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Resolution sur base modale", - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), - FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), - ),# fin BASE_MODALE - AMORTISSEMENT_M = BLOC(condition = "BASE_CALCUL == 'MODALE' ", - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), - ),# fin AMOR_MODALE - ), # fin AMORTISSEMENT_M - ), # fin BASE_C - BASE_V = BLOC(condition ="VITESSE == 'VARIABLE'",fr="Analyse transitoire a vitesse variable" - BASE_CALCUL = SIMP(statut='o',typ='TXM',into=('MODALE'),defaut='MODALE',fr="Choix du type de resolution de l'analyse transitoire (obligatoirement sur base modale)"), - BASE_MODALE = BLOC(condition = "BASE_CALCUL == 'MODALE' ", fr="Resolution sur base modale", - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), - FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), - ),# fin BASE_MODALE - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('REDUIT','STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - AMOR_MODAL = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - #AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max=1,defaut=None,fr="Renseignement de l'amortissement modal reduit (en %)"), - AMOR_REDUIT = SIMP(statut='o', typ='R', min=1, max='**',defaut=None,fr="Renseignement de l'amortissement modal reduit (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), - ),# fin AMOR_MODALE - ), # fin BASE_C - VITESSE_CONSTANTE = BLOC(condition = "VITESSE == 'CONSTANTE' ", fr="Vitesse de rotation constante", - VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation (tr/min)"), - ),# fin VITESSE_CONSTANTE - VITESSE_VARIABLE = BLOC(condition = "VITESSE == 'VARIABLE' ", fr="Vitesse de rotation variable", regles=UN_PARMI('LINEAIRE','EXPONENTIELLE','FORMULE'), - LINEAIRE = FACT(statut='f',min=1,max=1,fr="Variation lineaire de la vitesse de rotation", - VITESSE_INITIALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation initiale (tr/min)",), - VITESSE_FINALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation finale (tr/min)",), - DEPHASAGE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la postion angulaire initiale (degres)"), - PAS_MAJ = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement du pas de mise a jour des matrices des paliers (tr/min)"), - ),# fin LINEAIRE - EXPONENTIELLE = FACT(statut='f',min=1,max=1,fr="Variation exponentielle de la vitesse de rotation", - VITESSE_INITIALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation initiale (tr/min)",), - VITESSE_FINALE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation finale (tr/min)",), - DEPHASAGE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la postion angulaire initiale (degres)"), - LAMBDA = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du parametre de la loi exponentielle (Hz)"), - PAS_MAJ = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement du pas de mise a jour des matrices des paliers (tr/min)"), - ),# fin EXPONENTIELLE - FORMULE = FACT(statut='f',min=1,max=1,fr="Fonction personnalisee decrivant la variation de la vitesse de rotation", - FICHIER = SIMP(statut='o',typ=('Fichier','Formule vitesse rotation (*.*)'),min=1,max=1,defaut=None,fr="Renseignement du fichier contenant les fonctions de la vitesse de rotation"), - PHI = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule de position angulaire (max 8 caractere)"), - OM = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule de vitesse angulaire (max 8 caractere)"), - ACC = SIMP(statut='o',typ='TXM',min=1,max=1,defaut=None,fr="Renseignement du nom de la formule d'acceleration angulaire (max 8 caractere)"), - VITE_MOY = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la moyenne des vitesses balayees (tr/min)"), - PAS_MAJ = SIMP(statut='f',typ='R',min=1,max='**',defaut=None,fr="Renseignement du pas de mise a jour des matrices des paliers (tr/min)"), - ),# fin FORMULE - ),# fin VITESSE_VARIABLE - #POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), - - CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", - TYPE = SIMP(statut='o',typ='TXM',into=('POIDS','BALOURD','FORCE','MOMENT','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), - BALOURD = BLOC(condition = "TYPE == 'BALOURD' ",fr="Chargement de type balourd", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique le balourd (m)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude du balourd (kg.m)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (degres)"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du balourd (s)"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre l'amplitude nominale du balourd (s)"), - ),# fin BALOURD - POIDS = BLOC(condition = "TYPE == 'POIDS' ",fr="Prise en compte du champ de pesanteur", - GRAVITE = SIMP(statut='o',typ='R',defaut=9.81,fr="Renseignement de l'intensite de la gravite (m/s^2)"), - DIRECTION = SIMP(statut='o',typ='R',min=3,max=3,defaut=(1,0,0),fr="Renseignement de la direction de la force de gravite"), - ), # fin POIDS - FORCE = BLOC(condition = "TYPE == 'FORCE' ",fr="Application d'une force ponctuelle", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique la force (m)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant la force (N)"), - #FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), - ), # fin FORCE - MOMENT = BLOC(condition = "TYPE == 'MOMENT' ",fr="Application d'un moment ponctuel", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), - ), # fin MOMENT - HARMONIQUE = BLOC(condition = "TYPE == 'HARMONIQUE' ",fr="Charge harmonique", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique la charge harmonique (m)"), - FREQUENCE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence d'excitation harmonique (Hz)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude de la charge harmonique, (N)"), - #FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge harmonique (autant de valeurs que de vitesses de rotation)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (degres)"), - TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY','DZ','DRZ'),defaut=None,fr="Renseignement du DDL sur lequel s'applique la charge harmonique"), - ), # fin HARMONIQUE - ), #fin CHARGES - - ETAT_INIT = FACT(statut='o',fr="Renseignement de l'etat initial du calcul", - #RESULTAT = SIMP(statut='o',typ=('sd_resultat'),max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), - RESULTAT = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Choix de la structure de donnees de type 'resultat' de Code_Aster"), - INST_INIT = SIMP(statut='f',typ='R',max=1,defaut=0.0,fr="Renseignement de l'instant de la structure de donnees a partir duquel il faut lancer le calcul (s)"), - ), # fin ETAT_INIT - PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS','LISTE'),defaut=None,fr="Choix du type de discretisation temporelle"), - #PAS = BLOC(condition = "VITESSE == 'VARIABLE'",fr="Renseignement des parametres des pas", - PAS = BLOC(condition = "PARAM_TEMPS == 'PAS'",fr="Renseignement de pas de temps", - TEMPS_PAS = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps d'integration(en s)"), - INST_INI = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de l'instant initial du calcul (s)"), - INST_FIN = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de l'instant final du calcul (s)"), - ), # fin TEMPS_PAS - LIST_INST = BLOC(condition = "PARAM_TEMPS == 'LISTE'",fr="Renseignement d'une liste d'instants", - LISTE = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement d'une liste d'instants auxquels resoudre le calcul (s)"), - ), # fin LIST_INST - PAS_ARCHIVAGE = SIMP(statut='o',typ='I',max=1,defaut=1,fr="Renseignement du pas d'archivage des resultats (une sauvegarde tous les 'PAS_ARCHIVAGE' instants d'integration)",), - SCHEMA_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('NEWMARK','EULER','WILSON','ADAPT_ORDRE1','ADAPT_ORDRE2','DIFF_CENTRE'),defaut='NEWMARK',fr="Choix d'un schema d'integration temporelle"), - NEWMARK = BLOC(condition = "SCHEMA_TEMPS == 'NEWMARK' ",fr="Methode de NEWMARK", - BETA = SIMP(statut='f',typ='R',max=1,defaut=0.25,fr="Renseignement de la valeur beta pour la methode de NEWMARK"), - GAMMA = SIMP(statut='f',typ='R',max=1,defaut=0.25,fr="Renseignement de la valeur gamma pour la methode de NEWMARK"), - ),# fin NEWMARK - WILSON = BLOC(condition = "SCHEMA_TEMPS == 'WILSON' ",fr="Methode de WILSON", - THETA = SIMP(statut='f',typ='R',max=1,defaut=1.4,fr="Renseignement de la valeur theta pour la methode de WILSON"), - ), # fin WILSON - - ## POST_TRAITEMENTS de l'analyse transitoire - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", - TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), - DEPL = BLOC(condition = "TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement",regles=UN_PARMI('POSITION','PALIER'), - #POSITION_DEPL = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du deplacement"), - POSITION = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du deplacement"), - PALIER = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), - ), # fin DEPL - CONTRAINTES = BLOC(condition = "TYPE == 'CONTRAINTES' ",fr="Export des contraintes", - regles=UN_PARMI('POSITION','ZONE','TOUT'), - POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), - ZONE = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette de la zone de la contrainte"), - TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),max=1,fr="Export pour tous les noeuds"), - ), # fin CONTRAINTES - ), # fin POST_TRAITEMENTS - - ), # fin ANALYSE_TRANSISTOIRE - - -### ----- CALCUL COUPLE CODE_ASTER/EYDOS ----- ## - ANALYSE_TRANSITOIRE_ACCIDENTEL = BLOC(condition = "TYPE_ANALYSE == 'TRANSITOIRE_ACCIDENTEL' ",fr="Analyse transitoire accidentelle de la ligne d'arbres", - #BASE_MODALE = FACT(statut='o', fr="Choix des parametres de la base modale", - #POIDS = SIMP(statut='o',typ='TXM',into=('OUI','NON'),defaut='OUI',fr="Choix d'application d'un poids"), - BASE_MODALE = BLOC(condition = "True", fr="Resolution sur base modale", - regles=UN_PARMI('NB_MODES','FREQ_MAX'), - NB_MODES = SIMP(statut='f',typ='I',min=1,max=1,defaut=None,fr="Renseignement du nombre de modes constituant la base de projection"), - FREQ_MAX = SIMP(statut='f',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence maximale des modes constituant la base de projection (Hz)"), - ),# fin BASE_MODALE - # cft 20131217 suppression amortissement reduit - #AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL','REDUIT'),defaut=None,fr="Choix du type d'amortissement"), - AMORTISSEMENT = SIMP(statut='o', typ='TXM',into=('STRUCTUREL'),defaut=None,fr="Choix du type d'amortissement"), - AMOR_REDUIT = BLOC(condition = "AMORTISSEMENT == 'REDUIT' ", - #LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements"), - LIST_AMOR = SIMP(statut='o', typ='R', min=1,max='**',defaut=None,fr="Renseignement de la liste des amortissements modaux reduits (en %), la taille de la liste doit etre egale au nombre de modes constituant la base de projection"), - ),# fin AMOR_REDUIT - VITESSE_ROTATION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la vitesse de rotation (tr/min)"), - - CHARGES= FACT(statut='o',min=1,max='**',fr="Definition et renseignement du chargement applique", - TYPE = SIMP(statut='o',typ='TXM',into=('POIDS','BALOURD','FORCE','MOMENT','HARMONIQUE'),defaut=None,min=1,max=1,fr="Choix du type de chargement a appliquer"), - BALOURD = BLOC(condition = "TYPE == 'BALOURD' ",fr="Chargement de type balourd", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique le balourd (m)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude du balourd (kg.m)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge balourd (degres)"), - INST_APPLI= SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement de l'instant d'apparition du balourd (s)"), - TEMPS_MONTEE=SIMP(statut='f',typ='R',min=1,max=1,defaut=0,fr="Renseignement du temps necessaire pour atteindre l'amplitude nominale du balourd (s)"), - ),# fin BALOURD - POIDS = BLOC(condition = "TYPE == 'POIDS' ",fr="Prise en compte du champ de pesanteur", - GRAVITE = SIMP(statut='o',typ='R',defaut=9.81,fr="Renseignement de l'intensite de la gravite (m/s^2)"), - DIRECTION = SIMP(statut='o',typ='R',min=3,max=3,defaut=(1,0,0),fr="Renseignement de la direction de la force de gravite"), - ), # fin POIDS - FORCE = BLOC(condition = "TYPE == 'FORCE' ",fr="Application d'une force ponctuelle", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), - #FONC_APPLI = SIMP(statut='f',typ='R',min=2,max=2,defaut=None,fr="Renseignement de la fonction appliquee"), - ), # fin FORCE - MOMENT = BLOC(condition = "TYPE == 'MOMENT' ",fr="Application d'un moment ponctuel", - POSITION = SIMP(statut='o',typ='R',defaut=None,fr="Renseignement de la position axiale ou s'applique le moment (m)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=3,max=3,defaut=None,fr="Renseignement des 3 composantes decrivant le moment (N/m)"), - ), # fin MOMENT - HARMONIQUE = BLOC(condition = "TYPE == 'HARMONIQUE' ",fr="Charge harmonique", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la position axiale ou s'applique la charge harmonique (m)"), - FREQUENCE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la frequence d'excitation harmonique (Hz)"), - MAGNITUDE = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de l'amplitude de la charge harmonique, (N)"), - #FONC_APPLI = SIMP(statut='o',typ='R',min=1,max='**',defaut=None,fr="Renseignement de la fonction appliquee de la charge harmonique (autant de valeurs que de vitesses de rotation)"), - PHASE_DEG = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement du decalage de la phase de la charge harmonique (degres)"), - TYPE_DDL = SIMP(statut='o',typ='TXM',min=1,max=1,into=('DX','DRX','DY','DRY','DZ','DRZ'),defaut=None,fr="Renseignement du DDL sur lequel s'applique la charge harmonique"), - ), # fin HARMONIQUE - ), #fin CHARGES - ETAT_INIT = FACT(statut='o',fr="Renseignement de l'etat initial du calcul", - #RESULTAT = SIMP(statut='o',typ=('sd_resultat'),max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), - # 20121126 - #RESULTAT = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Choix de la structure de donnees resultat de code aster "), - INST_INIT = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de l'instant initial a partir duquel il faut lancer le calcul (s)"), - ), # fin ETAT_INIT - #PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS','LIST_INST'),defaut=None,fr="Choix du type de parametrage temporel"), - # 20121126 - PARAM_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('PAS'),defaut="PAS",fr="Choix du type de discretisation temporelle",), - PAS = BLOC(condition = "PARAM_TEMPS == 'PAS' ",fr="Renseignement de pas de temps", - PAS_ASTER = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps d'integration Code_Aster (en s)",), - PAS_EDYOS = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement du pas de temps d'integration Edyos (en s)",), - INST_FIN = SIMP(statut='o',typ='R',max=1,defaut=None,fr="Renseignement de l'instant final du calcul (en s)",), - ), # fin TEMPS_PAS - #LIST_INST = BLOC(condition = "PARAM_TEMPS == 'LIST_INST' ",fr="Renseignement d'une liste de pas", - #LISTE = SIMP(statut='f',typ='R',min=1,max='**',defaut=None,fr="Renseignement d'une liste de pas"), - #), # fin LIST_INST - PAS_ARCHIVAGE = SIMP(statut='o',typ='I',max=1,defaut=1,fr="Renseignement du pas d'archivage des resultats (une sauvegarde tous les 'PAS_ARCHIVAGE' instants d'integration)",), - PARA_MEM = SIMP(statut='f',typ='I',max=1,defaut=6400,fr="Renseigner la taille maximale de la memoire (Mo)",), - PARA_CPU = SIMP(statut='f',typ='I',max=1,defaut=10000,fr="Renseigner le temps CPU maximal (s)",), - SCHEMA_TEMPS = SIMP(statut='o',typ='TXM',max=1,into=('EULER','ADAPT_ORDRE1','ADAPT_ORDRE2'),defaut='ADAPT_ORDRE2',fr="Choix d'un schema d'integration temporelle"), - - ## POST_TRAITEMENTS de l'analyse transitoire - POST_TRAITEMENTS = FACT(statut='o',max='**',fr="Definition et renseignement des post-traitements", - TYPE = SIMP(statut='o',typ='TXM',into=('DEPL_ABS','DEPL_RELA','EFFORTS_PAL','CONTRAINTES'),defaut=None,fr="Choix du type de post-traitement"), - DEPL = BLOC(condition = "TYPE in ('DEPL_ABS','DEPL_RELA') ",fr="Deplacement", - POSITION = SIMP(statut='o',typ='R',min=1,max=1,defaut=None,fr="Renseignement de la coordonnee du deplacement"), - PALIER = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), - ), # fin DEPL - # pas d'info à rentrer pour les efforts palier (post-traitement sur tout les paliers) - #EFFORTS_PAL = BLOC(condition = "TYPE == 'EFFORTS_PAL'", fr = "Efforts paliers", - #PALIER = SIMP(statut='o',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette du palier"), - #), # fin EFFORTS_PAL - CONTRAINTES = BLOC(condition = "TYPE == 'CONTRAINTES' ",fr="Export des contraintes", - regles=UN_PARMI('POSITION','ZONE','TOUT'), - POSITION = SIMP(statut='f',typ='R',max=1,defaut=None,fr="Renseignement de la coordonnee de la contrainte"), - ZONE = SIMP(statut='f',typ='TXM',max=1,defaut=None,fr="Renseignement de l'etiquette de la zone de la contrainte"), - TOUT = SIMP(statut='f',typ='TXM',into=('OUI'),max=1,fr="Export pour tous les noeuds"), - ), # fin CONTRAINTES - ), # fin POST_TRAITEMENTS - - - ), # fin ANALYSE_TRANSITOIRE_ACCIDENTEL - -)# fin SPECIFICATION_ANALYSE diff --git a/SPECA/configuration_SPECA.py b/SPECA/configuration_SPECA.py deleted file mode 100644 index b9b56fe0..00000000 --- a/SPECA/configuration_SPECA.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -# CONFIGURATION MANAGEMENT OF EDF VERSION -# ====================================================================== -# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# -# -# ====================================================================== -""" - Ce module sert pour charger les paramètres de configuration d'EFICAS -""" -# Modules Python -from InterfaceQT4 import configuration -import os - - -class CONFIG(configuration.CONFIG_BASE): - - #----------------------------------- - def __init__(self,appli,repIni): - #----------------------------------- - - self.labels_user=['catalogues','lang'] - self.labels_eficas=['lang','rep_cata','catalogues'] - - configuration.CONFIG_BASE.__init__(self,appli,repIni) - - -def make_config(appli,rep): - return CONFIG(appli,rep) - diff --git a/SPECA/prefs.py b/SPECA/prefs.py deleted file mode 100644 index cba83434..00000000 --- a/SPECA/prefs.py +++ /dev/null @@ -1,4 +0,0 @@ -code='SPECA' -import sys, os -if os.path.abspath(__file__) not in sys.path : - sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/SPECA/prefs_SPECA.py b/SPECA/prefs_SPECA.py deleted file mode 100644 index 21b1e76c..00000000 --- a/SPECA/prefs_SPECA.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -# CONFIGURATION MANAGEMENT OF EDF VERSION -# ====================================================================== -# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# -# -# ====================================================================== - -import os,sys -# repIni sert a localiser le fichier editeur.ini -# Obligatoire -repIni=os.path.dirname(os.path.abspath(__file__)) -INSTALLDIR=os.path.join(repIni,'..') -sys.path[:0]=[INSTALLDIR] - -# lang indique la langue utilisee pour les chaines d'aide : fr ou ang -lang='fr' - -# Codage des strings qui accepte les accents (en remplacement de 'ascii') -encoding='iso-8859-1' - -# -catalogues=( - ('SPECA','V2016',os.path.join(repIni,'SPECA_Cata_V2016.py'),'python','python'), -) diff --git a/SPECA/properties.py b/SPECA/properties.py deleted file mode 100644 index 1d328a46..00000000 --- a/SPECA/properties.py +++ /dev/null @@ -1,24 +0,0 @@ -#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR -# RESPONSABLE D6BHHHH J-P.LEFEBVRE -# ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# ====================================================================== -# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR -# DE LA VERSION DU CODE_ASTER ASSOCIE -#---------------------------------------------------------------------- -version = "1.2" -date = "25/05/2010" -exploit = False diff --git a/SPECA/qtEficasSPECA.py b/SPECA/qtEficasSPECA.py deleted file mode 100755 index e02b8c74..00000000 --- a/SPECA/qtEficasSPECA.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -""" - Ce module sert a lancer EFICAS configure pour MAP -""" -# Modules Python -# Modules Eficas -import prefs -name='prefs_'+prefs.code -__import__(name) - - -import sys,os -sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) - -import prefs -from InterfaceQT4 import eficas_go -eficas_go.lance_eficas(code=prefs.code) diff --git a/Telemac/__init__.py b/Telemac/__init__.py index df53d551..5b4f0e3b 100644 --- a/Telemac/__init__.py +++ b/Telemac/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Telemac/aideAuxConvertisseurs.py b/Telemac/aideAuxConvertisseurs.py index a00a8f27..1959e19f 100644 --- a/Telemac/aideAuxConvertisseurs.py +++ b/Telemac/aideAuxConvertisseurs.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Telemac/mascaret/CMakeLists.txt b/Telemac/mascaret/CMakeLists.txt new file mode 100644 index 00000000..deb3c655 --- /dev/null +++ b/Telemac/mascaret/CMakeLists.txt @@ -0,0 +1,31 @@ +# Copyright (C) 2012-2013 EDF +# +# This file is part of SALOME HYDRO module. +# +# SALOME HYDRO module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SALOME HYDRO module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SALOME HYDRO module. If not, see . + +# --- Python files --- + +SET(PYFILES + __init__.py + appli.py + configuration_mascaret.py + prefs_mascaret.py + prefs.py + mascaret_V7_cata.py +) + +# --- rules --- + +SALOME_INSTALL_SCRIPTS("${PYFILES}" ${SALOME_INSTALL_PYTHON}/salome/hydro/mascaret/eficas) diff --git a/Telemac/mascaret/__init__.py b/Telemac/mascaret/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/Telemac/mascaret/appli.py b/Telemac/mascaret/appli.py new file mode 100644 index 00000000..754a7192 --- /dev/null +++ b/Telemac/mascaret/appli.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2012-2021 EDF +# +# This file is part of SALOME HYDRO module. +# +# SALOME HYDRO module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SALOME HYDRO module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SALOME HYDRO module. If not, see . + +import os +import sys +import re + +from PyQt5.QtWidgets import QMessageBox + + +import salome +import SalomePyQt +sgPyQt = SalomePyQt.SalomePyQt() + +from salome.kernel.logger import Logger +from salome.kernel import termcolor +logger = Logger("salome.hydro.mascaret.eficas.appli", + color = termcolor.GREEN_FG) + +import eficasSalome + +from salome.hydro.study import HydroStudyEditor + +class EficasForMascaretAppli(eficasSalome.MyEficas): + """ + This class launches Eficas and adds entries for the created files in + MASCARET component in the study tree. The messages in this class are in + french because they are displayed in Eficas interface. + + :type fichier: string + :param fichier: path of an Eficas file to open + + """ + def __init__(self, fichier = None, version = None): + self.ed = HydroStudyEditor() + self.codedir = os.path.dirname(__file__) + sys.path[:0] = [self.codedir] + eficasSalome.MyEficas.__init__(self, sgPyQt.getDesktop(), + "mascaret", + fichier, version = version) + sgPyQt.createView("Eficas Mascaret", self) + + def addJdcInSalome(self, jdcPath): + """ + Add the newly created file in Salome study + """ + try: + self.ed.find_or_create_mascaret_case(jdcPath) + except Exception, exc: + msgError = "Can't add file to Salome study tree" + logger.exception(msgError) + QMessageBox.warning(self, self.tr("Warning"), + self.tr("%s. Reason:\n%s\n\nSee logs for " + "more details." % (msgError, exc))) + salome.sg.updateObjBrowser(0) + + def closeEvent(self, event): + while self.codedir in sys.path: + sys.path.remove(self.codedir) + eficasSalome.MyEficas.closeEvent(self, event) diff --git a/Telemac/mascaret/configuration_mascaret.py b/Telemac/mascaret/configuration_mascaret.py new file mode 100644 index 00000000..08fd6d9a --- /dev/null +++ b/Telemac/mascaret/configuration_mascaret.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2012-2021 EDF +# +# This file is part of SALOME HYDRO module. +# +# SALOME HYDRO module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SALOME HYDRO module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SALOME HYDRO module. If not, see . + +import os + +from Editeur.catadesc import CatalogDescription +from InterfaceQT4.configuration import CONFIG_BASE + +class CONFIG(CONFIG_BASE): + + def __init__(self, appli, repIni): + """ + This class stores the configuration parameters for Eficas + """ + CONFIG_BASE.__init__(self, appli, repIni) + + # Configuration parameters + self.savedir = os.getenv("HOME") + self.catalogues = (CatalogDescription("mascaret_V7", + os.path.join(repIni, "mascaret_V7_cata.py")),) + self.lang = 'fr' + + def save_params(self): + pass + +def make_config(appli, rep): + return CONFIG(appli, rep) + +def make_config_style(appli, rep): + return None diff --git a/Telemac/mascaret/mascaret_V7_cata.py b/Telemac/mascaret/mascaret_V7_cata.py new file mode 100644 index 00000000..c3a97a34 --- /dev/null +++ b/Telemac/mascaret/mascaret_V7_cata.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2012-2013 EDF +# +# This file is part of SALOME HYDRO module. +# +# SALOME HYDRO module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SALOME HYDRO module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SALOME HYDRO module. If not, see . + +from Accas import * + +JdC = JDC_CATA(regles = (UN_PARMI('MASCARET',)), + ) + +MASCARET = PROC( + nom = "MASCARET", op = None, + fr = u"Définition d'un cas d'étude Mascaret", + ang = u"Definition of a Mascaret study case", + FICHIER_DICO = SIMP(statut = "o", typ = 'Fichier', + fr = u"Fichier Dictionnaire", + ang = u"Dictionary file"), + FICHIER_MOT_CLE = SIMP(statut = "o", + typ = ('Fichier', 'Fichiers CAS (*.cas);;Tous les fichiers (*)',), + fr = u"Fichier Mot Clé", + ang = u"Keyword file"), + FICHIER_GEOMETRIE = SIMP(statut = "f", + typ = ('Fichier', 'Fichiers GEO (*.geo);;Tous les fichiers (*)',), + fr = u"Fichier de géométrie", + ang = u"Geometry file"), + FICHIER_LOI = FACT(statut = 'f', max = '**', + NOM = SIMP(statut = "o", + typ = ('Fichier', 'Fichiers LOI (*.loi);;Tous les fichiers (*)',), + fr = u"Fichier de lois", + ang = u"Laws file"), + ), + FICHIER_ABAQUES = SIMP(statut = "f", + typ = ('Fichier', 'Tous les fichiers (*)',), + fr = u"Fichier abaques", + ang = u"Abacus file"), + FICHIER_CASIER = SIMP(statut = "f", + typ = ('Fichier', 'Tous les fichiers (*)',), + fr = u"Fichier casier", + ang = u"Compartment file"), + FICHIER_DAMOCLE = SIMP(statut = "f", + typ = ('Fichier', 'Tous les fichiers (*)',), + fr = u"Fichier damocle", + ang = u"Damocle file"), + FICHIER_LIG = SIMP(statut = "o", + typ = ('Fichier', 'Fichiers LIG (*.lig);;Tous les fichiers (*)',), + fr = u"Fichier LIG", + ang = u"LIG file"), + LISTING = SIMP(statut = "f", + typ = ('Fichier', 'Tous les fichiers (*)', "Sauvegarde"), + fr = u"Fichier de listing", + ang = u"Listing file"), + LISTING_CASIER = SIMP(statut = "f", + typ = ('Fichier', 'Tous les fichiers (*)', "Sauvegarde"), + fr = u"Fichier de listing casier", + ang = u"Compartment listing file"), + LISTING_LIAISON = SIMP(statut = "f", + typ = ('Fichier', 'Tous les fichiers (*)', "Sauvegarde"), + fr = u"Fichier de listing liaison", + ang = u"Link listing file"), + RESULTAT = SIMP(statut = "f", + typ = ('Fichier', 'Tous les fichiers (*)', "Sauvegarde"), + fr = u"Fichier de résultat", + ang = u"Result file"), + RESULTAT_CASIER = SIMP(statut = "f", + typ = ('Fichier', 'Tous les fichiers (*)', "Sauvegarde"), + fr = u"Fichier de résultat casier", + ang = u"Compartment result file"), + RESULTAT_LIAISON = SIMP(statut = "f", + typ = ('Fichier', 'Tous les fichiers (*)', "Sauvegarde"), + fr = u"Fichier de résultat liaison", + ang = u"Link result file"), + VARIABLE_SORTIE = FACT(statut = 'f', max = '**', + fr = u"Variable de sortie du calcul", + ang = u"Computation output variable", + NOM = SIMP(statut = "o", typ = 'TXM', + fr = u"Nom de la variable", + ang = u"Variable name"), + VARIABLE_MASCARET = SIMP(statut = "o", typ = 'TXM', + fr = u'Variable Mascaret (ex : "Etat.Z(1,0,0)")', + ang = u'Mascaret variable (ex : "Etat.Z(1,0,0)")'), + ), + VARIABLE_ENTREE = FACT(statut = 'f', max = '**', + fr = u"Variable d'entrée du calcul", + ang = u"Computation input variable", + NOM = SIMP(statut = "o", typ = 'TXM', + fr = u"Nom de la variable", + ang = u"Variable name"), + VARIABLE_MASCARET = SIMP(statut = "o", typ = 'TXM', + fr = u'Variable Mascaret (ex : "Modele.Lois.Debit(1,1-2,0)")', + ang = u'Mascaret variable (ex : "Modele.Lois.Debit(1,1-2,0)")'), + ), +) +TEXTE_NEW_JDC="MASCARET()" diff --git a/Telemac/mascaret/prefs.py b/Telemac/mascaret/prefs.py new file mode 100644 index 00000000..d0e8113c --- /dev/null +++ b/Telemac/mascaret/prefs.py @@ -0,0 +1,18 @@ +# Copyright (C) 2012-2013 EDF +# +# This file is part of SALOME HYDRO module. +# +# SALOME HYDRO module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SALOME HYDRO module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SALOME HYDRO module. If not, see . + +code = "mascaret" diff --git a/Telemac/mascaret/prefs_mascaret.py b/Telemac/mascaret/prefs_mascaret.py new file mode 100644 index 00000000..2586f5f8 --- /dev/null +++ b/Telemac/mascaret/prefs_mascaret.py @@ -0,0 +1,28 @@ +# Copyright (C) 2012-2021 EDF +# +# This file is part of SALOME HYDRO module. +# +# SALOME HYDRO module is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SALOME HYDRO module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SALOME HYDRO module. If not, see . + +import os +import sys + +repIni = os.path.dirname(__file__) +INSTALLDIR = os.getenv("EFICAS_ROOT") +closeAutreCommande=True +closeFrameRechercheCommande=True +closeArbre=True +closeCopier=True +suiteTelemac=True + diff --git a/Telemac/prefs.py b/Telemac/prefs.py index f1db1e19..ca9d5417 100644 --- a/Telemac/prefs.py +++ b/Telemac/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Telemac/qtEficas_Telemac.py b/Telemac/qtEficas_Telemac.py index c140518c..ddae9fc4 100755 --- a/Telemac/qtEficas_Telemac.py +++ b/Telemac/qtEficas_Telemac.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Tests/EficasEngineTest.py b/Tests/EficasEngineTest.py index 1718c601..bdd7cc45 100644 --- a/Tests/EficasEngineTest.py +++ b/Tests/EficasEngineTest.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Tests/HTMLTestRunner.py b/Tests/HTMLTestRunner.py deleted file mode 100644 index 0439bf48..00000000 --- a/Tests/HTMLTestRunner.py +++ /dev/null @@ -1,824 +0,0 @@ -""" -A TestRunner for use with the Python unit testing framework. It -generates a HTML report to show the result at a glance. - -The simplest way to use this is to invoke its main method. E.g. - - import unittest - import HTMLTestRunner - - ... define your tests ... - - if __name__ == '__main__': - HTMLTestRunner.main() - - -For more customization options, instantiates a HTMLTestRunner object. -HTMLTestRunner is a counterpart to unittest's TextTestRunner. E.g. - - # output to a file - fp = file('my_report.html', 'wb') - runner = HTMLTestRunner.HTMLTestRunner( - stream=fp, - title='My unit test', - description='This demonstrates the report output by HTMLTestRunner.' - ) - - # Use an external stylesheet. - # See the Template_mixin class for more customizable options - runner.STYLESHEET_TMPL = '' - - # run the test - runner.run(my_test_suite) - - ------------------------------------------------------------------------- -Copyright (c) 2004-2007, Wai Yip Tung -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name Wai Yip Tung nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -""" - -# URL: http://tungwaiyip.info/software/HTMLTestRunner.html - -__author__ = "Wai Yip Tung" -__version__ = "0.8.2" - - -""" -Change History - -Version 0.8.2 -* Show output inline instead of popup window (Viorel Lupu). - -Version in 0.8.1 -* Validated XHTML (Wolfgang Borgert). -* Added description of test classes and test cases. - -Version in 0.8.0 -* Define Template_mixin class for customization. -* Workaround a IE 6 bug that it does not treat - -%(heading)s -%(report)s -%(ending)s - - - -""" - # variables: (title, generator, stylesheet, heading, report, ending) - - - # ------------------------------------------------------------------------ - # Stylesheet - # - # alternatively use a for external style sheet, e.g. - # - - STYLESHEET_TMPL = """ - -""" - - - - # ------------------------------------------------------------------------ - # Heading - # - - HEADING_TMPL = """
-

%(title)s

-%(parameters)s -

%(description)s

-
- -""" # variables: (title, parameters, description) - - HEADING_ATTRIBUTE_TMPL = """

%(name)s: %(value)s

-""" # variables: (name, value) - - - - # ------------------------------------------------------------------------ - # Report - # - - REPORT_TMPL = """ -

Show -Summary -Failed -All -

- -------- - - - - - - - - -%(test_list)s - - - - - - - - -
Test Group/Test caseCountPassFailErrorView
Total%(count)s%(Pass)s%(fail)s%(error)s 
-""" # variables: (test_list, count, Pass, fail, error) - - REPORT_CLASS_TMPL = r""" - - %(desc)s - %(count)s - %(Pass)s - %(fail)s - %(error)s - Detail - -""" # variables: (style, desc, count, Pass, fail, error, cid) - - - REPORT_TEST_WITH_OUTPUT_TMPL = r""" - -
%(desc)s
- - - - - %(status)s - - - - - - -""" # variables: (tid, Class, style, desc, status) - - - REPORT_TEST_NO_OUTPUT_TMPL = r""" - -
%(desc)s
- %(status)s - -""" # variables: (tid, Class, style, desc, status) - - - REPORT_TEST_OUTPUT_TMPL = r""" -%(id)s: %(output)s -""" # variables: (id, output) - - - - # ------------------------------------------------------------------------ - # ENDING - # - - ENDING_TMPL = """
 
""" - -# -------------------- The end of the Template class ------------------- - - -TestResult = unittest.TestResult - -class _TestResult(TestResult): - # note: _TestResult is a pure representation of results. - # It lacks the output and reporting ability compares to unittest._TextTestResult. - - def __init__(self, verbosity=1): - TestResult.__init__(self) - self.stdout0 = None - self.stderr0 = None - self.success_count = 0 - self.failure_count = 0 - self.error_count = 0 - self.verbosity = verbosity - - # result is a list of result in 4 tuple - # ( - # result code (0: success; 1: fail; 2: error), - # TestCase object, - # Test output (byte string), - # stack trace, - # ) - self.result = [] - - - def startTest(self, test): - TestResult.startTest(self, test) - # just one buffer for both stdout and stderr - self.outputBuffer = StringIO.StringIO() - stdout_redirector.fp = self.outputBuffer - stderr_redirector.fp = self.outputBuffer - self.stdout0 = sys.stdout - self.stderr0 = sys.stderr - sys.stdout = stdout_redirector - sys.stderr = stderr_redirector - - - def complete_output(self): - """ - Disconnect output redirection and return buffer. - Safe to call multiple times. - """ - if self.stdout0: - sys.stdout = self.stdout0 - sys.stderr = self.stderr0 - self.stdout0 = None - self.stderr0 = None - return self.outputBuffer.getvalue() - - - def stopTest(self, test): - # Usually one of addSuccess, addError or addFailure would have been called. - # But there are some path in unittest that would bypass this. - # We must disconnect stdout in stopTest(), which is guaranteed to be called. - self.complete_output() - - - def addSuccess(self, test): - self.success_count += 1 - TestResult.addSuccess(self, test) - output = self.complete_output() - self.result.append((0, test, output, '')) - if self.verbosity > 1: - sys.stderr.write('ok ') - sys.stderr.write(str(test)) - sys.stderr.write('\n') - else: - sys.stderr.write('.') - - def addError(self, test, err): - self.error_count += 1 - TestResult.addError(self, test, err) - _, _exc_str = self.errors[-1] - output = self.complete_output() - self.result.append((2, test, output, _exc_str)) - if self.verbosity > 1: - sys.stderr.write('E ') - sys.stderr.write(str(test)) - sys.stderr.write('\n') - else: - sys.stderr.write('E') - - def addFailure(self, test, err): - self.failure_count += 1 - TestResult.addFailure(self, test, err) - _, _exc_str = self.failures[-1] - output = self.complete_output() - self.result.append((1, test, output, _exc_str)) - if self.verbosity > 1: - sys.stderr.write('F ') - sys.stderr.write(str(test)) - sys.stderr.write('\n') - else: - sys.stderr.write('F') - - -class HTMLTestRunner(Template_mixin): - """ - """ - def __init__(self, stream=sys.stdout, verbosity=1, title=None, description=None): - self.stream = stream - self.verbosity = verbosity - if title is None: - self.title = self.DEFAULT_TITLE - else: - self.title = title - if description is None: - self.description = self.DEFAULT_DESCRIPTION - else: - self.description = description - - self.startTime = datetime.datetime.now() - - - def run(self, test): - "Run the given test case or test suite." - result = _TestResult(self.verbosity) - test(result) - self.stopTime = datetime.datetime.now() - self.generateReport(test, result) - print >>sys.stderr, '\nTime Elapsed: %s' % (self.stopTime-self.startTime) - return result - - - def sortResult(self, result_list): - # unittest does not seems to run in any particular order. - # Here at least we want to group them together by class. - rmap = {} - classes = [] - for n,t,o,e in result_list: - cls = t.__class__ - if not rmap.has_key(cls): - rmap[cls] = [] - classes.append(cls) - rmap[cls].append((n,t,o,e)) - r = [(cls, rmap[cls]) for cls in classes] - return r - - - def getReportAttributes(self, result): - """ - Return report attributes as a list of (name, value). - Override this to add custom attributes. - """ - startTime = str(self.startTime)[:19] - duration = str(self.stopTime - self.startTime) - status = [] - if result.success_count: status.append('Pass %s' % result.success_count) - if result.failure_count: status.append('Failure %s' % result.failure_count) - if result.error_count: status.append('Error %s' % result.error_count ) - if status: - status = ' '.join(status) - else: - status = 'none' - return [ - ('Start Time', startTime), - ('Duration', duration), - ('Status', status), - ] - - - def generateReport(self, test, result): - report_attrs = self.getReportAttributes(result) - generator = 'HTMLTestRunner %s' % __version__ - stylesheet = self._generate_stylesheet() - heading = self._generate_heading(report_attrs) - report = self._generate_report(result) - ending = self._generate_ending() - output = self.HTML_TMPL % dict( - title = saxutils.escape(self.title), - generator = generator, - stylesheet = stylesheet, - heading = heading, - report = report, - ending = ending, - ) - self.stream.write(output.encode('utf8')) - - - def _generate_stylesheet(self): - return self.STYLESHEET_TMPL - - - def _generate_heading(self, report_attrs): - a_lines = [] - for name, value in report_attrs: - line = self.HEADING_ATTRIBUTE_TMPL % dict( - name = saxutils.escape(name), - value = saxutils.escape(value), - ) - a_lines.append(line) - heading = self.HEADING_TMPL % dict( - title = saxutils.escape(self.title), - parameters = ''.join(a_lines), - description = saxutils.escape(self.description), - ) - return heading - - - def _generate_report(self, result): - rows = [] - sortedResult = self.sortResult(result.result) - for cid, (cls, cls_results) in enumerate(sortedResult): - # subtotal for a class - np = nf = ne = 0 - for n,t,o,e in cls_results: - if n == 0: np += 1 - elif n == 1: nf += 1 - else: ne += 1 - - # format class description - if cls.__module__ == "__main__": - name = cls.__name__ - else: - name = "%s.%s" % (cls.__module__, cls.__name__) - doc = cls.__doc__ and cls.__doc__.split("\n")[0] or "" - desc = doc and '%s: %s' % (name, doc) or name - - row = self.REPORT_CLASS_TMPL % dict( - style = ne > 0 and 'errorClass' or nf > 0 and 'failClass' or 'passClass', - desc = desc, - count = np+nf+ne, - Pass = np, - fail = nf, - error = ne, - cid = 'c%s' % (cid+1), - ) - rows.append(row) - - for tid, (n,t,o,e) in enumerate(cls_results): - self._generate_report_test(rows, cid, tid, n, t, o, e) - - report = self.REPORT_TMPL % dict( - test_list = ''.join(rows), - count = str(result.success_count+result.failure_count+result.error_count), - Pass = str(result.success_count), - fail = str(result.failure_count), - error = str(result.error_count), - ) - return report - - - def _generate_report_test(self, rows, cid, tid, n, t, o, e): - # e.g. 'pt1.1', 'ft1.1', etc - has_output = bool(o or e) - tid = (n == 0 and 'p' or 'f') + 't%s.%s' % (cid+1,tid+1) - name = t.id().split('.')[-1] - doc = t.shortDescription() or "" - desc = doc and ('%s: %s' % (name, doc)) or name - tmpl = has_output and self.REPORT_TEST_WITH_OUTPUT_TMPL or self.REPORT_TEST_NO_OUTPUT_TMPL - - # o and e should be byte string because they are collected from stdout and stderr? - if isinstance(o,str): - # TODO: some problem with 'string_escape': it escape \n and mess up formating - # uo = unicode(o.encode('string_escape')) - uo = o.decode('latin-1') - else: - uo = o - if isinstance(e,str): - # TODO: some problem with 'string_escape': it escape \n and mess up formating - # ue = unicode(e.encode('string_escape')) - ue = e.decode('latin-1') - else: - ue = e - - script = self.REPORT_TEST_OUTPUT_TMPL % dict( - id = tid, - output = saxutils.escape(uo+ue), - ) - - row = tmpl % dict( - tid = tid, - Class = (n == 0 and 'hiddenRow' or 'none'), - style = n == 2 and 'errorCase' or (n == 1 and 'failCase' or 'none'), - desc = desc, - script = script, - status = self.STATUS[n], - ) - rows.append(row) - if not has_output: - return - - def _generate_ending(self): - return self.ENDING_TMPL - - -############################################################################## -# Facilities for running tests from the command line -############################################################################## - -# Note: Reuse unittest.TestProgram to launch test. In the future we may -# build our own launcher to support more specific command line -# parameters like test title, CSS, etc. -class TestProgram(unittest.TestProgram): - """ - A variation of the unittest.TestProgram. Please refer to the base - class for command line parameters. - """ - def runTests(self): - # Pick HTMLTestRunner as the default test runner. - # base class's testRunner parameter is not useful because it means - # we have to instantiate HTMLTestRunner before we know self.verbosity. - if self.testRunner is None: - self.testRunner = HTMLTestRunner(verbosity=self.verbosity) - unittest.TestProgram.runTests(self) - -main = TestProgram - -############################################################################## -# Executing this module from the command line -############################################################################## - -if __name__ == "__main__": - main(module=None) diff --git a/Traducteur/__init__.py b/Traducteur/__init__.py index e4044aec..5b4f0e3b 100644 --- a/Traducteur/__init__.py +++ b/Traducteur/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/calcG.py b/Traducteur/calcG.py index 0fb34d91..b31fad10 100644 --- a/Traducteur/calcG.py +++ b/Traducteur/calcG.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/changeValeur.py b/Traducteur/changeValeur.py index f9130016..22d1bf91 100644 --- a/Traducteur/changeValeur.py +++ b/Traducteur/changeValeur.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/dictErreurs.py b/Traducteur/dictErreurs.py index 1f057c3e..e15e4e5e 100644 --- a/Traducteur/dictErreurs.py +++ b/Traducteur/dictErreurs.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/inseremocle.py b/Traducteur/inseremocle.py index 98448b99..1745d487 100644 --- a/Traducteur/inseremocle.py +++ b/Traducteur/inseremocle.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/load.py b/Traducteur/load.py index 2375e805..850c2c0c 100644 --- a/Traducteur/load.py +++ b/Traducteur/load.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/log.py b/Traducteur/log.py index 15b0f9c1..cd1b62e0 100644 --- a/Traducteur/log.py +++ b/Traducteur/log.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/mocles.py b/Traducteur/mocles.py index 08b2c765..17387062 100644 --- a/Traducteur/mocles.py +++ b/Traducteur/mocles.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/movemocle.py b/Traducteur/movemocle.py index d75ae999..9c67ff9b 100644 --- a/Traducteur/movemocle.py +++ b/Traducteur/movemocle.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/parseur.py b/Traducteur/parseur.py index e715f2a9..7c8e8830 100644 --- a/Traducteur/parseur.py +++ b/Traducteur/parseur.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/regles.py b/Traducteur/regles.py index dd11ff29..829649b5 100644 --- a/Traducteur/regles.py +++ b/Traducteur/regles.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/removemocle.py b/Traducteur/removemocle.py index f9da5345..98152fbc 100644 --- a/Traducteur/removemocle.py +++ b/Traducteur/removemocle.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/renamemocle.py b/Traducteur/renamemocle.py index 188a24a6..1ef63624 100644 --- a/Traducteur/renamemocle.py +++ b/Traducteur/renamemocle.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/traduitV10V11.py b/Traducteur/traduitV10V11.py index aeb62ea8..2ceec81b 100755 --- a/Traducteur/traduitV10V11.py +++ b/Traducteur/traduitV10V11.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/traduitV11V12.py b/Traducteur/traduitV11V12.py index 37212deb..47df1bfe 100755 --- a/Traducteur/traduitV11V12.py +++ b/Traducteur/traduitV11V12.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/traduitV7V8.py b/Traducteur/traduitV7V8.py index 5f3b6888..f8303044 100644 --- a/Traducteur/traduitV7V8.py +++ b/Traducteur/traduitV7V8.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/traduitV8V9.py b/Traducteur/traduitV8V9.py index 224e781b..96b4fd0a 100644 --- a/Traducteur/traduitV8V9.py +++ b/Traducteur/traduitV8V9.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/traduitV9V10.py b/Traducteur/traduitV9V10.py index 45570a61..8dadf504 100755 --- a/Traducteur/traduitV9V10.py +++ b/Traducteur/traduitV9V10.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/utils.py b/Traducteur/utils.py index 9ab9601c..a8cea6c3 100644 --- a/Traducteur/utils.py +++ b/Traducteur/utils.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Traducteur/visiteur.py b/Traducteur/visiteur.py index b58fcba9..d3f9c5a3 100644 --- a/Traducteur/visiteur.py +++ b/Traducteur/visiteur.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/Validation/__init__.py b/Validation/__init__.py index 7b9eef3b..5e849d28 100644 --- a/Validation/__init__.py +++ b/Validation/__init__.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/VirtualPolymer/prefs.py b/VirtualPolymer/prefs.py index 6554d133..0b82747e 100644 --- a/VirtualPolymer/prefs.py +++ b/VirtualPolymer/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2012 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/VirtualPolymer/qtEficasVP.py b/VirtualPolymer/qtEficasVP.py index 00ced3c4..604bebab 100755 --- a/VirtualPolymer/qtEficasVP.py +++ b/VirtualPolymer/qtEficasVP.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/boundary_conditions/CMakeLists.txt b/boundary_conditions/CMakeLists.txt deleted file mode 100644 index 9d5d3202..00000000 --- a/boundary_conditions/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2012-2013 EDF -# -# This file is part of SALOME HYDRO module. -# -# SALOME HYDRO module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SALOME HYDRO module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SALOME HYDRO module. If not, see . - -# --- Python files --- - -SET(PYFILES - __init__.py - configuration_boundary_conditions.py - prefs_boundary_conditions.py - prefs.py - boundary_conditions_cata.py - appli.py - generator_boundary_conditions.py -) - -# --- rules --- - -SALOME_INSTALL_SCRIPTS("${PYFILES}" ${SALOME_INSTALL_PYTHON}/salome/hydro/boundary_conditions/eficas) diff --git a/boundary_conditions/__init__.py b/boundary_conditions/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/boundary_conditions/appli.py b/boundary_conditions/appli.py deleted file mode 100644 index b3783292..00000000 --- a/boundary_conditions/appli.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (C) 2012-2013 EDF -# -# This file is part of SALOME HYDRO module. -# -# SALOME HYDRO module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SALOME HYDRO module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SALOME HYDRO module. If not, see . - -import os -import sys - -import SalomePyQt -sgPyQt = SalomePyQt.SalomePyQt() - -import eficasSalome - -class EficasForBoundaryConditionsAppli(eficasSalome.MyEficas): - """ - This class launches Eficas with "boundary_conditions" catalog. - """ - def __init__(self, fichier = None, version = None): - self.codedir = os.path.dirname(__file__) - sys.path[:0] = [self.codedir] - eficasSalome.MyEficas.__init__(self, sgPyQt.getDesktop(), "boundary_conditions", - fichier, version = version) - - def addJdcInSalome(self, jdcPath): - """ - Those files are not added in Salome study tree for now. - """ - pass - - def closeEvent(self, event): - while self.codedir in sys.path: - sys.path.remove(self.codedir) - eficasSalome.MyEficas.closeEvent(self, event) diff --git a/boundary_conditions/boundary_conditions_cata.py b/boundary_conditions/boundary_conditions_cata.py deleted file mode 100644 index f41671c3..00000000 --- a/boundary_conditions/boundary_conditions_cata.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2012-2013 EDF -# -# This file is part of SALOME HYDRO module. -# -# SALOME HYDRO module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SALOME HYDRO module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SALOME HYDRO module. If not, see . - -from Accas import * - -class grma(GEOM): - """ - Class used to define the group on which the boundary condition is defined. - Method __convert__ is redefined to skip the test on the string length. - """ - def __convert__(cls, valeur): - if isinstance(valeur, (str, unicode)): - return valeur.strip() - raise ValueError('A string is expected') - - __convert__ = classmethod(__convert__) - - -JdC = JDC_CATA(regles = (AU_MOINS_UN('BOUNDARY_CONDITION',)), - ) - -BOUNDARY_CONDITION = PROC( - nom = "BOUNDARY_CONDITION", op = None, - fr = u"Définition d'une condition limite pour Telemac2D", - ang = u"Definition of a boundary condition for Telemac2D", - - GROUP = SIMP(statut = "o", typ = grma, - fr = u"Groupe sur lequel la condition limite est définie", - ang = u"Group on which the boundary condition is defined", - ), - LIHBOR = SIMP(statut = "o", typ = "I", - fr = u"Type de condition limite pour la hauteur d'eau", - ang = u"Boundary condition type for the water height", - ), - LIUBOR = SIMP(statut = "o", typ = "I", - fr = u"Type de condition limite pour la composante U de la vitesse", - ang = u"Boundary condition type for the U component of the water velocity", - ), - LIVBOR = SIMP(statut = "o", typ = "I", - fr = u"Type de condition limite pour la composante V de la vitesse", - ang = u"Boundary condition type for the V component of the water velocity", - ), -) diff --git a/boundary_conditions/configuration_boundary_conditions.py b/boundary_conditions/configuration_boundary_conditions.py deleted file mode 100644 index ffed4a66..00000000 --- a/boundary_conditions/configuration_boundary_conditions.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2012-2013 EDF -# -# This file is part of SALOME HYDRO module. -# -# SALOME HYDRO module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SALOME HYDRO module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SALOME HYDRO module. If not, see . - -import os - -from Editeur.catadesc import CatalogDescription -from InterfaceQT4.configuration import CONFIG_BASE - -class CONFIG(CONFIG_BASE): - - def __init__(self, appli, repIni): - """ - This class stores the configuration parameters for Eficas - """ - CONFIG_BASE.__init__(self, appli, repIni) - - # Configuration parameters - self.savedir = os.getenv("HOME") - self.catalogues = (CatalogDescription("boundary_conditions", - os.path.join(repIni, "boundary_conditions_cata.py"), - file_format = "boundary_conditions"),) - self.lang = 'fr' - self.generator_module = "generator_boundary_conditions" - - def save_params(self): - pass - -def make_config(appli, rep): - return CONFIG(appli, rep) - -def make_config_style(appli, rep): - return None diff --git a/boundary_conditions/generator_boundary_conditions.py b/boundary_conditions/generator_boundary_conditions.py deleted file mode 100644 index ea7235dd..00000000 --- a/boundary_conditions/generator_boundary_conditions.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (C) 2012-2013 EDF -# -# This file is part of SALOME HYDRO module. -# -# SALOME HYDRO module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SALOME HYDRO module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SALOME HYDRO module. If not, see . - -import os -from generator.generator_python import PythonGenerator - -def entryPoint(): - return {'name': 'boundary_conditions', - 'factory': BoundaryConditionsGenerator} - -class BoundaryConditionsGenerator(PythonGenerator): - """ - This generator creates files containing associations between groups and - boundary conditions (.bcd files, for Boundary Conditions Definition). - Those files contain one line per group, each line containing four fields - separated by spaces: LIHBOR LIUBOR LIVBOR GROUP. - LIHBOR, LIUBOR and LIVBOR are integer values, GROUP is a string (the name of - the group). - - Example: - - - """ - - def gener(self, obj, format = 'brut', config = None): - self.group_list = [] - self.text = PythonGenerator.gener(self, obj, format) - return self.text - - def generPROC_ETAPE(self, obj): - group_dict = {} - for keyword in obj.mc_liste: - group_dict[keyword.nom] = keyword.valeur - self.group_list.append(group_dict) - return PythonGenerator.generPROC_ETAPE(self, obj) - - def writeDefault(self, basefilename): - output_filename = os.path.splitext(basefilename)[0] + ".bcd" - f = open(output_filename, 'w') - f.write("%d\n" % len(self.group_list)) - for group_dict in self.group_list: - f.write("%(LIHBOR)d %(LIUBOR)d %(LIVBOR)d %(GROUP)s\n" % group_dict) - f.close() diff --git a/boundary_conditions/prefs.py b/boundary_conditions/prefs.py deleted file mode 100644 index 8f7d046d..00000000 --- a/boundary_conditions/prefs.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2012-2013 EDF -# -# This file is part of SALOME HYDRO module. -# -# SALOME HYDRO module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SALOME HYDRO module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SALOME HYDRO module. If not, see . - -code = "boundary_conditions" diff --git a/boundary_conditions/prefs_boundary_conditions.py b/boundary_conditions/prefs_boundary_conditions.py deleted file mode 100644 index bcf1ef2d..00000000 --- a/boundary_conditions/prefs_boundary_conditions.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) 2012-2013 EDF -# -# This file is part of SALOME HYDRO module. -# -# SALOME HYDRO module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SALOME HYDRO module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SALOME HYDRO module. If not, see . - -import os - -repIni = os.path.dirname(__file__) -INSTALLDIR = os.getenv("EFICAS_ROOT") diff --git a/convert/__init__.py b/convert/__init__.py index 04ceb33d..77806067 100644 --- a/convert/__init__.py +++ b/convert/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/convert/autre_parseur.py b/convert/autre_parseur.py index aaa4377c..983c868f 100644 --- a/convert/autre_parseur.py +++ b/convert/autre_parseur.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/convert/convert_TELEMAC.py b/convert/convert_TELEMAC.py index b77b3639..9862ff09 100644 --- a/convert/convert_TELEMAC.py +++ b/convert/convert_TELEMAC.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/convert/convert_XML.py b/convert/convert_XML.py index 6fed1817..68e226ba 100644 --- a/convert/convert_XML.py +++ b/convert/convert_XML.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/convert/convert_dico.py b/convert/convert_dico.py index 0e8e7675..3cda9313 100644 --- a/convert/convert_dico.py +++ b/convert/convert_dico.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/convert/convert_map.py b/convert/convert_map.py index c4bad148..61dd60f0 100644 --- a/convert/convert_map.py +++ b/convert/convert_map.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/convert/convert_pyth.py b/convert/convert_pyth.py index 9a73c09c..86b09147 100644 --- a/convert/convert_pyth.py +++ b/convert/convert_pyth.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/convert/convert_python.py b/convert/convert_python.py index 510721e9..49344ca7 100644 --- a/convert/convert_python.py +++ b/convert/convert_python.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/convert/old/convert_openturns_study.py b/convert/old/convert_openturns_study.py index e0a17f96..59207522 100644 --- a/convert/old/convert_openturns_study.py +++ b/convert/old/convert_openturns_study.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/convert/old/convert_openturns_wrapper.py b/convert/old/convert_openturns_wrapper.py index ce2cc3d8..d6a0b1d3 100644 --- a/convert/old/convert_openturns_wrapper.py +++ b/convert/old/convert_openturns_wrapper.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/convert/parseur_python.py b/convert/parseur_python.py index c577c58e..699f3706 100644 --- a/convert/parseur_python.py +++ b/convert/parseur_python.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/Formatage.py b/generator/Formatage.py index eb57e461..4b0b4d77 100644 --- a/generator/Formatage.py +++ b/generator/Formatage.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/__init__.py b/generator/__init__.py index 9d4cb7f0..2de31104 100644 --- a/generator/__init__.py +++ b/generator/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/generator_GroupMA.py b/generator/generator_GroupMA.py index f10704fe..2a2db80c 100644 --- a/generator/generator_GroupMA.py +++ b/generator/generator_GroupMA.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/generator_PSEN.py b/generator/generator_PSEN.py index 93ee4bc5..0b940daa 100755 --- a/generator/generator_PSEN.py +++ b/generator/generator_PSEN.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/generator_ProcessOutputs.py b/generator/generator_ProcessOutputs.py index efce52f0..fe84bce4 100755 --- a/generator/generator_ProcessOutputs.py +++ b/generator/generator_ProcessOutputs.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/generator_TELEMAC.py b/generator/generator_TELEMAC.py index 6935d537..0250fe21 100644 --- a/generator/generator_TELEMAC.py +++ b/generator/generator_TELEMAC.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/generator_XML.py b/generator/generator_XML.py index b8e0f3c7..78119fec 100644 --- a/generator/generator_XML.py +++ b/generator/generator_XML.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/generator_aplat.py b/generator/generator_aplat.py index 6eaff182..857f5388 100644 --- a/generator/generator_aplat.py +++ b/generator/generator_aplat.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/generator_dico.py b/generator/generator_dico.py index 91c69c23..5de01796 100644 --- a/generator/generator_dico.py +++ b/generator/generator_dico.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/generator_dicoImbrique.py b/generator/generator_dicoImbrique.py index d5d845cf..3346a164 100644 --- a/generator/generator_dicoImbrique.py +++ b/generator/generator_dicoImbrique.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/generator_map.py b/generator/generator_map.py index 97e7edd0..d66d49d7 100644 --- a/generator/generator_map.py +++ b/generator/generator_map.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/generator_mapVP.py b/generator/generator_mapVP.py index a6c766a5..84098a55 100644 --- a/generator/generator_mapVP.py +++ b/generator/generator_mapVP.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2019 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/generator_modification.py b/generator/generator_modification.py index d309d52a..dbdf22e7 100644 --- a/generator/generator_modification.py +++ b/generator/generator_modification.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/generator_python.py b/generator/generator_python.py index ad8359a3..a07f128f 100644 --- a/generator/generator_python.py +++ b/generator/generator_python.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/generator_vers3DSalome.py b/generator/generator_vers3DSalome.py index 9f405a45..bd54a5be 100644 --- a/generator/generator_vers3DSalome.py +++ b/generator/generator_vers3DSalome.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/DefautASTER.py b/generator/oldCodes/DefautASTER.py index 7a120f32..d2c02a36 100644 --- a/generator/oldCodes/DefautASTER.py +++ b/generator/oldCodes/DefautASTER.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/OpenturnsBase.py b/generator/oldCodes/OpenturnsBase.py index 465c6f8d..1c3a2d25 100644 --- a/generator/oldCodes/OpenturnsBase.py +++ b/generator/oldCodes/OpenturnsBase.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/OpenturnsSTD.py b/generator/oldCodes/OpenturnsSTD.py index f27c2c16..88c63af4 100644 --- a/generator/oldCodes/OpenturnsSTD.py +++ b/generator/oldCodes/OpenturnsSTD.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/OpenturnsXML.py b/generator/oldCodes/OpenturnsXML.py index 860508de..084e0aa2 100644 --- a/generator/oldCodes/OpenturnsXML.py +++ b/generator/oldCodes/OpenturnsXML.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_CARMEL3D.py b/generator/oldCodes/generator_CARMEL3D.py index 595623d4..717d73bd 100644 --- a/generator/oldCodes/generator_CARMEL3D.py +++ b/generator/oldCodes/generator_CARMEL3D.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_CARMEL3D_temporel.py b/generator/oldCodes/generator_CARMEL3D_temporel.py index 05a3d85f..5747e815 100644 --- a/generator/oldCodes/generator_CARMEL3D_temporel.py +++ b/generator/oldCodes/generator_CARMEL3D_temporel.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_CARMELCND.py b/generator/oldCodes/generator_CARMELCND.py index 9561c7ba..752bb175 100755 --- a/generator/oldCodes/generator_CARMELCND.py +++ b/generator/oldCodes/generator_CARMELCND.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_CARMELCS.py b/generator/oldCodes/generator_CARMELCS.py index 4e4a2fca..26aaf2fb 100644 --- a/generator/oldCodes/generator_CARMELCS.py +++ b/generator/oldCodes/generator_CARMELCS.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_SEP.py b/generator/oldCodes/generator_SEP.py index 9dd9e09a..d2bf995a 100644 --- a/generator/oldCodes/generator_SEP.py +++ b/generator/oldCodes/generator_SEP.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_ZCracks.py b/generator/oldCodes/generator_ZCracks.py index b8c57f12..780e0b3a 100644 --- a/generator/oldCodes/generator_ZCracks.py +++ b/generator/oldCodes/generator_ZCracks.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_asterv5.py b/generator/oldCodes/generator_asterv5.py index cdde4e28..f5f2c447 100644 --- a/generator/oldCodes/generator_asterv5.py +++ b/generator/oldCodes/generator_asterv5.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_cuve2dg.py b/generator/oldCodes/generator_cuve2dg.py index f7c97fc3..4666fa4f 100644 --- a/generator/oldCodes/generator_cuve2dg.py +++ b/generator/oldCodes/generator_cuve2dg.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_file_from_template.py b/generator/oldCodes/generator_file_from_template.py index 40bc55b7..a73e8464 100644 --- a/generator/oldCodes/generator_file_from_template.py +++ b/generator/oldCodes/generator_file_from_template.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_homard.py b/generator/oldCodes/generator_homard.py index 0f1958cc..e78628f8 100644 --- a/generator/oldCodes/generator_homard.py +++ b/generator/oldCodes/generator_homard.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_ini.py b/generator/oldCodes/generator_ini.py index f1a60a9d..11cf9d65 100644 --- a/generator/oldCodes/generator_ini.py +++ b/generator/oldCodes/generator_ini.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_openturns.py b/generator/oldCodes/generator_openturns.py index 2f4b3716..70e258c9 100644 --- a/generator/oldCodes/generator_openturns.py +++ b/generator/oldCodes/generator_openturns.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_openturns_study.py b/generator/oldCodes/generator_openturns_study.py index e603d902..a2146e22 100644 --- a/generator/oldCodes/generator_openturns_study.py +++ b/generator/oldCodes/generator_openturns_study.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_openturns_wrapper.py b/generator/oldCodes/generator_openturns_wrapper.py index bca30dc5..ab93e965 100644 --- a/generator/oldCodes/generator_openturns_wrapper.py +++ b/generator/oldCodes/generator_openturns_wrapper.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_pyth.py b/generator/oldCodes/generator_pyth.py index 6a231111..86b83543 100644 --- a/generator/oldCodes/generator_pyth.py +++ b/generator/oldCodes/generator_pyth.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/generator_python6.py b/generator/oldCodes/generator_python6.py index 0c51b249..a554bc2a 100644 --- a/generator/oldCodes/generator_python6.py +++ b/generator/oldCodes/generator_python6.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/generator/oldCodes/oldGenerator_CARMEL3D_frequentiel.py b/generator/oldCodes/oldGenerator_CARMEL3D_frequentiel.py index 2bc21cae..d7a1dd03 100755 --- a/generator/oldCodes/oldGenerator_CARMEL3D_frequentiel.py +++ b/generator/oldCodes/oldGenerator_CARMEL3D_frequentiel.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2017 EDF R&D +# Copyright (C) 2007-2021 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/mascaret/CMakeLists.txt b/mascaret/CMakeLists.txt deleted file mode 100644 index deb3c655..00000000 --- a/mascaret/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) 2012-2013 EDF -# -# This file is part of SALOME HYDRO module. -# -# SALOME HYDRO module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SALOME HYDRO module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SALOME HYDRO module. If not, see . - -# --- Python files --- - -SET(PYFILES - __init__.py - appli.py - configuration_mascaret.py - prefs_mascaret.py - prefs.py - mascaret_V7_cata.py -) - -# --- rules --- - -SALOME_INSTALL_SCRIPTS("${PYFILES}" ${SALOME_INSTALL_PYTHON}/salome/hydro/mascaret/eficas) diff --git a/mascaret/__init__.py b/mascaret/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/mascaret/appli.py b/mascaret/appli.py deleted file mode 100644 index 1fd13263..00000000 --- a/mascaret/appli.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2012-2013 EDF -# -# This file is part of SALOME HYDRO module. -# -# SALOME HYDRO module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SALOME HYDRO module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SALOME HYDRO module. If not, see . - -import os -import sys -import re - -from PyQt5.QtWidgets import QMessageBox - - -import salome -import SalomePyQt -sgPyQt = SalomePyQt.SalomePyQt() - -from salome.kernel.logger import Logger -from salome.kernel import termcolor -logger = Logger("salome.hydro.mascaret.eficas.appli", - color = termcolor.GREEN_FG) - -import eficasSalome - -from salome.hydro.study import HydroStudyEditor - -class EficasForMascaretAppli(eficasSalome.MyEficas): - """ - This class launches Eficas and adds entries for the created files in - MASCARET component in the study tree. The messages in this class are in - french because they are displayed in Eficas interface. - - :type fichier: string - :param fichier: path of an Eficas file to open - - """ - def __init__(self, fichier = None, version = None): - self.ed = HydroStudyEditor() - self.codedir = os.path.dirname(__file__) - sys.path[:0] = [self.codedir] - eficasSalome.MyEficas.__init__(self, sgPyQt.getDesktop(), - "mascaret", - fichier, version = version) - sgPyQt.createView("Eficas Mascaret", self) - - def addJdcInSalome(self, jdcPath): - """ - Add the newly created file in Salome study - """ - try: - self.ed.find_or_create_mascaret_case(jdcPath) - except Exception, exc: - msgError = "Can't add file to Salome study tree" - logger.exception(msgError) - QMessageBox.warning(self, self.tr("Warning"), - self.tr("%s. Reason:\n%s\n\nSee logs for " - "more details." % (msgError, exc))) - salome.sg.updateObjBrowser(0) - - def closeEvent(self, event): - while self.codedir in sys.path: - sys.path.remove(self.codedir) - eficasSalome.MyEficas.closeEvent(self, event) diff --git a/mascaret/configuration_mascaret.py b/mascaret/configuration_mascaret.py deleted file mode 100644 index 7695ed41..00000000 --- a/mascaret/configuration_mascaret.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2012-2013 EDF -# -# This file is part of SALOME HYDRO module. -# -# SALOME HYDRO module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SALOME HYDRO module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SALOME HYDRO module. If not, see . - -import os - -from Editeur.catadesc import CatalogDescription -from InterfaceQT4.configuration import CONFIG_BASE - -class CONFIG(CONFIG_BASE): - - def __init__(self, appli, repIni): - """ - This class stores the configuration parameters for Eficas - """ - CONFIG_BASE.__init__(self, appli, repIni) - - # Configuration parameters - self.savedir = os.getenv("HOME") - self.catalogues = (CatalogDescription("mascaret_V7", - os.path.join(repIni, "mascaret_V7_cata.py")),) - self.lang = 'fr' - - def save_params(self): - pass - -def make_config(appli, rep): - return CONFIG(appli, rep) - -def make_config_style(appli, rep): - return None diff --git a/mascaret/mascaret_V7_cata.py b/mascaret/mascaret_V7_cata.py deleted file mode 100644 index c3a97a34..00000000 --- a/mascaret/mascaret_V7_cata.py +++ /dev/null @@ -1,107 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2012-2013 EDF -# -# This file is part of SALOME HYDRO module. -# -# SALOME HYDRO module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SALOME HYDRO module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SALOME HYDRO module. If not, see . - -from Accas import * - -JdC = JDC_CATA(regles = (UN_PARMI('MASCARET',)), - ) - -MASCARET = PROC( - nom = "MASCARET", op = None, - fr = u"Définition d'un cas d'étude Mascaret", - ang = u"Definition of a Mascaret study case", - FICHIER_DICO = SIMP(statut = "o", typ = 'Fichier', - fr = u"Fichier Dictionnaire", - ang = u"Dictionary file"), - FICHIER_MOT_CLE = SIMP(statut = "o", - typ = ('Fichier', 'Fichiers CAS (*.cas);;Tous les fichiers (*)',), - fr = u"Fichier Mot Clé", - ang = u"Keyword file"), - FICHIER_GEOMETRIE = SIMP(statut = "f", - typ = ('Fichier', 'Fichiers GEO (*.geo);;Tous les fichiers (*)',), - fr = u"Fichier de géométrie", - ang = u"Geometry file"), - FICHIER_LOI = FACT(statut = 'f', max = '**', - NOM = SIMP(statut = "o", - typ = ('Fichier', 'Fichiers LOI (*.loi);;Tous les fichiers (*)',), - fr = u"Fichier de lois", - ang = u"Laws file"), - ), - FICHIER_ABAQUES = SIMP(statut = "f", - typ = ('Fichier', 'Tous les fichiers (*)',), - fr = u"Fichier abaques", - ang = u"Abacus file"), - FICHIER_CASIER = SIMP(statut = "f", - typ = ('Fichier', 'Tous les fichiers (*)',), - fr = u"Fichier casier", - ang = u"Compartment file"), - FICHIER_DAMOCLE = SIMP(statut = "f", - typ = ('Fichier', 'Tous les fichiers (*)',), - fr = u"Fichier damocle", - ang = u"Damocle file"), - FICHIER_LIG = SIMP(statut = "o", - typ = ('Fichier', 'Fichiers LIG (*.lig);;Tous les fichiers (*)',), - fr = u"Fichier LIG", - ang = u"LIG file"), - LISTING = SIMP(statut = "f", - typ = ('Fichier', 'Tous les fichiers (*)', "Sauvegarde"), - fr = u"Fichier de listing", - ang = u"Listing file"), - LISTING_CASIER = SIMP(statut = "f", - typ = ('Fichier', 'Tous les fichiers (*)', "Sauvegarde"), - fr = u"Fichier de listing casier", - ang = u"Compartment listing file"), - LISTING_LIAISON = SIMP(statut = "f", - typ = ('Fichier', 'Tous les fichiers (*)', "Sauvegarde"), - fr = u"Fichier de listing liaison", - ang = u"Link listing file"), - RESULTAT = SIMP(statut = "f", - typ = ('Fichier', 'Tous les fichiers (*)', "Sauvegarde"), - fr = u"Fichier de résultat", - ang = u"Result file"), - RESULTAT_CASIER = SIMP(statut = "f", - typ = ('Fichier', 'Tous les fichiers (*)', "Sauvegarde"), - fr = u"Fichier de résultat casier", - ang = u"Compartment result file"), - RESULTAT_LIAISON = SIMP(statut = "f", - typ = ('Fichier', 'Tous les fichiers (*)', "Sauvegarde"), - fr = u"Fichier de résultat liaison", - ang = u"Link result file"), - VARIABLE_SORTIE = FACT(statut = 'f', max = '**', - fr = u"Variable de sortie du calcul", - ang = u"Computation output variable", - NOM = SIMP(statut = "o", typ = 'TXM', - fr = u"Nom de la variable", - ang = u"Variable name"), - VARIABLE_MASCARET = SIMP(statut = "o", typ = 'TXM', - fr = u'Variable Mascaret (ex : "Etat.Z(1,0,0)")', - ang = u'Mascaret variable (ex : "Etat.Z(1,0,0)")'), - ), - VARIABLE_ENTREE = FACT(statut = 'f', max = '**', - fr = u"Variable d'entrée du calcul", - ang = u"Computation input variable", - NOM = SIMP(statut = "o", typ = 'TXM', - fr = u"Nom de la variable", - ang = u"Variable name"), - VARIABLE_MASCARET = SIMP(statut = "o", typ = 'TXM', - fr = u'Variable Mascaret (ex : "Modele.Lois.Debit(1,1-2,0)")', - ang = u'Mascaret variable (ex : "Modele.Lois.Debit(1,1-2,0)")'), - ), -) -TEXTE_NEW_JDC="MASCARET()" diff --git a/mascaret/prefs.py b/mascaret/prefs.py deleted file mode 100644 index d0e8113c..00000000 --- a/mascaret/prefs.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2012-2013 EDF -# -# This file is part of SALOME HYDRO module. -# -# SALOME HYDRO module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SALOME HYDRO module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SALOME HYDRO module. If not, see . - -code = "mascaret" diff --git a/mascaret/prefs_mascaret.py b/mascaret/prefs_mascaret.py deleted file mode 100644 index ed30a092..00000000 --- a/mascaret/prefs_mascaret.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2012-2013 EDF -# -# This file is part of SALOME HYDRO module. -# -# SALOME HYDRO module is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SALOME HYDRO module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SALOME HYDRO module. If not, see . - -import os -import sys - -repIni = os.path.dirname(__file__) -INSTALLDIR = os.getenv("EFICAS_ROOT") -closeAutreCommande=True -closeFrameRechercheCommande=True -closeArbre=True -closeCopier=True -suiteTelemac=True - diff --git a/monCode/Global_Condition_Cata.py b/monCode/Global_Condition_Cata.py deleted file mode 100755 index 02396340..00000000 --- a/monCode/Global_Condition_Cata.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 -from Accas import * -#class myModel(ASSD): pass - -JdC = JDC_CATA(code='GLOB_COND', - execmodul=None, - regles=(AU_PLUS_UN('TYPES',), - AU_PLUS_UN('INITS',), - AU_PLUS_UN('DATAS',), - #A_CLASSER('TYPES','INITS','DATAS') - ) -); - -TYPES=PROC(nom='TYPES',op=None,UIinfo={"groupes":("Global_Workflow",)}, #sd_prod=myModel, - MODE=SIMP( - typ='TXM', - statut='o', - position='global_jdc', - into=("MANUAL","AUTOMATIC","MIXED"), - defaut="AUTOMATIC", - ), -); - -liste_condition=('INITS', 'DATAS') - -INITS=PROC(nom='INITS',op=None,UIinfo={"groupes":("INI_param",)}, - ini_manual=BLOC(condition="MODE == 'MANUAL'", - Informer=SIMP(statut='o',typ='TXM', defaut="INITS MANUAL"), - ), - ini_auto=BLOC(condition="MODE == 'AUTOMATIC'", - Informer=SIMP(statut='o', typ='TXM', defaut="INITS AUTOMATIC",), - ), - ini_mixed=BLOC(condition="MODE == 'MIXED'", - Informer=SIMP(statut='o',typ='TXM', defaut="INITS MIXED",), - ), -); -DATAS=PROC(nom='DATAS',op=None,UIinfo={"groupes":("DATAS",)}, - data_manual=BLOC(condition="MODE == 'MANUAL'", - Informer=SIMP(statut='o',typ='TXM', defaut="DATAS MANUAL", - ), - ), - data_auto=BLOC(condition="MODE == 'AUTOMATIC'", - Informer=SIMP(statut='o', typ='TXM', defaut="DATAS AUTOMATIC", - ), - ), - data_mixed=BLOC(condition="MODE == 'MIXED'", - Informer=SIMP(statut='o',typ='TXM', defaut="DATAS MIXED", - ), - ), -); - -Classement_Commandes_Ds_Arbre=('TYPES','INITS','DATAS') -Ordre_Des_Commandes = ('TYPES','INITS','DATAS') diff --git a/monCode/Many_Concepts_52992_Cata.py b/monCode/Many_Concepts_52992_Cata.py deleted file mode 100644 index 13145b96..00000000 --- a/monCode/Many_Concepts_52992_Cata.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -from Accas import * - -#class myMesh(ASSD): pass -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(AU_PLUS_UN('DEBUT', 'POURSUITE'), - AU_PLUS_UN('AFFE_MODELE'), - AU_PLUS_UN('FIN'), - A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) - -def mySeveral(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -switch_facultatif=True #change 'o' to 'f' of some widgets in the loop -#empty_defauts=True - -def myBloc(num): - myNum=str(num).zfill(2) - list_item_body="Item_"+myNum+"_" - defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values - defauts_mask=[False,False,True,True,False] #switch off defaults of some types - defauts=list() - for id0 in range(len(defauts0)): - if defauts_mask[id0]: - item=", defaut="+str(defauts0[id0]) - else: - item="" - defauts.append(item) - #print defauts - - opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups - #make different widgets optional, one by one: - myLen=len(opt) - if switch_facultatif: - make_f=(num)%myLen - opt[make_f]='f' - #print opt - #if empty_defauts: - # clean_defaut=num%myLen - - myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=4,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" - print myString - return eval(myString) - -DEBUT=PROC(nom="DEBUT", op=10, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", - PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), -); - -AFFE_MODELE=OPER(nom="AFFE_MODELE",op=18,sd_prod=myModel, - UIinfo={"groupes":("Group1",)}, - ang="Model mesh definition EN", - reentrant='n', - regles=(AU_MOINS_UN('APPROVED')), - MESH=SIMP(statut='o',typ='TXM',into=mySeveral("mesh_",4) ,defaut="mesh_01"), - APPROVED=SIMP(statut="f", typ=bool), # presence of this item will validate the whole group - block_mesh_01=myBloc(1), - block_mesh_02=myBloc(2), - block_mesh_03=myBloc(3), - block_mesh_04=myBloc(4), -) - - -FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, - FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), -); - -Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') - -Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') diff --git a/monCode/Matrix_Cata.py b/monCode/Matrix_Cata.py deleted file mode 100644 index 268a77bf..00000000 --- a/monCode/Matrix_Cata.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 -from Accas import * - -class loi ( ASSD ) : pass -class variable ( ASSD ) : pass - -class Matrice: - def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None): - self.nbLigs=nbLigs - self.nbCols=nbCols - self.methodeCalculTaille=methodeCalculTaille - self.formatSortie=formatSortie - self.valSup=valSup - self.valMin=valMin - self.structure=structure - - def __convert__(self,valeur): - # Attention ne verifie pas grand chose - if type(valeur) != types.ListType : - return None - return valeur - - def info(self): - return "Matrice %s x %s" % (self.nbLigs, self.nbCols) - - __repr__=info - __str__=info - - - -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(AU_MOINS_UN ( 'CORRELATION' ), - ) -) - -DETERMINISTICVARIABLE = OPER ( nom = "DETERMINISTICVARIABLE", - sd_prod = variable, - op = None, - fr = "Variable deterministe", - ang = "Deterministic variable", - - N = SIMP ( statut = 'o', typ = "TXM", fr = "Nom", ang = "Name", defaut = "Var1" ), - T = SIMP ( statut = 'o', defaut = "in", into = ( "in" , "out", ), typ = "TXM", fr = "Type", ang = "Type" ), - R = SIMP ( statut = 'o', defaut = 0, typ = "I", fr = "Rang", ang = "Rank" ), -) - -DISTRIBUTION = OPER ( nom = "DISTRIBUTION", - sd_prod = loi, - op = 68, - fr = "Definitions des lois marginales utilisees par les variables d'entree", - - R = SIMP ( statut = "o", typ = "R", max = 1, val_min = 0., fr = "Parametre R de la loi | R > 0", ang = "R parameter | R > 0", defaut = 0.5 ), - # T > R - T = SIMP ( statut = "o", typ = "R", max = 1, val_min = 0., fr = "Parametre T de la loi | T > R", ang = "T parameter | T > R", defaut = 0.7 ), - A = SIMP ( statut = "o", typ = "R", max = 1, fr = "Borne inferieure du support de la loi", ang = "Support lower bound", defaut = 0.1 ), - # B > A - B = SIMP ( statut = "o", typ = "R", max = 1, fr = "Borne superieure du support de la loi", ang = "Support upper bound", defaut = 0.3 ), -) - -VARIABLE = PROC ( nom = "VARIABLE", - op = None, - docu = "", - fr = "Variable probabiliste", - ang = "Probabilistic variable", - - ModelVariable = SIMP ( statut = "o", typ = ( variable, ), fr = "Variable d'entrée du modèle", ang = "Input variable of the model" ), - Distribution = SIMP ( statut = "o", typ = ( loi, ), fr = "Modélisation probabiliste", ang = "Probabilistic modelisation" ), -) - -CORRELATION = PROC ( nom = 'CORRELATION', - op = None, - docu = "", - fr = "Correlation entre variables", - ang = "Variable correlation", - - CorrelationMatrix = SIMP ( statut = "o", typ = Matrice(nbLigs=None, - nbCols=None, - methodeCalculTaille='NbDeVariables', - valSup=1, - valMin=-1, - structure="symetrique"), - fr = "Matrice de correlation entre les variables d'entree", - ang = "Correlation matrix for input variables" ), -) diff --git a/monCode/prefs_monCode.py b/monCode/prefs_monCode.py deleted file mode 100644 index 819a4085..00000000 --- a/monCode/prefs_monCode.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- -# CONFIGURATION MANAGEMENT OF EDF VERSION -# ====================================================================== -# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# -# -# ====================================================================== - -import os,sys -# repIni sert a localiser le fichier editeur.ini -# Obligatoire -repIni=os.path.dirname(os.path.abspath(__file__)) -INSTALLDIR=os.path.join(repIni,'..') -sys.path[:0]=[INSTALLDIR] - - -# lang indique la langue utilisee pour les chaines d'aide : fr ou ang -lang='en' - -# Codage des strings qui accepte les accents (en remplacement de 'ascii') -encoding='iso-8859-1' -docPath=repIni -fileName="docMonCode.png" -image=1 - -# -catalogues=( - ('monCode','53038',os.path.join(repIni,'Matrix_Cata.py'),'dico','python'), - ('monCode','53036',os.path.join(repIni,'Elementary_Lists_53036_Cata.py'),'dico','python'), - ('monCode','53033',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), - ('monCode','53031',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), - ('monCode','53030',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), - ('monCode','53020',os.path.join(repIni,'Nested_Cond_52945_Cata.py'),'dico','python'), - ('monCode','53013',os.path.join(repIni,'Elementary_Lists_53013_Cata.py'),'dico','python'), - ('monCode','53000',os.path.join(repIni,'Elementary_Lists_53030_Cata.py'),'dico','python'), - ('monCode','52996',os.path.join(repIni,'Elementary_Lists_52996_Cata.py'),'dico','python'), - ('monCode','52992',os.path.join(repIni,'Many_Concepts_52992_Cata.py'),'dico','python'), - ('monCode','52989',os.path.join(repIni,'Many_Concepts_52989_Cata.py'),'dico','python'), - ('monCode','52988',os.path.join(repIni,'Many_Concepts_52988_Cata.py'),'dico','python'), - ('monCode','52985',os.path.join(repIni,'fin_52985_Cata.py'),'dico','python'), - ('monCode','52983',os.path.join(repIni,'Many_Concepts_52983_Cata.py'),'dico','python'), - ('monCode','52975',os.path.join(repIni,'Separate_Blocks_52975_Cata.py'),'dico','python'), - ('monCode','52972',os.path.join(repIni,'Separate_Blocks_52972_Cata.py'),'dico','python'), - ('monCode','52958',os.path.join(repIni,'Separate_Blocks_52958_Cata.py'),'dico','python'), - ('monCode','52952',os.path.join(repIni,'Nested_Cond_52952_Cata.py'),'dico','python'), - ('monCode','52949',os.path.join(repIni,'Nested_Cond_52949_Cata.py'),'dico','python'), - ('monCode','52947',os.path.join(repIni,'Nested_Cond_52947_Cata.py'),'dico','python'), - ('monCode','52946',os.path.join(repIni,'Nested_Cond_52946_Cata.py'),'dico','python'), - ('monCode','52945',os.path.join(repIni,'Nested_Cond_52945_Cata.py'),'dico','python'), - ('monCode','Global',os.path.join(repIni,'Global_Condition_Cata.py'),'dico','python'), -# resolu ('monCode','52948',os.path.join(repIni,'Nested_Cond_52948_Cata.py'),'dico','python'), -# pb d afffichage des optionnels ('monCode','52963',os.path.join(repIni,'Separate_Blocks_52963_Cata.py'),'dico','python'), -# pb d afffichage des optionnels ('monCode','52966',os.path.join(repIni,'Separate_Blocks_52966_Cata.py'),'dico','python'), - -# ('monCode','test',os.path.join(repIni,'monCode_Cata1.py'),'dico','python'), -) diff --git a/monCode/properties.py b/monCode/properties.py deleted file mode 100644 index 1d328a46..00000000 --- a/monCode/properties.py +++ /dev/null @@ -1,24 +0,0 @@ -#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR -# RESPONSABLE D6BHHHH J-P.LEFEBVRE -# ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# ====================================================================== -# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR -# DE LA VERSION DU CODE_ASTER ASSOCIE -#---------------------------------------------------------------------- -version = "1.2" -date = "25/05/2010" -exploit = False