[{"content":"In Cloud Foundry, how to make a request from an application running on a subaccount, to an endpoint handled by another application running on a different subaccount and protected with Roles\nofficial documentation at https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/user-propagation-between-cloud-foundry-applications\nWe first need to establish a SAML trust between account 2 and account 1, and then configure a destination that can propagate the user login from account 1 to account 2 Prepare the IdP Metadata for establishing trust Download the certificate of subaccount 1 by clicking Export in Connectivity -\u0026gt; Destination Trust it could be required to generate the trust first Take note of the subdomain e subaccount id Download the SAML Metadata of subaccount 1 in Security -\u0026gt; Trust Configuration and click Download SAML Metadata In the downloaded file, take note of the value indicated at the place of \u0026lt;alias\u0026gt; ... \u0026lt;md:AssertionConsumerService Binding=\u0026#34;urn:oasis:names:tc:SAML:2.0:bindings:URI\u0026#34; Location=\u0026#34;https://${S1_SUBDOMAIN}.authentication.${S1_LANDSCAPE_DOMAIN}/oauth/token/alias/\u0026lt;alias\u0026gt;\u0026#34; index=\u0026#34;1\u0026#34;/\u0026gt; ... Create the idp metadata file by replacing the placeholders with the certificate, the alias and the subdomain and subaccount \u0026lt;ns3:EntityDescriptor ID=\u0026#34;cfapps.{{subdomain}}/{{subaccount_id}}\u0026#34; entityID=\u0026#34;cfapps.{{subdomain}}/{{subaccount_id}}\u0026#34; xmlns=\u0026#34;http://www.w3.org/2000/09/xmldsig#\u0026#34; xmlns:ns2=\u0026#34;http://www.w3.org/2001/04/xmlenc#\u0026#34; xmlns:ns4=\u0026#34;urn:oasis:names:tc:SAML:2.0:assertion\u0026#34; xmlns:ns3=\u0026#34;urn:oasis:names:tc:SAML:2.0:metadata\u0026#34;\u0026gt; \u0026lt;ns3:SPSSODescriptor AuthnRequestsSigned=\u0026#34;true\u0026#34; protocolSupportEnumeration=\u0026#34;urn:oasis:names:tc:SAML:2.0:protocol\u0026#34;\u0026gt; \u0026lt;ns3:KeyDescriptor use=\u0026#34;signing\u0026#34;\u0026gt; \u0026lt;KeyInfo\u0026gt; \u0026lt;KeyName\u0026gt; \u0026lt;!-- alias taken at point 3 --\u0026gt; \u0026lt;/KeyName\u0026gt; \u0026lt;X509Data\u0026gt; \u0026lt;X509Certificate\u0026gt; \u0026lt;!-- paste certificate content download at point 1 --\u0026gt; \u0026lt;/X509Certificate\u0026gt; \u0026lt;/X509Data\u0026gt; \u0026lt;/KeyInfo\u0026gt; \u0026lt;/ns3:KeyDescriptor\u0026gt; \u0026lt;/ns3:SPSSODescriptor\u0026gt; \u0026lt;ns3:IDPSSODescriptor WantAuthnRequestsSigned=\u0026#34;true\u0026#34; protocolSupportEnumeration=\u0026#34;urn:oasis:names:tc:SAML:2.0:protocol\u0026#34;\u0026gt; \u0026lt;ns3:KeyDescriptor use=\u0026#34;signing\u0026#34;\u0026gt; \u0026lt;KeyInfo\u0026gt; \u0026lt;KeyName\u0026gt; \u0026lt;!-- alias taken at point 3 --\u0026gt; \u0026lt;/KeyName\u0026gt; \u0026lt;X509Data\u0026gt; \u0026lt;X509Certificate\u0026gt; \u0026lt;!-- paste certificate content download at point 1 --\u0026gt; \u0026lt;/X509Certificate\u0026gt; \u0026lt;/X509Data\u0026gt; \u0026lt;/KeyInfo\u0026gt; \u0026lt;/ns3:KeyDescriptor\u0026gt; \u0026lt;/ns3:IDPSSODescriptor\u0026gt; \u0026lt;/ns3:EntityDescriptor\u0026gt; Set up the trust between subaccount In the subaccount 2, establish a new trust for the subaccount 1 by going into Security -\u0026gt; Tust Configuration and clicking New SAML Trust Configuration Paste the content of the metadata file made previosuly and press Parse to fill the form. Do NOT flag Availabgle for User Logon but flag Create Shadow Users during Logon Create the destination Download the SAML Metadata of subaccount 2 in Security -\u0026gt; Trust Configuration and click Download SAML Metadata Retrieve the value for \u0026lt;alias\u0026gt; and \u0026lt;audience\u0026gt; \u0026lt;md:EntityDescriptor entityID=\u0026#34;\u0026lt;audience\u0026gt;\u0026#34; ...\u0026gt; ... \u0026lt;md:AssertionConsumerService Binding=\u0026#34;urn:oasis:names:tc:SAML:2.0:bindings:URI\u0026#34; Location=\u0026#34;https://${S2_SUBDOMAIN}.authentication.${S2_LANDSCAPE_DOMAIN}/oauth/token/alias/\u0026lt;alias\u0026gt;\u0026#34; index=\u0026#34;1\u0026#34;/\u0026gt; ... Create a new Destination for subaccount 1 with these values Property Value Name Choose any name for your destination. You will use this name to request the destination from the Destination service. Type HTTP URL The URL of application 2, identifying the resource you want to consume. Proxy Type Internet Authentication OAuth2SAMLBearerAssertion Audience {{audience}} Client Key The clientid of the XSUAA instance in subaccount 2 Token Service URL https://{{subdomain}}.authentication.{{tokenHost}}/oauth/token/alias/{{alias}} Token Service URL Type Dedicated Token Service User The clientid of the XSUAA instance in subaccount 2 Token Service Password The clientsecret of the XSUAA instance in subaccount 2. authnContextClassRef urn:oasis:names:tc:SAML:2.0:ac:classes:PreviousSession Add also the Additional property nameIdFormat with value urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress Handle user roles User role collections must be defined for subaccount 2 and the new trust. They can be defined in two ways.\nExplicit role collection assignment It is possible to assign the role collection directly to the users. This requires to manually create the users via Security -\u0026gt; Users and clicking Create. In the popup, select the newly created Identity Provider This is very straightforward, but not scalable.\nUsing IdP Group A more scalable way is to leverage IdP Groups. First a new group is created in the IdP and all the relevant users are assigned to that group. After that, in Security -\u0026gt; Role Collections select the relevant Role Collection and Edit. In the User Groups section, add the newly created group remembering to select the newly created Identity Provider ","permalink":"https://www.slashopt.it/posts/principal-propagation/","summary":"\u003cp\u003eIn \u003cem\u003eCloud Foundry\u003c/em\u003e, how to make a request from an application running on a subaccount, to an endpoint handled by another application running on a different subaccount and protected with \u003cem\u003eRoles\u003c/em\u003e\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eofficial documentation at \u003ca href=\"https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/user-propagation-between-cloud-foundry-applications\"\u003ehttps://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/user-propagation-between-cloud-foundry-applications\u003c/a\u003e\u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003eWe first need to establish a \u003cem\u003eSAML\u003c/em\u003e trust between account 2 and account 1, and then configure a destination that can propagate the user login from account 1 to account 2\n\u003cimg loading=\"lazy\" src=\"/20250702232157.png\"\u003e\u003c/p\u003e\n\u003ch2 id=\"prepare-the-idp-metadata--for-establishing-trust\"\u003ePrepare the IdP Metadata  for establishing trust\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eDownload the certificate of subaccount 1 by clicking \u003cem\u003eExport\u003c/em\u003e in \u003cem\u003eConnectivity\u003c/em\u003e -\u0026gt; \u003cem\u003eDestination Trust\u003c/em\u003e \u003cimg loading=\"lazy\" src=\"/20250702183626.png\"\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003cblockquote\u003e\n\u003cp\u003eit could be required to generate the trust first \u003cimg loading=\"lazy\" src=\"/20250709101753.png\"\u003e\u003c/p\u003e","title":"Principal Propagation in cloud foundry"},{"content":"This is my new post using the Hugo PaperMod theme.\n","permalink":"https://www.slashopt.it/posts/test/","summary":"\u003cp\u003eThis is my new post using the Hugo PaperMod theme.\u003c/p\u003e","title":"My New Post"},{"content":"In #SAP #Datasphere, you have the need to write to a table created in the OPENSQL schema equivalent of the space By default, datasphere operations like Data flow have Read only access to the table defined in the OPENSQL schema\nsee https://help.sap.com/docs/SAP_DATASPHERE/be5967d099974c69b77f4549425ca4c0/7eaa370fe4624dea9f182ee9c9ab645f.html?locale=en-US\nIn order to GRANT Write access, a procedure GRANT_PRIVILEGE_TO_SPACE must be run by the OPENSQL user\nrunning it with the Console user does not return an error, but it does nothing\nFor example suppose the creation of Space IOT, where we want to write to table IOT#OPENSQL.ToolsData with a data flow\nWe would grant Insert permission to space IOT with this procedure\nCALL \u0026#34;DWC_GLOBAL\u0026#34;.\u0026#34;GRANT_PRIVILEGE_TO_SPACE\u0026#34; ( OPERATION =\u0026gt; \u0026#39;GRANT\u0026#39;, PRIVILEGE =\u0026gt; \u0026#39;INSERT\u0026#39;, SCHEMA_NAME =\u0026gt; \u0026#39;IOT#OPENSQL\u0026#39;, OBJECT_NAME =\u0026gt; \u0026#39;ToolsData\u0026#39;, SPACE_ID =\u0026gt; \u0026#39;IOT\u0026#39;); Upsert In case the Data flow is configured as Upsert, grant also the DELETE and UPDATE permission.\n","permalink":"https://www.slashopt.it/posts/dataflow-write-to-opensql-table/","summary":"\u003cp\u003eIn #SAP #Datasphere, you have the need to write to a table created in the \u003cem\u003eOPENSQL\u003c/em\u003e schema equivalent of the space\nBy default, datasphere operations like Data flow have \u003cem\u003eRead\u003c/em\u003e only access to the table defined in the \u003cem\u003eOPENSQL\u003c/em\u003e schema\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003esee \u003ca href=\"https://help.sap.com/docs/SAP_DATASPHERE/be5967d099974c69b77f4549425ca4c0/7eaa370fe4624dea9f182ee9c9ab645f.html?locale=en-US\"\u003ehttps://help.sap.com/docs/SAP_DATASPHERE/be5967d099974c69b77f4549425ca4c0/7eaa370fe4624dea9f182ee9c9ab645f.html?locale=en-US\u003c/a\u003e\u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003eIn order to GRANT \u003cem\u003eWrite\u003c/em\u003e access, a procedure \u003cem\u003eGRANT_PRIVILEGE_TO_SPACE\u003c/em\u003e must be run by the \u003cem\u003eOPENSQL\u003c/em\u003e  user\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003erunning it with the Console user does not return an error, but it does nothing\u003c/p\u003e","title":""},{"content":"Kubernetes on Ubuntu22.04 https://www.learnlinux.tv/how-to-build-an-awesome-kubernetes-cluster-using-proxmox-virtual-environment/\nSystem configuration Using #Ubuntu sever 22.04 Create the initial configuration: sudo mkdir /etc/containerd containerd config default | sudo tee /etc/containerd/config.toml For this #kubernetes cluster to work properly, we’ll need to enable SystemdCgroup within the configuration. To do that, we’ll need to edit the config we’ve just created:\nsudo nano /etc/containerd/config.toml Within that file, find the following line of text:\n[plugins.\u0026#34;io.containerd.grpc.v1.cri\u0026#34;.containerd.runtimes.runc.options] SystemdCgroup = true Disable swap sudo swapoff -a Enable bridging To enable bridging, we only need to edit one config file:\nsudo nano /etc/sysctl.conf Within that file, look for the following line: Uncomment that line by removing the # symbol in front of it, which should make it look like this:\n#net.ipv4.ip_forward=1 Enable br_netfilter The next step is to enable br_netfilter by editing yet another config file:\nsudo nano /etc/modules-load.d/k8s.conf Add the following to that file (the file should actually be empty at first):\nbr_netfilter Reboot each of your instances to ensure all of our changes so far are in place: Installing Kubernetes The next step is to install the packages that are required for Kubernetes. First, we’ll add the required GPG key:\ncurl -fsSL https://pkgs.k8s.io/core:/stable:/v1.30/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg sudo apt update sudo apt install kubeadm kubectl kubelet Initialize our Kubernetes cluster So long as you have everything complete so far, you can initialize the Kubernetes cluster now. Be sure to customize the first IP address shown here (not the second) and also change the name to match the name of your controller.\nsudo kubeadm init --control-plane-endpoint=172.16.250.216 --node-name controller --pod-network-cidr=10.244.0.0/16 After the initialization finishes, you should see at least four commands printed within the output.\nMessage recieved after first node install \u0026ldquo;our Kubernetes control-plane has initialized successfully! To start using your cluster, you need to run the following as a regular user\nmkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config Alternatively, if you are the root user, you can run:\nexport KUBECONFIG=/etc/kubernetes/admin.conf You should now deploy a pod network to the cluster. Run\nkubectl apply -f [podnetwork].yaml with one of the options listed at: https://kubernetes.io/docs/concepts/cluster-administration/addons/\nYou can now join any number of control-plane nodes by copying certificate authorities and service account keys on each node and then running the following as root:\nkubeadm join 192.168.10.66:6443 --token 2be5af.zxztnj9vmgvnzmat \\ --discovery-token-ca-cert-hash sha256:803dce1dcdbaa60dfd065300668fefe8037a176a2e03fbb44193e73ba83fdf29 \\ --control-plane Then you can join any number of worker nodes by running the following on each as root:\nkubeadm join 192.168.10.66:6443 --token 2be5af.zxztnj9vmgvnzmat \\ --discovery-token-ca-cert-hash sha256:803dce1dcdbaa60dfd065300668fefe8037a176a2e03fbb44193e73ba83fdf29 \u0026quot;\nInstalling MetalLB Protocol: layer 2 see https://metallb.universe.tf/configuration/\nconfiguration yaml\napiVersion: metallb.io/v1beta1 kind: IPAddressPool metadata: name: first-pool namespace: metallb-system spec: addresses: - 192.168.10.240-192.168.10.254 --- apiVersion: metallb.io/v1beta1 kind: L2Advertisement metadata: name: example namespace: metallb-system specificare un range di indirizzo ip gestito dal router!\nInstall ingress-nginx-controller using helm\nhelm install ingress-nginx ingress-nginx/ingress-nginx --version 4.10.0 -n ingress-nginx --create-namespace IP 192.168.10.241\nInstall Longhorn open-iscsi must be installed on nodes helm repo add longhorn https://charts.longhorn.io helm repo update kubectl create namespace longhorn-system helm install longhorn longhorn/longhorn --namespace longhorn-system Setting up ingress with basic auth creates user and password file, creates the secret\nUSER=admin; PASSWORD=Passw99rd; echo \u0026#34;${USER}:$(openssl passwd -stdin -apr1 \u0026lt;\u0026lt;\u0026lt; ${PASSWORD})\u0026#34; \u0026gt;\u0026gt; auth kubectl -n longhorn-system create secret generic basic-auth --from-file=auth patch the frontend service to have an external IP from the load balancer\nkubectl patch svc longhorn-frontend -n longhorn-system -p \u0026#39;{\u0026#34;spec\u0026#34;: {\u0026#34;type\u0026#34;: \u0026#34;LoadBalancer\u0026#34;}}\u0026#39; Creating certificates using #mkcert\nmkcert -install mkcert longhorn-ui.k8s.fga.local this will creates two files:\nlonghorn-ui.k8s.fga.local-key.pem -\u0026gt; certificate key longhorn-ui.k8s.fga.local.pem -\u0026gt; certificate creates the secret for this certificates\nkubectl create secret tls -n longhorn-system longhorn-ingress-secret --cert=longhorn-ui.k8s.fga.local.pem --key=longhorn-ui.k8s.fga.local-key.pem create the manifest\napiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: longhorn-ingress namespace: longhorn-system annotations: # type of authentication nginx.ingress.kubernetes.io/auth-type: basic # prevent the controller from redirecting (308) to HTTPS nginx.ingress.kubernetes.io/ssl-redirect: \u0026#39;false\u0026#39; # name of the secret that contains the user/password definitions nginx.ingress.kubernetes.io/auth-secret: basic-auth # message to display with an appropriate context why the authentication is required nginx.ingress.kubernetes.io/auth-realm: \u0026#39;Authentication Required \u0026#39; # custom max body size for file uploading like backing image uploading nginx.ingress.kubernetes.io/proxy-body-size: 10000m spec: ingressClassName: nginx tls: - hosts: - longhorn-ui.k8s.fga.local secretName: longhorn-ingress-secret rules: - host: longhorn-ui.k8s.fga.local http: paths: - pathType: Prefix path: \u0026#34;/\u0026#34; backend: service: name: longhorn-frontend port: number: 80 apply the manifest\nkubectl patch svc longhorn-frontend -n longhorn-system -p \u0026#39;{\u0026#34;spec\u0026#34;: {\u0026#34;type\u0026#34;: \u0026#34;LoadBalancer\u0026#34;}}\u0026#39; ","permalink":"https://www.slashopt.it/posts/kubernetes-install/","summary":"\u003ch1 id=\"kubernetes-on-ubuntu2204\"\u003eKubernetes on Ubuntu22.04\u003c/h1\u003e\n\u003cp\u003e\u003ca href=\"https://www.learnlinux.tv/how-to-build-an-awesome-kubernetes-cluster-using-proxmox-virtual-environment/\"\u003ehttps://www.learnlinux.tv/how-to-build-an-awesome-kubernetes-cluster-using-proxmox-virtual-environment/\u003c/a\u003e\u003c/p\u003e\n\u003ch2 id=\"system-configuration\"\u003eSystem configuration\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eUsing #Ubuntu sever 22.04\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode class=\"language-sudo\" data-lang=\"sudo\"\u003e\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003eCreate the initial configuration:\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003esudo mkdir /etc/containerd\ncontainerd config default | sudo tee /etc/containerd/config.toml\n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003eFor this #kubernetes cluster to work properly, we’ll need to enable SystemdCgroup within the configuration. To do that, we’ll need to edit the config we’ve just created:\u003c/p\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003esudo nano /etc/containerd/config.toml\n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003eWithin that file, find the following line of text:\u003c/p\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[plugins.\u0026#34;io.containerd.grpc.v1.cri\u0026#34;.containerd.runtimes.runc.options]\nSystemdCgroup = true\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003eDisable swap\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003esudo swapoff -a\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003eEnable bridging\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eTo enable bridging, we only need to edit one config file:\u003c/p\u003e","title":""},{"content":"OEE Calcolo KPI riferiti ad una risorsa Qui di seguito le formule per calcolare gli indicatori Availability, Perfomance e Qualità in un turno per una determinata risorsa. Le formule sono comunque generalizzabili per intervalli di tempo diversi ( ad esempio l\u0026rsquo;ora ). E\u0026rsquo; solito usare il turno come campione per analisi storiche, mentre unità più piccole solo per analisi puntali come il turno in corso.\nAvailability L\u0026rsquo;indicatore Availability è determinato dal rapporto della disponibilità effettiva di una risorsa a produrre rispetto al tempo previsto Abbiamo quindi a numeratore la durata del turno ridotta di tutti i fermi ( ossia tutto il tempo in cui la macchina era disponibile ), mentre a denominatore la durata del turno ridotta dei fermi pianificati\n$$ A = \\frac{ T_{sched} - T_{unsched}}{T_{sched} } = \\frac{ (S_e - S_s ) - \\sum_{i} (P_{ie} - P_{is} ) - \\sum_{j} (U_{je} - U_{js} )}{(S_e - S_s ) -\\sum_{i} (P_{ie} - P_{is} )} $$\n$(S_f - S_s )$ è la durata del turno, espresso come differenza tra fine turno ( oppure adesso se turno in corso ) e inizio turno\n$\\sum_{i} (P_{ie} - P_{is})$ è la durata del tempo di fermo pianificato, espresso come somma delle differenze della fine del fermo i-esimo ( oppure adesso se il fermo è in corso) e inizio del fermo\n$\\sum_{j} (U_{je} - U_{js} )$ è la durata del tempo di fermo non pianificato, espresso come somma delle differenze della fine del fermo j-esimo ( oppure adesso se fermo è in corso) e inizio del fermo\nE\u0026rsquo; solito non includere tra i fermi non programmati gli intervalli di indisponibilità la cui durata è inferiore ad una certa soglia ( i.e. microfermate ). Il loro *impatto\u0026quot; ricadrebbe nell\u0026rsquo;indicatore delle performance.\nPerformance L\u0026rsquo;indicatore Performance è determinato dal rapporto tra la effettiva velocità della macchina rispetto al tempo effettivo di produzione. Abbiamo quindi a numeratore la somma dei pezzi prodotti nel turno per il tempo ciclo teorico a produrli, mentre a denominatore quello che è stato espresso a numeratore dell\u0026rsquo;availability.\n$$ P = \\frac{ T_{prod} }{T_{sched} - T_{unsched}} = \\frac{\\sum_{l}C_l * T_l + \\sum_{k}C_k * T_k }{(S_e - S_s ) - \\sum_{i} (P_{ie} - P_{is}) - \\sum_{j} (U_{je} - U_{js} )} $$\n$\\sum_{l}C_l * T_l$ è la somma delle quantità di tutte le conferme di pezzi conformi l per il tempo ciclo teorico\n$\\sum_{k}C_k * T_k$ è la somma delle quantità di tutte le conferme di pezzi non conformi k per il tempo ciclo teorico\nE\u0026rsquo; possibile definire a livello di risorsa una tolleranza ( ad esempio 85% ) da applicare al tempo ciclo teorico.\nQualità L\u0026rsquo;indicatore Qualità è determinato dal rapporto tra la produzione di prodotto conforme e la produzione totale. Abbiamo quindi a numeratore la somma dei pezzi conformi e a denominatore la somma totale dei pezzi prodotti\n$$ Q = \\frac{ Q_{buoni} }{ Q_{buoni} + Q_{scarti} } = \\frac{\\sum_{l}C_l}{\\sum_{l}C_l + \\sum_{k}C_k } $$\nCalcolo KPI riferiti ad un gruppo di risorse Il valore dei KPI riferito ad un gruppo di risorse può essere definito come la media dei KPI delle singole risorse solamente se tutte le macchine che compongono il gruppo sono schedulate per lavorare la stessa quantità di tempo\nUna più sicura generalizzazione consiste nel considerare la somma totale dei tempi produttivi e quindi dei fermi e dei pezzi prodotti all\u0026rsquo;interno di questi intervalli.\nUn esempio numerico, ( anche se irrealistico ): supponendo di avere una risorsa pianificata per 8 ore in un giorno lavora con A=95% e un\u0026rsquo;altra pianificata per 2 ore lavora con A=60%, con la media semplice risulterebbe un $A_r$ di 77.5%. Considerando la somma dei tempi produttivi invece, avremmo un calcolo corretto del 88%\nAvailability di reparto La differenza con la Availability di una singola risorsa consiste nel considerare la somma di tutti gli intervalli produttivi di tutte le risorse r, la somma di tutti i fermi schedulati I e la somma di tutti i fermi non schedulati J. Questo KPI indica la affidabilità del reparto.\n$$ A_r = \\frac{\\sum_{r} (S_{rf} - S_{rs} ) - \\sum_{I} (P_{Ie} - P_{Is} ) - \\sum_{J} (U_{Je} - U_{Js} )}{\\sum_{r} (S_rf - S_rs ) -\\sum_{I} (P_{Ie} - P_{Is} ) } $$\nAvailability di una linea seriale. Nel caso di una linea in cui le macchine lavorano in serie, è probabile che se una macchina della serie si fermi anche le macchine a monte si fermino o a valle si fermino ( magari non immediatamente perchè sono disponibili dei buffer. ) In questi casi, usando la formula precendente si avrebbero dei conteggi sbagliati. Un approccio più realistico potrebbe essere quello di considerare come Availability di questo gruppo di macchine come la minore availability registrata da una di queste ( che agisce da collo di bottiglia )\n$$ A_s = \\min(A_r) $$\nPerformance di reparto Similarmente, per le performance si prendono in considerazione tutti i pezzi prodotti buoni L e scarto K da tutte le risorse facente parte del reparto. Questo KPI indica la differenza tra la capacità teorica del reparto e quella effettiva.\n$$ P_r = \\frac{\\sum_{L}C_L * T_L + \\sum_{K}C_K * T_K }{\\sum_{r} (S_rf - S_rs ) - \\sum_{I} (P_{Ie} - P_{Is} ) - \\sum_{J} (U_{Je} - U_{Js} )} $$\nQualità di reparto Si applica lo stesso ragionamento, si considerano i pezzi prodotti da tutte le macchine del reparto. Questo KPI può essere inteso come la probabilità che dato un pezzo eseguito in una macchina facente parte del gruppo, questo venga rendicontato come buono.\n$$ Q_r = \\frac{\\sum_{L}C_L}{\\sum_{L}C_L + \\sum_{K}C_K } $$\nQualità passante di una linea. Nel caso di una linea in cui le macchine lavorano in serie, piuttosto che essere interessati alla qualità generale dell\u0026rsquo;insieme delle macchine, si può essere interessati alla percentuale di pezzi che attraversano l\u0026rsquo;intera linea senza essere scartati. Se definiamo la Qualità di una macchina come la probabilità che un pezzo non venga scartato, allora la qualità complessiva di una linea si può definire come la probabilità che non venga scartato per ogni fase. Questa definizione non fa parte dell\u0026rsquo; OEE standard, ma è definita come RTY o rolled throughput yield ed è adottata nello standard qualitativo Six Sigma\nuna spiegazione si può trovare qui https://business.adobe.com/blog/basics/rolled-throughput-yield\n$$ Q_S = \\prod_r Qr = \\prod_r\\frac{Br}{Br + Sr} $$\nNel caso ideale in cui una macchina riceve in input solo l\u0026rsquo;output dei pezzi conformi della macchina precendente possiamo quindi definire i buoni della macchina $r$ come la somma dei buoni e degli scarti della macchina successiva $r + 1$\n$$ B_r = B_{r+1} + S{r+1} $$\nsi può definire allora la qualità passante della linea come il rapporto tra i pezzi buoni dell\u0026rsquo;ultima macchina sull\u0026rsquo;ingresso della prima\n$$ Q_s = \\frac{B_f}{B_1 + S_1} $$\noppure usando solo i buoni finali\n$$ Q_s = \\frac{B_f}{B_f + \\sum_rS_r} $$\nad esempio supponiamo di avere una linea composta da tre macchine. La qualità passante di questa linea può essere calcolata come:\n$$ Q_s = Q_1 * Q_2 * Q_3 = \\frac{B_1}{B_1 + S_1} * \\frac{B_2}{B_2 + S_2} * \\frac{B_3}{B_3 + S_3} $$\npossiamo definire i buoni in questo modo\n$$ B_1 = B_2 + S_2 $$ $$ B_2 = B_3 + S_3 $$\nandando a sostituire nella formula precedente\n$$ Q_s = \\frac{B_1}{B_1 + S_1} * \\frac{B_2}{B_1} * \\frac{B_3}{B_2} = \\frac{B_3}{B_1 + S_1} $$\no in alternativa usando solo i buoni finali\n$$ Q_s = \\frac{B_3}{B_1 + S_1} = \\frac{B_3}{B_2 + S_2 + S_1} = \\frac{B_3}{B_3 + S_3 + S_2 + S_1} $$\nAlternativa usando i valori calcolati in precedenza In maniera equivalente si può esprimere la Availability e la Performance di reparto come la somma del KPI delle singole risorse pesata per il totale del tempo di riferimento\nQuesto non è possibile per la Qualità essendo che la qualità non ha un tempo di riferimento\nAvailability $$ A_r = \\frac{\\sum_{r} (A_r * ( (S_{rf} - S_{rs} ) -\\sum_{i} (P_{rie} - P_{ris}) ) ) }{\\sum_{r} ( (S_{rf} - S_{rs} ) -\\sum_{i} (P_{rie} - P_{ris} ) )} $$\n$A_r$ è il valore di availability della risorsa r\n$(S_{rf} - S_{rs} ) -\\sum_{i} (P_{rie} - P_{ris})$ è il tempo produttivo previsto della risorsa r\nPerformance $$ P_r = \\frac{\\sum_{r} ( P_r * ( (S_{rf} - S_{rs} ) - \\sum_{i} (P_{rie} - P_{ris}) - \\sum_{j} (U_{rje} - U_{rjs}) ) ) }{\\sum_{r} ( (S_{rf} - S_{rs} ) - \\sum_{i} (P_{rie} - P_{ris}) - \\sum_{j} (U_{rje} - U_{rjs}) )} $$\n$P_r$ è il valore di performance della risorsa r\n$(S_{rf} - S_{rs} ) - \\sum_{i} (P_{rie} - P_{ris}) - \\sum_{j} (U_{rje} - U_{rjs})$ è il tempo produttivo effettivo della risorsa r\nDifferenze rispetto OEE Digital Manufacturing DM rispetta il calendario solo per quel che riguarda i turni: i giorni marcati come non lavorativi a calendario vengono comunque contati tra il tempo pianificato. DM considera per il calcolo delle performance come tempo produttivo effettivo la somma di tutti gli intervalli per i quali è avviato o sospeso un SFC. se durante un turno viene avviato un sfc solo a metà turno, e fino alla fine del turno viene mantenuta una cadenza pari al teorico, la performance per quel turno sarà del 100% se a metà turno viene sospeso lo sfc in corso e avviato un altro, e fino alla fine del turno viene mantenuta una cadenza pari al teorico, la performance per quel turno sarà del 75%\nDM non considera gli storni per il conteggio di pezzi prodotti gli storni possono comunque introdurre imprecisioni nel calcolo se avvengono al di fuori dell\u0026rsquo;unità di campionamento della conferma stornata\nDM calcola lo OEE solo per i turni conclusi. L\u0026rsquo;unità di campionamento più piccola per DM è il turno unità di campionamento più piccole per intervalli di tempo lunghi potrebbero non essere comunque disponibili per motivi di performance\n","permalink":"https://www.slashopt.it/posts/oee/","summary":"\u003ch1 id=\"oee\"\u003eOEE\u003c/h1\u003e\n\u003ch2 id=\"calcolo-kpi-riferiti-ad-una-risorsa\"\u003eCalcolo KPI riferiti ad una risorsa\u003c/h2\u003e\n\u003cp\u003eQui di seguito le formule per calcolare gli indicatori \u003cstrong\u003eAvailability\u003c/strong\u003e, \u003cstrong\u003ePerfomance\u003c/strong\u003e e \u003cstrong\u003eQualità\u003c/strong\u003e in un turno per una determinata risorsa. Le formule sono comunque generalizzabili per intervalli di tempo diversi ( ad esempio l\u0026rsquo;ora ). E\u0026rsquo; solito usare il turno come campione per analisi storiche, mentre unità più piccole solo per analisi puntali come il turno in corso.\u003c/p\u003e\n\u003ch3 id=\"availability\"\u003eAvailability\u003c/h3\u003e\n\u003cp\u003eL\u0026rsquo;indicatore \u003cstrong\u003eAvailability\u003c/strong\u003e è determinato dal rapporto della disponibilità \u003cem\u003eeffettiva\u003c/em\u003e di una risorsa a produrre rispetto al tempo \u003cem\u003eprevisto\u003c/em\u003e\nAbbiamo quindi a numeratore la durata del turno ridotta di tutti i fermi ( ossia tutto il tempo in cui la macchina era disponibile ), mentre a denominatore la durata del turno ridotta dei fermi pianificati\u003c/p\u003e","title":""}]