SPB Git

Repository Public MIT Research preview

ma-composants.tex 6.1 KB 86 lines latex

1% ma-composants.tex — bibliothèque de composants de figures du mini-MOOC « Ingénierie des systèmes2% multi-agents ». Construite SUR la grammaire TikZ partagée d'ATLAS IA (atlas block, atlas gate,3% atlas boundary, atlas store, flèches, icônes) : mêmes épaisseurs, mêmes couleurs sémantiques.4% Toutes les figures sont dessinées en millimètres : \begin{tikzpicture}[x=1mm, y=1mm].5%6%   ma agent, ma sous agent     acteurs qui décident (bloc arrondi ; trait fort pour l'agent principal)7%   ma outil                    capacité externe sans décision (bloc à coins coupés)8%   ma memoire                  état persistant (cylindre)9%   ma contrat                  contrat de tâche (feuille à coin plié)10%   ma message                  enveloppe ou identifiant de message (pastille en chasse fixe)11%   ma tache                    unité de travail d'un graphe de précédence (rectangle à barre latérale)12%   ma tache critique           la même, sur le chemin critique (barre et contour corail, trait fort)13%   ma decision                 décision, vote, porte d'approbation (losange)14%   ma evenement                événement du journal (petit cercle pointé)15%   ma etat, ma etat terminal   état d'une machine à états (pilule ; double contour si terminal)16%   ma frontiere                frontière de confiance (pointillé corail épais)17%   \MaFile, \MaBus, \MaTimeline, \MaMetrique, \MaSilhouette, \MaEtiquetteSim   (macros ci-dessous)18\tikzset{19  ma agent/.style={atlas block strong, minimum height=9mm, minimum width=20mm},20  ma sous agent/.style={atlas block flow, minimum height=8mm, minimum width=18mm},21  ma outil/.style={atlas block, chamfered rectangle, chamfered rectangle xsep=1.6pt,22    chamfered rectangle ysep=1.6pt, rounded corners=0pt, minimum height=7mm, inner xsep=6pt},23  ma memoire/.style={atlas store, minimum width=15mm, minimum height=9mm},24  ma contrat/.style={draw=maDiscret, fill=maFond, text=maTexte, line width=.7pt, sharp corners,25    align=left, font=\AtlasSizeTiny, inner xsep=3.2pt, inner ysep=2.8pt, atlas nohyphen,26    path picture={\fill[maDiscret] (path picture bounding box.north east) -- ++(-2.4mm,0) -- ++(2.4mm,-2.4mm) -- cycle;}},27  ma message/.style={rounded rectangle, draw=maActeur, fill=maFond, text=maTexte, line width=.7pt,28    inner xsep=3.4pt, inner ysep=1.8pt, font=\ttfamily\AtlasSizeTiny},29  ma tache/.style={draw=maNeutre, fill=maPanneau, text=maTexte, line width=.9pt, sharp corners,30    align=center, atlas font, atlas nohyphen, inner xsep=5pt, inner ysep=3.6pt, minimum height=7.5mm,31    path picture={\fill[maActeur] (path picture bounding box.south west) rectangle32      ([xshift=1.1mm]path picture bounding box.north west);}},33  ma tache critique/.style={ma tache, draw=maRisque, line width=1.4pt,34    path picture={\fill[maRisque] (path picture bounding box.south west) rectangle35      ([xshift=1.1mm]path picture bounding box.north west);}},36  ma decision/.style={atlas gate},37  ma evenement/.style={circle, draw=maTexte, fill=maFond, line width=.7pt, inner sep=0pt, minimum size=2.8mm,38    path picture={\fill[maTexte] (path picture bounding box.center) circle[radius=.55mm];}},39  ma etat/.style={rounded rectangle, draw=maNeutre, fill=maPanneau, text=maTexte, line width=.9pt,40    inner xsep=5pt, inner ysep=3.2pt, minimum height=6.6mm, atlas font, atlas nohyphen},41  ma etat actif/.style={ma etat, draw=maActeur},42  ma etat terminal/.style={ma etat, double=maFond, double distance=1.1pt, draw=#1},43  ma etat terminal/.default=maValide,44  ma frontiere/.style={atlas boundary},45  ma transition/.style={atlas arrow muted},46  ma critique/.style={atlas arrow hazard, line width=1.6pt},47}48% \MaFile{<nom>}{<coin sud-ouest>}{<cases>}{<cases occupées>} — file d'attente bornée, lue de gauche à droite.49\NewDocumentCommand{\MaFile}{m m m m}{%50  \path #2 coordinate (#1-sw);51  \foreach \ma@i in {1,...,#3}{%52    \ifnum\ma@i>#4\relax53      \draw[maNeutre, line width=.7pt, fill=maFond] ([xshift=(\ma@i-1)*4.4mm]#1-sw) rectangle ++(4.4mm,5.2mm);54    \else55      \draw[maActeur, line width=.7pt, fill=maPanneau] ([xshift=(\ma@i-1)*4.4mm]#1-sw) rectangle ++(4.4mm,5.2mm);56      \fill[maActeur] ([xshift=(\ma@i-1)*4.4mm+2.2mm, yshift=2.6mm]#1-sw) circle[radius=.8mm];57    \fi}58  \path ([xshift=#3*4.4mm, yshift=5.2mm]#1-sw) coordinate (#1-ne)59        ([yshift=2.6mm]#1-sw) coordinate (#1-w) ([xshift=#3*4.4mm, yshift=2.6mm]#1-sw) coordinate (#1-e);60}61% \MaBus{<nom>}{<extrémité gauche>}{<longueur en mm>} — bus de messages horizontal.62\NewDocumentCommand{\MaBus}{m m m}{%63  \path #2 coordinate (#1-w) ++(#3,0) coordinate (#1-e);64  \draw[maActeur, line width=3.4pt, line cap=round] (#1-w) -- (#1-e);65  \draw[maFond, line width=1pt, line cap=round] (#1-w) -- (#1-e);66}67% \MaTimeline{<origine>}{<longueur en mm>}{<mm par unité>}{<graduations>}{<étiquette de l'axe>}68\NewDocumentCommand{\MaTimeline}{m m m m m}{%69  \path #1 coordinate (ma@o);70  \draw[maNeutre, line width=.8pt, -{Stealth[length=4pt,width=3.6pt]}] (ma@o) -- ++(#2,0)71    node[atlas note, anchor=west] {#5};72  \foreach \ma@t in {#4}{%73    \draw[maNeutre, line width=.6pt] ([xshift={(\ma@t*#3)*1mm}]ma@o) -- ++(0,-1.2)74      node[atlas note, anchor=north, inner sep=1pt] {\ma@t};}75}76% \MaMetrique{<centre>}{<valeur>}{<libellé>}{<couleur>} — tuile de mesure : une valeur, son unité, son nom.77\NewDocumentCommand{\MaMetrique}{m m m O{maActeur}}{%78  \node[draw=#4, fill=maPanneau, line width=.9pt, rounded corners=1.6pt, minimum width=24mm, minimum height=12.5mm] (ma@m) at #1 {};79  \node[text=maTexte, font=\AtlasTabularFont\AtlasSizeLead\bfseries, anchor=south, inner sep=0pt] at ([yshift=-.4mm]ma@m.center) {#2};80  \node[text=maDiscret, font=\AtlasSizeTiny, anchor=north, inner sep=0pt] at ([yshift=-1.7mm]ma@m.center) {#3};81}82% \MaSilhouette{<centre>}{<couleur>} — une personne (demandeur, approbation humaine) : icône partagée.83\NewDocumentCommand{\MaSilhouette}{m O{maTexte}}{\pic[#2, scale=.62] at #1 {atlas person};}84% \MaEtiquetteSim{<ancre>}{<position>} — étiquette obligatoire des figures chiffrées issues de la simulation.85\NewDocumentCommand{\MaEtiquetteSim}{O{north east} m}{\node[atlas tag=maDecision, anchor=#1] at #2 {SIMULATION};}86
Files main
Menu

Theme