Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • philip.mahouttchi-hosseini/quality-kpi-final
  • boris.dasgupta/quality-kpi
  • hani.husseini/quality-kpi
  • tolga.guelec/quality-kpi
  • eva.schlott/quality-kpi
  • artashes.manukyan/quality-kpi
  • reinhart.tjahjadi/quality-kpi-reinhart-jason-tjahjadi
  • sotiris.giovannis/quality-kpi-giovanns
  • luis.gleich/quality-kpi
  • julius.damm/quality-kpi
  • gaganpreet.singh/quality-kpi
  • felix.fassler/aufgabe-1-felixf
  • benjamin.gross/quality-kpi
  • yixing.tao/quality-kpi-2024
  • louis.randa/quality-kpi
  • konstantinos.boiadjiev/quality-kpi
  • ammon.wuendisch/quality-kpi
  • tarish.kalra/quality-kpi
  • constantin.messingfeld/quality-kpi
  • manuel.kaster/quality-kpi
  • rafi.noordin/quality-kpi-rafinoordin
  • fst-tuda/public/lehre/quality-kpi
  • robert.schaefer1/quality-kpi
  • luca_tobias.nuecker/quality-kpi
  • calvin.weide/quality-kpi
  • maximilian.gross1/quality-kpi
  • christoph.froehlich/quality-kpi
  • young-min.kong/quality-kpi
  • thomas.gruber/quality-kpi
  • dennis.dibbern/quality-kpi
  • luca.sommer/quality-kpi
  • tushar.sharma/quality-kpi
  • philipp.schmidt2/quality-kpi
  • jakob.knoblach/quality-kpi
  • diogo.fernandes_costa/quality-kpi
  • zidane.buermann/quality-kpi
  • elias.rausch/quality-kpi
  • vincent.jestaedt/quality-kpi
  • santiago.ramirez_saldana/quality-kpi
  • jan.wech/quality-kpi
  • noah.michel1/lerneinheit-1-noah-michel
  • bastian.bickel/quality-kpi
  • linus.schuette/quality-kpi
  • henrik.buechs/quality-kpi
  • florian.weiss/quality-kpi
  • julie.kickstein/quality-kpi
  • paul.zuendel/quality-kpi
  • valentin.kaemmerer/quality-kpi
  • erwin.durasow/quality-kpi
  • david.buening/quality-kpi
  • keanu.engel/engel-keanu-auto
  • leo.mensler/quality-kpi
  • tahsin.ahmad/quality-kpi
  • moritz.roth/moritz-roth
  • jonathan.kollmann/quality-kpi
  • noah.waltmann/quality-kpi
  • daniel.burgos/quality-kpi
  • nilay.kuslugil/quality-kpi
  • yvan.ngoune/quality-kpi
  • eric.hahn/quality-kpi
  • andy.zheng/quality-kpi
  • junghyun.seo/quality-kpi
  • fabian.roesch1/quality-kpi
  • ole.quiring/quality-kpi
  • jonas.dietrich/quality-kpi
  • marius.stumpe/quality-kpi
  • maurizio.fell/quality-kpi
  • harry.kristanto/quality-kpi-prakdig-hk
  • paul.bobrinskoy/quality-kpi
  • vladimir.pascari/quality-kpi-vladimir-pascari
  • paul_konrad.braun/quality-kpi
  • leon.dawkins/quality-kpi
  • noel.schwibus/quality-kpi
  • bianca.beer/quality-kpi
  • pascal.pohlenz/quality-kpi
  • martin.cao/quality-kpi
  • malte.kramp/quality-kpi
  • jannik.hoffmann/quality-kpi
  • ishwor.kapri/quality-kpi
  • dhiraj.baral/quality-kpi
  • tobias.erdmann/quality-kpi
  • naveen.mohan/quality-kpi
  • filip.fetzer/quality-kpi
  • jakob.koch/quality-kpi
  • sascha.lamm/quality-kpi
  • lilly.laubenheimer/quality-kpi
  • amen.bouzouraa/quality-kpi
  • louis.senff/quality-kpi
  • francisco.flores/quality-kpi
  • benit.iberhysaj/quality-kpi
  • daniel.vratnjan/quality-kpi
  • henri.sprickmann/quality-kpi
  • tim.ostendorf/quality-kpi
  • maximilian.kopp1/lerneinheit-i-quality-kpi
  • zineb.karri/quality-kpi
  • bryan.lauren/quality-kpi
  • leon.herz/quality-kpi
  • zhibo.zhao/quality-kpi
  • samuel.neidert/quality-kpi
  • jiacheng.wang/quality-kpi
  • lucas.czarnecki/quality-kpi
  • lukas.ripp/quality-kpi
  • nikolai.brueckner/quality-kpi-nikolai-brueckner
  • niklas.ulmer/quality-kpi
  • lea_sophie.heering/quality-kpi
  • julia.kipp/quality-kpi
  • andres.rivera/quality-kpi
  • felix.meyners/quality-kpi
  • paul.sipp/quality-kpi
  • pascal.grym/quality-kpi
  • simon.peters/quality-kpi
  • justus.naewie/quality-kpi
  • alicia.sachs/quality-kpi
  • pascal.schraut/quality-kpi
  • jonas.dissinger/quality-kpi
  • mattheo.beyer/quality-kpi
  • adonay.johannes/quality-kpi
  • konrad.winkhaus/winkhaus-konrad-2809351-64-le-1
  • miko.boml/quality-kpi
  • bob.putz/quality-kpi
  • buesra.akkaya/quality-kpi
  • anton.littmann/quality-kpi
  • julian.volgmann/quality-kpi
  • soner.elbudak/quality-kpi
  • ilhan_mert.dumlupinar/quality-kpi
  • ibrahim.alsaleh/quality-kpi
  • amina.anizi/quality-kpi
  • Philipp.List/quality-kpi
  • greta.kirchhoff/quality-kpi
  • rowie.samuel/quality-kpi
