Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f3938ee
New module for decision support, based on MCDA
Jul 2, 2026
155b350
Allow target values as MCDA preference direction
Jul 2, 2026
991315e
Refactoring of MCDA code:
Jul 3, 2026
18ce58b
Updates provided by Federica: figures + fixes
Jul 3, 2026
1fa3032
Introduce dataclass McdaConfig to streamline parameter handling
Jul 3, 2026
92e6cbf
Rearrange MCDA functions; rename outputs to `results`
Jul 5, 2026
a57808a
Fix multiple bugs; set McdaConfig private attributes
Jul 5, 2026
7218f87
Create tests for the MCDA functions
Jul 6, 2026
eaba703
DSS user interface + restructure weight constraints + init_data
Jul 16, 2026
cdfb15b
Update documentation and tests
Jul 17, 2026
003b2a7
Add DSS step 0: criteria selection/exclusion
Aug 5, 2026
0985e83
In DSS step 0: ask to input missing KPI values
Aug 6, 2026
5efe48b
Allow weights & constraints for flat weight mode,
Aug 7, 2026
ba9b2ca
Serializers and KPI calculations for KAM user
Aug 18, 2026
3cfa710
Update sample_weights_dirichlet_constrained;
Aug 18, 2026
6ed01e4
Merge branch 16-kam-workflow
SanderNielen Aug 18, 2026
e9214c2
Show MCDA results plots in a webpage i.o. PDF
Aug 19, 2026
93a6c79
Show error if MCDA calculation fails
Aug 24, 2026
7ba6dd9
Improve forms + form logic; Fix saving weights
Aug 24, 2026
8726705
Introduce Results model and ResultsView;
Aug 25, 2026
b97c36d
Combine scenario + sampling_mode into 1 variable;
Aug 26, 2026
385cabf
Replace order constraints by criterion/group ranking
Sep 2, 2026
99c7091
Bug fixes, UI improvements, clarifications
Sep 3, 2026
57b4e68
New KAM input form to simulate API calls to DSS
Sep 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,89 @@ A DPP is uniquely identified by its registration number. It can be accessed thro
'update_interval': 'A',
}
```

# Decision Support System manual
The Sustainability and Cost Module features a Decision Support System (DSS) that can be accessed through an API. It is specifically designed for supporting decisions in laser welding. The DSS has a user interface to guide you through the process of setting decision preferences.

## API access
To receive decision support for comparing different laser welding parameters, send a post request to [main-domain.com/dss/experiments/]. The request should contain a list of experiments with the following structure:
```JSON
[
{
"experimentId": 12,
"weldLength": 29,
"weldSpeed": 100,
"country": "DE",
"laserPowerkW": 4,
"weldingStationPowerkW": 12,
"consumables": [
{
"name": "Nitrogen",
"flowRate": 15.2,
"unit": "m3/h"
},
{
"name": "Argon",
"flowRate": 6,
"unit": "m3/h"
},
{
"name": "Aluminium (filler wire)",
"flowRate": 0.02,
"unit": "kg/h"
}
],
"qualityParameters": [
{
"name": "Porosity",
"value": 3.2,
"target": "min"
},
{
"name": "Tensile strength",
"value": 0.18,
"target": "max"
},
{
"name": "Weld depth",
"value": 3,
"target": 3.5
}
]
}
]
```


## Criteria calculations

Calculations for deriving the KPIs used as decision criteria in the DSS, for the Process Developer. These calculations are implemented in the function calculate_kpis, in script views.py.
- Amount of shielding gas = gas flow rate × processing time
- Amount of filler wire = filler wire use rate × processing time
- Consumables costs = Σ amount × price (for all consumables)
- Labour costs = processing time × 3 × wages (in the specific country)
- Process energy use = processing time × (laser power + welding station power)
- Energy costs = process energy use × electricity price (in the specific country)
- Operating costs = consumables costs + labour costs + energy costs
- Consumables footprint = Σ amount × material carbon footprint (for all consumables)
- Process carbon footprint = consumables footprint + process energy use × electricity footprint (in the specific country)
- The technical quality indicators are directly used without calculations.

Calculations for deriving KPIs for the Key Account Manager. This is not implemented yet (July 2026).
- Amount of shielding gas = gas flow rate × processing time
- Amount of filler wire = filler wire use rate × processing time
- Consumables costs = Σ amount × price (for all consumables)
- Labour costs = cycle time × 3 × wages (in the specific country)
- Process energy use = processing time × laser power + cycle time × welding station power
- Energy costs = process energy use × electricity price (in the specific country)
- Operating costs = consumables costs + labour costs + energy costs + maintenance costs
- Materials costs = Σ material weight × material price / (1 – scrap rate) (for all parts)
- Service life = 15 years (fixed value)
- Annual production = 240 days/year × 16 hours/day × 3600 seconds/hour / cycle time
- Amortized CAPEX = investment costs / (service life × annual production)
- Total production costs = operating costs + materials costs + amortized CAPEX
- Consumables footprint = Σ amount × material carbon footprint (for all consumables)
- Process carbon footprint = consumables footprint + process energy use × electricity footprint (in the specific country)
- Materials footprint = Σ material weight × material carbon footprint / (1 – scrap rate) (for all parts)
- Product carbon footprint = process carbon footprint + materials footprint
- The remaining KPIs are directly used without calculations: recyclability, process monitoring, process automation level, operator specialization level, production lead time, machine saturation, technical quality indicators.
18 changes: 18 additions & 0 deletions mysite/dpp/migrations/0041_alter_transport_mode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 6.0.5 on 2026-07-08 11:40

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('dpp', '0040_productionline_created_by_user'),
]

operations = [
migrations.AlterField(
model_name='transport',
name='mode',
field=models.CharField(choices=[('train', 'Freight train'), ('ocean ship', 'Sea freight container ship'), ('truck', 'Lorry / truck, average'), ('inland ship', 'Inland waterway ship'), ('airplane', 'Aircraft'), ('delivery van', 'Light commercial vehicle (delivery van)'), ('NA', 'Unspecified')], default='NA', max_length=12, verbose_name='Main mode of transport'),
),
]
Empty file added mysite/dss/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions mysite/dss/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
5 changes: 5 additions & 0 deletions mysite/dss/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class DssConfig(AppConfig):
name = 'dss'
Loading