130 results
Show changes
Commits on Source (105)
Showing
with 1646 additions and 218 deletions
__pycache__/
\ No newline at end of file
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/python/tags/
image: python:latest
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/topics/caching/
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache/pip
- venv/
before_script:
- python --version # For debugging
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- which python
test:
tags:
- env:docker
script:
#- python setup.py test
- pip install flake8 # you can also use tox
- pwd
- ls -lh
- flake8 ./trial_json.py
run:
tags:
- env:docker
script:
- pip install -r requirements.txt
- python trial_json.py
# an alternative approach is to install and run:
# - pip install dist/*
# run the command here
# artifacts:
# paths:
# - dist/*.whl
#pages:
# tags:
# - env:docker
# script:
# - pip install sphinx sphinx-rtd-theme
# - cd doc
# - make html
# - mv build/html/ ../public/
# artifacts:
# paths:
# - public
# rules:
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
0
0 Name: New Model.ldr
0 Author:
1 71 180 -48 0 1 0 0 0 1 0 0 0 1 56904.dat
1 0 180 -48 0 1 0 0 0 1 0 0 0 1 30699.dat
1 4 260 -57.8657 -50 1 0 0 0 1 0 0 0 1 2730.dat
1 71 180 -48 -30 0 0 1 0 1 0 -1 0 0 32073.dat
1 47 180 -48 -30 1 0 0 0 1 0 0 0 1 3713.dat
1 47 180 -48 -70 1 0 0 0 1 0 0 0 1 3713.dat
1 71 340 -48 0 1 0 0 0 1 0 0 0 1 56904.dat
1 0 340 -48 0 1 0 0 0 1 0 0 0 1 30699.dat
1 71 340 -48 -30 0 0 1 0 1 0 -1 0 0 32073.dat
1 47 340 -48 -30 1 0 0 0 1 0 0 0 1 3713.dat
1 47 340 -48 -70 1 0 0 0 1 0 0 0 1 3713.dat
1 47 220 -128 -70 1 0 0 0 0 1 0 -1 0 40490.dat
1 47 220 -208 -70 0 0 1 0 1 0 -1 0 0 32073.dat
1 47 220 -208 -25 -1 0 0 0 1 0 0 0 -1 32123.dat
1 47 220 -208 -35 -1 0 0 0 1 0 0 0 -1 32123.dat
1 47 220 -208 -45 -1 0 0 0 1 0 0 0 -1 32123.dat
1 47 220 -208 -55 -1 0 0 0 1 0 0 0 -1 32123.dat
1 47 220 -208 -85 -1 0 0 0 1 0 0 0 -1 32123.dat
1 47 220 -208 -95 -1 0 0 0 1 0 0 0 -1 32123.dat
1 47 220 -208 -105 -1 0 0 0 1 0 0 0 -1 32123.dat
1 47 220 -208 -115 -1 0 0 0 1 0 0 0 -1 32123.dat
1 47 220 -48 -60 0 0 1 0 -1 0 1 0 0 3673.dat
File added
# Lerneinheit FAIRe Qualitäts-KPIs
## Einführung
Siehe Skript und Aufgabenstellung in [moodle](https://moodle.tu-darmstadt.de/course/view.php?id=36368&section=3#tabs-tree-start).
## Materialien
## Anwendung
In diesem GitLab Repo finden Sie:
- Package functions (`functions/`): Beinhaltet die Module `classes` und `calculation_rules`
- Modul classes (`functions/classes.py`): Werkzeuge zum Aufbau und zur Bearbeitung der LEGO-Konstruktionen
- Modul calculation_rules (`functions/calculation_rules.py`): Funktionen zum Berechnen der FAIRen
Qualitäts-KPIs
- Python-Hilfsdatei (`functions/__init__.py`): Notwendige Datei für die Erzeugung eines Python-Pakets
- Datenblätter (`datasheets/`): Datenblätter ausgewählter LEGO-Komponenten im JSON-Format
- Teilebibliothek (`LeoCAD/library.bin`): Teilebibliothek für das Programm LeoCAD
- Abbildungsordner (`figures`): Ordner zum Ablegen der LeoCAD-Screenshots
- Beispiel-Notebook (`minimalbeispiel.ipynb`): Einführendes Beispiel zur Verwendung der Werkzeuge
- Ausarbeitungs-Notebook (`ausarbeitung.ipynb`): Vorlage zur Bearbeitung der Aufgaben und Abgabe
## Ausarbeitung
Die Ausarbeitung erfolgt im Notebook `ausarbeitung.ipynb`. In diesem ist bereits eine Gliederung vorgegeben.
## Abgabe
Die Abgabe erfolgt über moodle.
Die Abgabe erfolgt über [moodle](https://moodle.tu-darmstadt.de/mod/assign/view.php?id=1249192). Committen und pushen Sie zunächst Ihre Änderungen auf GitLab und laden Sie von dort Ihr gesamtes Repo als .zip-Datei herunter (ein direkter Download vom JupyterHub ist leider nicht möglich). Benennen Sie die .zip-Datei nach dem folgenden Schema:
<p style="text-align: center;"> &lt;Nachname&gt;_&lt;Vorname&gt;_&lt;MATR-NR&gt;_&lt;GRUPPEN-NR&gt;_le_1.zip</p>
Abgaben, die diese Namenskonvention nicht erfüllen, können in der Bewertung nicht berücksichtigt werden.
Laden Sie diese .zip-Datei in moodle hoch. Insbesondere sollten vorhanden sein:
- Jupyter Notebook mit Erklärungen und Darstellungen von LeoCAD
- Python-Funktionen für die Berechnung der KPIs
- Die exportierte(n) JSON-Datei(en) des Fahrzeuges (inkl. der hinzugefügten KPIs)
\ No newline at end of file
%% Cell type:markdown id:9d0d63c1 tags:
%% Cell type:markdown id:c9328cd1 tags:
# FAIRe Qualitäts-KPIs
Autor:
Datum:
%% Cell type:code id:c61985be tags:
%% Cell type:markdown id:1c5d41dc tags:
## Forschungsfrage
Formulieren Sie eine oder mehrere Forschungsfragen zu der Lerneinheit:
%% Cell type:markdown id:14e306b5 tags:
%% Cell type:markdown id:de070039 tags:
## Erstes Fahrzeug
%% Cell type:markdown id:531d890a tags:
### Versuchsziel
Formulieren Sie ein Versuchsziel für diesen ersten Versuch:
%% Cell type:markdown id:30ddd8dc tags:
%% Cell type:markdown id:50dd9ff3 tags:
### Versuchsaufbau
Bauen Sie ein erstes Fahrzeug aus den gegebenen LEGO-Teilen in der CAD-Software LeoCAD auf.
Hierbei gelten die folgenden Rahmenbedingungen:
- Das Fahrzeug muss aus Baugruppen, Bauteilen und Komponenten bestehen.
- Es muss mindestens vier Räder besitzen
- Es muss sich durch den elektrischen Antrieb fortbewegen können.
- Die Verwendung eines Getriebes zwischen Motor und Antriebsachse(n) ist verpflichtend.
- Die Farbe von mindestens einem Teil soll sich von der in LeoCAD hinterlegten Standardfarbe unterscheiden.
- Es sind nur die LEGO-Teile zu verwenden, welche sich in den JSON-Dateien bzw. in
der zur Verfügung gestellten Teilebibliothek befinden.
%% Cell type:markdown id:0ebba2d8 tags:
Fügen Sie eine Abbildung des fertigen Autos in LeoCAD hinzu (*Hinweise: Ein Bild lässt sich mit \!\[Bildbeschreibung](/Pfad/zum/Bild) hinzufügen. Achten Sie darauf, das Bild später auch in Git hinzuzufügen*):
%% Cell type:markdown id:935c200c tags:
%% Cell type:markdown id:05a8eb21 tags:
Beschreiben Sie kurz und präzise Ihr Fahrzeug:
%% Cell type:markdown id:df7f1d01 tags:
%% Cell type:markdown id:e622f83b tags:
Bauen Sie das Fahrzeug nun in unserem Software-Framework zusammen. Instanziieren Sie die LEGO-Teile und lesen Sie dabei auch die Eigenschaften ein. Ergänzen Sie zusätzliche Eigenschaften, wie z.B. die Farbe. Referenzieren Sie die Teile aufeinander und erstellen Sie auf diese Weise sinnvolle Bauteile, Baugruppen und das
Gesamtsystem. Nutzen Sie die hierfür bereitgestellten Klassendefinitionen und Methoden. Achten Sie auf eine gute Code-Dokumentation. Sie können sich für die Bearbeitung an den zur Verfügung gestellten Code-Zellen orientieren, können hiervon jedoch auch abweichen.
*Hinweise: Achten Sie auf die Unterschiede zum Minimalbeispiel. Eine direkte Kopie ist nicht möglich. Achten Sie außerdem darauf, ein Teil (eindeutig identifiziert durch seine UUID) nicht an mehreren Stellen zu verbauen*
%% Cell type:code id:690da270 tags:
``` python
# import modules
import json
import pprint
from functions import calculation_rules
from functions import classes
from functions.classes import *
```
%% Cell type:code id:ccaf3043 tags:
``` python
# initialize components
```
%% Cell type:code id:36f981df tags:
``` python
# set properties
```
%% Cell type:code id:8d0d8deb tags:
%% Cell type:code id:da2d141c tags:
``` python
# test the import
calculation_rules.test_function()
# aggregate components
```
%% Output
%% Cell type:markdown id:c1fef7f0 tags:
### Analyse
Bestimmen Sie die Qualität Ihres Fahrzeugs mittels KPIs.
Die Qualität des Fahrzeugs ist mit mindestens einem KPI je Qualitätsdimension (Aufwand, Verfügbarkeit, Akzeptanz) zu bestimmen. Enwickeln Sie zunächst sinnvolle KPIs, welche mit den gegebenen Daten umsetzbar sind. Halten Sie die Berechnungsvorschriften im Jupyter Notebook fest. Implementieren Sie deren Berechnung für das Gesamtsystem "Fahrzeug" mittels einzelner Funktionen im Skript `calculation_rules`. Sie können zusätzlich Ihre Methoden auch auf die niedrigeren Aggregationsebenen anwenden.
%% Cell type:markdown id:d5f02096 tags:
Beschreiben Sie den jeweiligen KPI und geben Sie seine Berechnungsvorschrift an:
%% Cell type:markdown id:a793bce8 tags:
$$
a = \frac{b}{c} + d
$$
%% Cell type:markdown id:9a21b4ac tags:
You called the test function.
%% Cell type:code id:d211b05d tags:
%% Cell type:markdown id:e300a005 tags:
%% Cell type:markdown id:2aad773a tags:
Halten Sie die berechneten Werte für die KPIs im Notebook
fest:
%% Cell type:code id:59eabafc tags:
``` python
# calculate the KPIs for your car
```
%% Cell type:code id:c774b381 tags:
``` python
# print your KPIs
```
%% Cell type:markdown id:b89e8fb9 tags:
Exportieren Sie schließlich Ihr entworfenes Fahrzeug inklusive der entwickelten KPIs:
%% Cell type:code id:d518275f tags:
``` python
# export car and its properties
```
%% Cell type:markdown id:89c75440 tags:
## Zweites Fahrzeug
%% Cell type:markdown id:f8a2e1b0 tags:
### Versuchsziel
%% Cell type:markdown id:80407e7f tags:
Setzen Sie sich ein Ziel, welche Qualitätsdimensionen in einem zweiten Fahrzeug verbessert werden sollen und bauen
Sie darauf aufbauend ein zweites Fahrzeug aus den gegebenen LEGO-Teilen auf.
Die Anforderungen an das Fahrzeug sind identisch zum ersten. Wählen Sie die Einzelteile und deren Zusammenspiel entsprechend Ihrer Zielstellung aus.
%% Cell type:markdown id:f4c620ee tags:
Formulieren Sie ein Versuchsziel für diesen Versuch. Beschreiben Sie unter anderem, welche Verbesserung Sie vornehmen möchten:
%% Cell type:markdown id:e3dc7e29 tags:
%% Cell type:markdown id:73c454f2 tags:
### Versuchsaufbau
%% Cell type:markdown id:2b381a60 tags:
Fügen Sie eine Abbildung des fertigen Autos in LeoCAD hinzu:
%% Cell type:markdown id:2b6e7f12 tags:
%% Cell type:markdown id:23c19009 tags:
Beschreiben Sie kurz und präzise den Aufbau des zweiten Fahrzeugs:
%% Cell type:markdown id:a08bf9cf tags:
%% Cell type:markdown id:14011b6f tags:
Erstellen Sie das Fahrzeug in unserem Softwareframework:
%% Cell type:code id:c35de753 tags:
``` python
# initialize components
```
%% Cell type:code id:0b7336fb tags:
``` python
# set properties
```
%% Cell type:code id:fb445ea0 tags:
``` python
# aggregate components
```
%% Cell type:markdown id:89e54480 tags:
### Analyse
Bestimmen Sie die KPIs des zweiten Fahrzeugs
%% Cell type:code id:762a1e93 tags:
``` python
# calculate the KPIs for your car
```
%% Cell type:code id:1ed67328 tags:
``` python
# print your KPIs
```
%% Cell type:markdown id:0f11b370 tags:
Exportieren Sie Ihr Fahrzeug inklusive der KPIs:
%% Cell type:code id:05d9d6f7 tags:
``` python
# export car and its properties
```
%% Cell type:markdown id:e413cd84 tags:
## Diskussion
### Ergebnisse
Stellen Sie die entwickelten KPIs beider Fahrzeuge gegenüber und wählen Sie hierfür unter anderem eine geeignete
grafische Darstellung. Stellen Sie dabei insbesondere sicher, dass die Datengrundlage ersichtlich ist. Halten Sie
auch die Plotbefehle im Notebook fest:
%% Cell type:code id:b0f93e22 tags:
``` python
# plot the data, save diagramm as svg-file
```
%% Cell type:markdown id:6044de27 tags:
Interpretieren Sie Ihre Ergebnisse. Vergleichen Sie die KPIs Ihrer Autos. Konnten Sie Ihre gewünschte Verbesserung erzielen? Welche Schlüsse ziehen Sie aus den Ergebnissen für die Qualität der beiden
Fahrzeuge?
%% Cell type:markdown id:0ca884b1 tags:
%% Cell type:markdown id:4f117169 tags:
Diskutieren Sie, inwieweit Ihre entwickelten KPIs die im Skript erläuterten FAIR-Prinzipien erfüllen:
%% Cell type:markdown id:f8ed82d2 tags:
%% Cell type:markdown id:bfed164a tags:
## Fazit
%% Cell type:markdown id:5d440f87 tags:
Ziehen Sie ein persönliches Fazit. Was haben Sie Neues gelernt?
%% Cell type:markdown id:b4151784 tags:
......
{
"32073":{
"item number":32073,
"item description":"Axle 5 studs",
"category":"axle",
"price [Euro]":0.001,
"mass [g]":0.66,
"environmental impact [kg CO2e /kg]":11.03,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=32073",
"dimension [studs]":5
},
"44294":{
"item number":44294,
"item description":"Axle 7 studs",
"category":"axle",
"price [Euro]":0.01,
"mass [g]":1.05,
"environmental impact [kg CO2e /kg]":11.03,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=44294",
"dimension [studs]":7
},
"3707":{
"item number":3707,
"item description":"Axle 8 studs",
"category":"axle",
"price [Euro]":0.01,
"mass [g]":1.18,
"environmental impact [kg CO2e /kg]":11.03,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3707",
"dimension [studs]":8
},
"60485":{
"item number":60485,
"item description":"Axle 9 studs",
"category":"axle",
"price [Euro]":0.01,
"mass [g]":1.3,
"environmental impact [kg CO2e /kg]":11.03,
"delivery time [days]":7,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=60485",
"dimension [studs]":9
},
"3737":{
"item number":3737,
"item description":"Axle 10 studs",
"category":"axle",
"price [Euro]":0.01,
"mass [g]":1.49,
"environmental impact [kg CO2e /kg]":11.03,
"delivery time [days]":7,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3737",
"dimension [studs]":10
},
"23948":{
"item number":23948,
"item description":"Axle 11 studs",
"category":"axle",
"price [Euro]":0.15,
"mass [g]":1.65,
"environmental impact [kg CO2e /kg]":11.03,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=23948",
"dimension [studs]":11
},
"3708":{
"item number":3708,
"item description":"Axle 12 studs",
"category":"axle",
"price [Euro]":0.02,
"mass [g]":1.82,
"environmental impact [kg CO2e /kg]":11.03,
"delivery time [days]":7,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3708",
"dimension [studs]":12
},
"50451":{
"item number":50451,
"item description":"Axle 16 studs",
"category":"axle",
"price [Euro]":0.75,
"mass [g]":2.37,
"environmental impact [kg CO2e /kg]":11.03,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=50451",
"dimension [studs]":16
}
}
\ No newline at end of file
{
"8881-1":{
"item number":"8881-1",
"item description":"Power Functions Battery Box",
"category":"battery",
"related items":"8882-1, 8883-1, 88003-1",
"price [Euro]":12,
"mass [g]":179.4,
"environmental impact [kg CO2e /kg]":6.95,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?S=8881-1",
"output voltage [V]":9,
"dimensions [cm]":"8,8 x 6,3 x 3,2"
}
}
\ No newline at end of file
{
"Pumps":[
{"Name": "Pump_1",
"Manufacturer": "Company A",
"Unit": "Percentage",
"Efficiency": 43},
{"Name": "Pump_2",
"Manufacturer": "Company B",
"Unit": "Percentage",
"Efficiency": 56
}
]
}
{
"39790":{
"item number":39790,
"item description":"Technic, Liftarm, Modified Frame Thick 11 x 15 Open Center",
"category":"frame",
"price [Euro]":2.19,
"mass [g]":12.96,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=39790",
"dimension [studs]":"11 x 15 x 1"
},
"32532":{
"item number":32532,
"item description":"Technic, Brick 6 x 8 Open Center",
"category":"frame",
"price [Euro]":0.18,
"mass [g]":8.0,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=32532",
"dimension [studs]":"6 x 8 x 1"
},
"32531":{
"item number":32531,
"item description":"Technic, Brick 4 x 6 Open Center",
"category":"frame",
"price [Euro]":0.1,
"mass [g]":5.0,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=32531",
"dimension [studs]":"4 x 6 x 1"
},
"3700":{
"item number":3700,
"item description":"Technic, Brick 1 x 2 with Hole",
"category":"frame",
"price [Euro]":0.01,
"mass [g]":0.82,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3700",
"dimension [studs]":"1 x 2"
},
"3701":{
"item number":3701,
"item description":"Technic, Brick 1 x 4 with Holes",
"category":"frame",
"price [Euro]":0.01,
"mass [g]":1.46,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3701",
"dimension [studs]":"1 x 4 x 1"
},
"3702":{
"item number":3702,
"item description":"Technic, Brick 1 x 8 with Holes",
"category":"frame",
"price [Euro]":0.01,
"mass [g]":2.85,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3702",
"dimension [studs]":"1 x 8 x 1"
},
"2730":{
"item number":2730,
"item description":"Technic, Brick 1 x 10 with Holes",
"category":"frame",
"price [Euro]":0.01,
"mass [g]":3.67,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=2730",
"dimension [studs]":"1 x 10 x 1"
},
"3895":{
"item number":3895,
"item description":"Technic, Brick 1 x 12 with Holes",
"category":"frame",
"price [Euro]":0.03,
"mass [g]":4.2,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3895",
"dimension [studs]":"1 x 12 x 1"
},
"32018":{
"item number":32018,
"item description":"Technic, Brick 1 x 14 with Holes",
"category":"frame",
"price [Euro]":0.03,
"mass [g]":4.92,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=32018",
"dimension [studs]":"1 x 14 x 1"
},
"3703":{
"item number":3703,
"item description":"Technic, Brick 1 x 16 with Holes",
"category":"frame",
"price [Euro]":0.07,
"mass [g]":5.87,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3703",
"dimension [studs]":"1 x 16 x 1"
},
"32524":{
"item number":32524,
"item description":"Technic, Liftarm Thick 1 x 7",
"category":"frame",
"price [Euro]":0.01,
"mass [g]":1.79,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=32524",
"dimension [studs]":"1 x 7"
},
"40490":{
"item number":40490,
"item description":"Technic, Liftarm Thick 1 x 9",
"category":"frame",
"price [Euro]":0.02,
"mass [g]":2.59,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=40490",
"dimension [studs]":"1 x 9"
},
"64290":{
"item number":64290,
"item description":"Technic, Liftarm Thick 1 x 11",
"category":"frame",
"price [Euro]":0.02,
"mass [g]":2.8,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=32525",
"dimension [studs]":"1 x 11"
},
"41239":{
"item number":41239,
"item description":"Technic, Liftarm Thick 1 x 13",
"category":"frame",
"price [Euro]":0.05,
"mass [g]":3.3,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=41239",
"dimension [studs]":"1 x 13"
},
"32278":{
"item number":32278,
"item description":"Technic, Liftarm Thick 1 x 15",
"category":"frame",
"price [Euro]":0.05,
"mass [g]":4.0,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=32278",
"dimension [studs]":"1 x 15"
},
"3713":{
"item number":3713,
"item description":"Technic Bush",
"category":"frame",
"price [Euro]":0.01,
"mass [g]":0.14,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3713",
"dimension [studs]":1
},
"32123":{
"item number":32123,
"item description":"Technic Bush 1/2 Smooth",
"category":"frame",
"price [Euro]":0.01,
"mass [g]":0.01,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=4265c",
"dimension [studs]":1
},
"3749":{
"item number":3749,
"item description":"Technic, Axle 1L with Pin without Friction Ridges",
"category":"frame",
"price [Euro]":0.01,
"mass [g]":0.22,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3749",
"dimension [studs]":"0,75 x 2 x 0,55"
},
"6536":{
"item number":6536,
"item description":"Technic, Axle and Pin Connector Perpendicular",
"category":"frame",
"price [Euro]":0.01,
"mass [g]":0.39,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":7,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=6536",
"dimension [studs]":"1x 2 x 1"
},
"14720":{
"item number":14720,
"item description":"Technic, Liftarm, Modified H-Shape Thick 3 x 5 Perpendicular",
"category":"frame",
"price [Euro]":0.08,
"mass [g]":2.29,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=14720",
"dimension [studs]":"3 x 5 x 1"
},
"48989":{
"item number":48989,
"item description":"Technic, Pin Connector Perpendicular 3L with 4 Pins",
"category":"frame",
"price [Euro]":0.01,
"mass [g]":1.22,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=48989",
"dimension [studs]":"3 x 3 x 1"
},
"55615":{
"item number":55615,
"item description":"Technic, Pin Connector Perpendicular 3 x 3 Bent with 4 Pins",
"category":"frame",
"price [Euro]":0.1,
"mass [g]":1.9,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=55615",
"dimension [studs]":"4 x 4 x 1"
},
"32556":{
"item number":32556,
"item description":"Technic, Pin 3L without Friction Ridges",
"category":"frame",
"price [Euro]":0.1,
"mass [g]":0.25,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=32556",
"dimension [studs]":1
},
"3673":{
"item number":3673,
"item description":"Technic, Pin without Friction Ridges",
"category":"frame",
"price [Euro]":0.01,
"mass [g]":0.16,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3673",
"dimension [studs]":1
},
"32054":{
"item number":32054,
"item description":"Technic, Pin 4L with Friction Ridges and Stop Bush",
"category":"frame",
"price [Euro]":0.01,
"mass [g]":0.33,
"environmental impact [kg CO2e /kg]":11.93,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=32054",
"dimension [studs]":1
}
}
\ No newline at end of file
{
"6589":{
"item number":6589,
"item description":"Gear 12 Tooth Bevel",
"category":"gear",
"price [Euro]":0.01,
"mass [g]":0.29,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":12,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=6589"
},
"10928":{
"item number":10928,
"item description":"Gear 8 Tooth with Dual Face",
"category":"gear",
"price [Euro]":0.01,
"mass [g]":0.22,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":11,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=10928"
},
"94925":{
"item number":94925,
"item description":"Gear 16 Tooth",
"category":"gear",
"price [Euro]":0.2,
"mass [g]":0.7,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":12,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=94925"
},
"18575":{
"item number":18575,
"item description":"Gear 20 Tooth Double Bevel",
"category":"gear",
"price [Euro]":0.36,
"mass [g]":1.4,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":13,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=32269"
},
"24505":{
"item number":24505,
"item description":"Gear 24 Tooth",
"category":"gear",
"price [Euro]":0.32,
"mass [g]":1.17,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":11,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3648"
},
"34432":{
"item number":34432,
"item description":"Gear 40 Tooth",
"category":"gear",
"price [Euro]":0.81,
"mass [g]":3.76,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":11,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3649"
},
"32498":{
"item number":32498,
"item description":"Gear 36 Tooth",
"category":"gear",
"price [Euro]":0.88,
"mass [g]":3.5,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":12,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=32498"
},
"6588":{
"item number":6588,
"item description":"Gear Worm Gearbox",
"category":"gear",
"price [Euro]":1.63,
"mass [g]":4.5,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":11,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=6588#T=C"
},
"4716":{
"item number":4716,
"item description":"Gear Worm Screw",
"category":"gear",
"price [Euro]":0.54,
"mass [g]":0.6,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":12,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=4716#T=C"
}
}
\ No newline at end of file
{
"8882-1":{
"item number":"8882-1",
"item description":"Power Functions XL-Motor",
"category":"motor",
"related items":"8881-1",
"idle current [mA]":80,
"idle speed [rev per min]":220,
"locking torque [Ncm]":40,
"price [Euro]":30,
"mass [g]":72.85,
"environmental impact [kg CO2e /kg]":15.84,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?S=8882-1",
"input voltage [V]":9,
"dimensions [cm]":"13.6 x 12.2 x 3.9"
},
"8883-1":{
"item number":"8883-1",
"item description":"Power Functions M-Motor",
"category":"motor",
"related items":"8881-1",
"idle current [mA]":65,
"idle speed [rev per min]":405,
"locking torque [Ncm]":11,
"price [Euro]":20,
"mass [g]":35.0,
"environmental impact [kg CO2e /kg]":15.84,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?S=8883-1",
"input voltage [V]":9,
"dimensions [cm]":"13.8 x 11.9 x 2.3"
},
"88003-1":{
"item number":"88003-1",
"item description":"Power Functions L-Motor",
"category":"motor",
"related items":"8881-1",
"idle current [mA]":120,
"idle speed [rev per min]":390,
"locking torque [Ncm]":18,
"price [Euro]":15,
"mass [g]":48.0,
"environmental impact [kg CO2e /kg]":15.84,
"delivery time [days]":3,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?S=88003-1",
"input voltage [V]":9,
"dimensions [cm]":"13 x 11 x 2.5"
}
}
\ No newline at end of file
{
"3482":{
"item number":3482,
"item description":"Wheel with Split Axle Hole",
"category":"rim",
"related items":3483,
"diameter [mm]":17.5,
"price [Euro]":0.01,
"mass [g]":0.88,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3482"
},
"6014":{
"item number":6014,
"item description":"Wheel 11mm D. x 12mm, Hole Round for Wheels Holder Pin",
"category":"rim",
"related items":6015,
"diameter [mm]":11.0,
"price [Euro]":0.0045,
"mass [g]":0.6,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=6014a"
},
"18976":{
"item number":18976,
"item description":"Wheel 18mm D. x 12mm with Axle Hole and Stud, Solid Brake Rotor Lines",
"category":"rim",
"related items":30391,
"diameter [mm]":18.0,
"price [Euro]":0.01,
"mass [g]":1.4,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=18976"
},
"56904":{
"item number":56904,
"item description":"Wheel 30mm D. x 14mm",
"category":"rim",
"related items":30699,
"diameter [mm]":30.0,
"price [Euro]":0.01,
"mass [g]":4.1,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=56904"
},
"56908":{
"item number":56908,
"item description":"Wheel 43.2mm D. x 26mm Technic Racing Small, 6 Pin Holes",
"category":"rim",
"related items":"41897, 61480",
"diameter [mm]":43.2,
"price [Euro]":0.05,
"mass [g]":9.0,
"environmental impact [kg CO2e /kg]":32.06,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=56908"
}
}
\ No newline at end of file
{
"3483":{
"item number":3483,
"item description":"Tire 24mm D. x 8mm Offset Tread - Interior Ridges",
"category":"tire",
"related items":3482,
"inner diameter [mm]":17,
"outer diameter [mm]":24.0,
"price [Euro]":0.0025,
"mass [g]":1.69,
"environmental impact [kg CO2e /kg]":8.97,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=3483"
},
"6015":{
"item number":6015,
"item description":"Tire 21mm D. x 12mm - Offset Tread Small Wide",
"category":"tire",
"related items":6014,
"inner diameter [mm]":11,
"outer diameter [mm]":21.0,
"price [Euro]":0.0004,
"mass [g]":2.0,
"environmental impact [kg CO2e /kg]":8.97,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=6015"
},
"30391":{
"item number":30391,
"item description":"Tire 30.4 x 14 Offset Tread",
"category":"tire",
"related items":18976,
"inner diameter [mm]":17,
"outer diameter [mm]":30.4,
"price [Euro]":0.0027,
"mass [g]":6.5,
"environmental impact [kg CO2e /kg]":8.97,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=30391"
},
"30699":{
"item number":30699,
"item description":"Tire 43.2 x 14 Solid",
"category":"tire",
"related items":56904,
"inner diameter [mm]":30,
"outer diameter [mm]":43.2,
"price [Euro]":0.06,
"mass [g]":8.25,
"environmental impact [kg CO2e /kg]":8.97,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=30699"
},
"41897":{
"item number":41897,
"item description":"Tire 56 x 28 ZR Street",
"category":"tire",
"related items":56908,
"inner diameter [mm]":43,
"outer diameter [mm]":56.0,
"price [Euro]":0.29,
"mass [g]":13.98,
"environmental impact [kg CO2e /kg]":8.97,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=41897"
},
"61480":{
"item number":61480,
"item description":"Tire 68.7 x 34 R",
"category":"tire",
"related items":56908,
"inner diameter [mm]":43,
"outer diameter [mm]":68.7,
"price [Euro]":0.02,
"mass [g]":20.0,
"environmental impact [kg CO2e /kg]":8.97,
"delivery time [days]":5,
"data source":"https://www.bricklink.com/v2/catalog/catalogitem.page?P=61480"
}
}
\ No newline at end of file
{
"1":{
"item_number":1,
"mass":10,
"delivery_time":1
},
"2":{
"item_number":2,
"mass":20,
"delivery_time":2
},
"3":{
"item_number":3,
"mass":30,
"delivery_time":3
}
}
\ No newline at end of file
[
{
"item_number":1,
"mass":10,
"delivery_time":1
},
{
"item_number":2,
"mass":20,
"delivery_time":2
},
{
"item_number":3,
"mass":30,
"delivery_time":3
}
]
\ No newline at end of file
figures/leocad_screenshot_cut.png

220 KiB

'''
"""
File consists of several functions for the calculation rules of FAIR Quality KPIs
'''
"""
from functions.classes import *
def test_function():
"""Test function to check module functionality"""
print("You called the test function.")
def kpi_mass(system: LegoAssembly)->float:
"""
Calculates the total mass of the system
Args:
system (LegoAssembly): LegoAssembly object that represents the system
Returns:
total_mass (float): Sum of masses of all components in the system in g
Raises:
TypeError: If an argument with unsupported type is passed
(i.e. anything other than LegoAssembly).
"""
if not isinstance(system, LegoAssembly):
raise TypeError(f"Unsupported type {type(system)} passed to kpi_mass()")
total_mass = 0
for c in system.get_component_list(-1):
total_mass += c.properties["mass [g]"]
return total_mass # alternative: sum(c.properties["mass [g]"] for c in system.get_component_list(-1))
# Add new functions for calculating metrics
if __name__ == "__main__":
print("This script contains functions for calculating the FAIR Quality KPIs. It is not to be executed independently.")
pass
\ No newline at end of file
"""
Function to inform that functions in this module is
intended for import not usage as script
"""
print(
"This script contains functions for calculating the FAIR Quality KPIs."
"It is not to be executed independently."
)
This diff is collapsed.
'''
File consists of several classes for the different elements of a device.
'''
from __future__ import annotations
import uuid
from typing import Any, Union, Literal, TypedDict, TypeVar, Type, List, Optional, Dict
class LegoItem:
def __init__(self, item_number: int, mass: float, delivery_time: int, **kwargs) -> None:
# , *args, **kwargs not handling additional/optional specs right now
self.id: uuid.UUID = uuid.uuid4()
self.properties: dict = kwargs
self.item_number: int = item_number
self.mass: float = mass
self.delivery_time: int = delivery_time
# TODO: Set parent directly and not via id? This would allow for easier traversal of the tree
# Currently there is no way to search for parts and components in tree by id.
self.parent_id = None # This will be set when added to a component
def __str__(self):
return (
f"Item(id={self.id}, item_number={self.item_number}, "
f"mass={self.mass}, delivery_time={self.delivery_time}, "
f"parent_id={self.parent_id})"
)
def __repr__(self):
return f"Lego Item [{self.id}]"
class LegoComponent:
def __init__(self, **kwargs) -> None:
self.id: uuid.UUID = uuid.uuid4()
self.properties: dict = kwargs
self.items: List[LegoItem] = []
self.components: List[LegoComponent] = []
self.parent_id: None | uuid.UUID = None
def add_item(self, item: LegoItem) -> None:
if not isinstance(item, LegoItem):
raise TypeError(f"'item' should be of type LegoPart, got {type(item).__name__} instead.")
item.parent_id = self.id
self.items.append(item)
def add_component(self, component: LegoComponent) -> None:
if not isinstance(component, LegoComponent):
raise TypeError(f"'component' should be of type LegoComponent, got {type(component).__name__} instead.")
component.parent_id = self.id
self.components.append(component)
def children(self) -> Dict[str, List[LegoItem] | List[LegoComponent]]:
return {'items': self.items, 'components': self.components}
def get_item_list(self) -> List[LegoItem]:
item_list = []
item_list.extend(self.items)
for component in self.components:
item_list.extend(component.get_item_list())
return item_list
def __repr__(self):
return f"Lego Component [{self.id}]"
# TODO: Adjust default output when printing an item or component
def print_component_tree(root, level=0, is_last=False):
# print component
component_padding = ""
if level > 0:
component_padding += "" * (level - 1)
if is_last:
component_padding += "└── "
else:
component_padding += "├── "
print(f"{component_padding}{root}")
# recursively print child components
for i, component in enumerate(root.components):
is_last_ = i == len(root.components) - 1 and len(root.items) == 0
print_component_tree(component, level + 1, is_last_)
# print items
for i, item in enumerate(root.items):
item_padding = "" * level
item_padding += "├── " if i < len(root.items) - 1 else "└── "
print(f"{item_padding}{item}")