Skip to content
Snippets Groups Projects
Commit 55a21aa4 authored by Simone Miele's avatar Simone Miele
Browse files

uplaod

parent 3def3b33
No related branches found
No related tags found
No related merge requests found
ID;material-nr;TextMat;Budget;minLot;maxLot;roundvalue;TextPlan;work plan;description;changeover_H;cycletime_s;employeetime_s;Kavitt;Gebindem.
0;261.855.00.1;Abzweig PE-HD 45G d56/50 mit Manschette;1914;400;5600;400;SPRI2315 H260216/H260456 (Flex);SPRI2315;Spritzen 2-fach;2.483;16;1.458;2;400
1;363.112.16.1;Abzweig PE-HD 45G d56/50;30272;4400;8000;400;SPRI2315 H260216/H260456 (Flex);SPRI2315;Spritzen 2-fach;2.483;18;2.023;2;400
2;363.115.16.1;Abzweig PE-HD 45G d56/56;72572;3960;10560;440;SPRI2315 H260216/H260457 (Flex);SPRI2315;Spritzen 2-fach;2.483;20.9;2.103;2;440
3;364.112.16.1;Abzweig PE-HD 45G d63/50;27410;2880;16000;320;SPRI2315 H260499/H260502;SPRI2315;Spritzen 2-fach;2.483;42;2.443;2;320
4;366.130.16.1;Abzweig PE-HD 45G d90/90;36261;2000;7500;160;SPRI2314 H261914;SPRI2314;Spritzen 1-fach;2.483;37.6;3.173;1;160
5;366.887.16.1;Anschlussstutzen PE-HD d90/90;76744;2880;7040;160;SPRI2315 H263663;SPRI2315;Spritzen 1-fach;2.483;46.9;47.4;1;160
6;367.792.16.1;AnBogen PE-HD 90G d110/110 L22.5/7.5;4810;1700;6100;100;SPRI2314 H201226;SPRI2314;Spritzen 1-fach;2.483;48.5;48.5;1;100
7;367.887.16.1;Anschlussstutzen PE-HD d110/90;21412;1920;6960;120;SPRI2315 H263664;SPRI2315;Spritzen 1-fach;2.483;59.5;59.5;1;120
8;368.120.16.1;Abzweig PE-HD 45G d125/63;8785;1280;5600;80;SPRI2314 H261598/H263312;SPRI2314;Spritzen 1-fach;2.483;60.5;6.153;1;80
9;368.125.16.1;Abzweig PE-HD 45G d125/75;6934;1600;8800;80;SPRI2314 H261598/H263311;SPRI2314;Spritzen 1-fach;2.483;58.5;6.138;1;80
10;368.130.16.1;Abzweig PE-HD 45G d125/90;4715;1200;2400;60;SPRI2314 H261598/H263310;SPRI2314;Spritzen 1-fach;2.483;65;7.886;1;60
11;368.135.16.0;Abzweiger 45G D125x110 PE;1691;72;1440;72;SPRI2314 H261598/H261600;SPRI2314;Spritzen 1-fach;0.25;58.8;6.652;1;72
12;368.135.16.1;Abzweig PE-HD 45G d125/110;24519;1440;5640;60;SPRI2314 H261598/H261600;SPRI2314;Spritzen 1-fach;2.483;59.6;7.767;1;60
13;368.139.16.1;Abzweig PE-HD 45G d125/125;19337;1600;6560;80;SPRI2314 H261598/H261599;SPRI2314;Spritzen 1-fach;2.483;56.4;6.061;1;80
14;368.700.16.1;Langmuffe m/Doppelbund PE-HD d125;24014;1680;5680;80;SPRI2315 H265856;SPRI2315;Spritzen 1-fach;2.483;61.6;61.6;1;80
15;369.700.16.1;Langmuffe m/Doppelbund PE-HD d160;33957;1040;4800;40;SPRI2315 H265861;SPRI2315;Spritzen 1-fach;2.483;83.2;83.2;1;40
16;387.437.16.9;Wandklosettbogen 90G D110x110;189;800;4800;100;SPRI2130 H201226;SPRI2314;Spritzen 1-fach;2.483;50;3.2;1;100
17;862.814.16.0;Bogen D110 barbeitet;43044;3696;7128;264;SPRI2315 H261869;SPRI2315;Spritzen 2-fach;3.4;23.7;4.6;2;264
material-nr;TextMat;Budget;minLot;maxLot;roundvalue;work_plan;changeover_H;cycletime_s;employeetime_s;Kavitt;Gebindem.
261.855.00.1;Abzweig PE-HD 45G d56/50 mit Manschette;1914;400;5600;400;SPRI2315;2.483;16;1.458;2;400
363.112.16.1;Abzweig PE-HD 45G d56/50;30272;4400;8000;400;SPRI2315;2.483;18;2.023;2;400
363.115.16.1;Abzweig PE-HD 45G d56/56;72572;3960;10560;440;SPRI2315;2.483;20.9;2.103;2;440
364.112.16.1;Abzweig PE-HD 45G d63/50;27410;2880;16000;320;SPRI2315;2.483;42;2.443;2;320
366.130.16.1;Abzweig PE-HD 45G d90/90;36261;2000;7500;160;SPRI2314;2.483;37.6;3.173;1;160
366.887.16.1;Anschlussstutzen PE-HD d90/90;76744;2880;7040;160;SPRI2315;2.483;46.9;47.4;1;160
367.792.16.1;AnBogen PE-HD 90G d110/110 L22.5/7.5;4810;1700;6100;100;SPRI2314;2.483;48.5;48.5;1;100
367.887.16.1;Anschlussstutzen PE-HD d110/90;21412;1920;6960;120;SPRI2315;2.483;59.5;59.5;1;120
368.120.16.1;Abzweig PE-HD 45G d125/63;8785;1280;5600;80;SPRI2314;2.483;60.5;6.153;1;80
368.125.16.1;Abzweig PE-HD 45G d125/75;6934;1600;8800;80;SPRI2314;2.483;58.5;6.138;1;80
368.130.16.1;Abzweig PE-HD 45G d125/90;4715;1200;2400;60;SPRI2314;2.483;65;7.886;1;60
368.135.16.0;Abzweiger 45G D125x110 PE;1691;72;1440;72;SPRI2314;0.25;58.8;6.652;1;72
368.135.16.1;Abzweig PE-HD 45G d125/110;24519;1440;5640;60;SPRI2314;2.483;59.6;7.767;1;60
368.139.16.1;Abzweig PE-HD 45G d125/125;19337;1600;6560;80;SPRI2314;2.483;56.4;6.061;1;80
368.700.16.1;Langmuffe m/Doppelbund PE-HD d125;24014;1680;5680;80;SPRI2315;2.483;61.6;61.6;1;80
369.700.16.1;Langmuffe m/Doppelbund PE-HD d160;33957;1040;4800;40;SPRI2315;2.483;83.2;83.2;1;40
387.437.16.9;Wandklosettbogen 90G D110x110;189;800;4800;100;SPRI2314;2.483;50;3.2;1;100
862.814.16.0;Bogen D110 barbeitet;43044;3696;7128;264;SPRI2315;3.4;23.7;4.6;2;264
;material-nr;TextMat;Budget;minLot;maxLot;roundvalue;work_plan;changeover_H;cycletime_s;employeetime_s;Kavitt;Gebindem.;ideal_lot;opt_lot;n_lots;;zeit/jahr;;
0;366.130.16.1;Abzweig PE-HD 45G d90/90;36261;2000;7500;160;SPRI2314;2.483;37.6;3.173;1;160;5266;5266;7;;1363413.6;;
1;367.792.16.1;AnBogen PE-HD 90G d110/110 L22.5/7.5;4810;1700;6100;100;SPRI2314;2.483;48.5;48.5;1;100;4082;4082;2;;233285;;
2;368.120.16.1;Abzweig PE-HD 45G d125/63;8785;1280;5600;80;SPRI2314;2.483;60.5;6.153;1;80;3273;3273;3;;531492.5;;
3;368.125.16.1;Abzweig PE-HD 45G d125/75;6934;1600;8800;80;SPRI2314;2.483;58.5;6.138;1;80;3385;3385;3;;405639;;
4;368.130.16.1;Abzweig PE-HD 45G d125/90;4715;1200;2400;60;SPRI2314;2.483;65;7.886;1;60;3046;2400;2;;306475;;
5;368.135.16.0;Abzweiger 45G D125x110 PE;1691;72;1440;72;SPRI2314;0.25;58.8;6.652;1;72;3367;1440;2;;99430.8;;
6;368.135.16.1;Abzweig PE-HD 45G d125/110;24519;1440;5640;60;SPRI2314;2.483;59.6;7.767;1;60;3322;3322;8;;1461332.4;;
7;368.139.16.1;Abzweig PE-HD 45G d125/125;19337;1600;6560;80;SPRI2314;2.483;56.4;6.061;1;80;3511;3511;6;;1090606.8;;
8;387.437.16.9;Wandklosettbogen 90G D110x110;189;800;4800;100;SPRI2314;2.483;50;3.2;1;100;3960;3960;1;;9450;;
9;261.855.00.1;Abzweig PE-HD 45G d56/50 mit Manschette;1914;400;5600;400;SPRI2315;2.483;16;1.458;2;400;12375;5600;1;;30624;;
10;363.112.16.1;Abzweig PE-HD 45G d56/50;30272;4400;8000;400;SPRI2315;2.483;18;2.023;2;400;11000;8000;4;;544896;;
11;363.115.16.1;Abzweig PE-HD 45G d56/56;72572;3960;10560;440;SPRI2315;2.483;20.9;2.103;2;440;9474;9474;8;;1516754.8;;
12;364.112.16.1;Abzweig PE-HD 45G d63/50;27410;2880;16000;320;SPRI2315;2.483;42;2.443;2;320;4714;4714;6;;1151220;;
13;366.887.16.1;Anschlussstutzen PE-HD d90/90;76744;2880;7040;160;SPRI2315;2.483;46.9;47.4;1;160;4222;4222;19;;3599293.6;;
14;367.887.16.1;Anschlussstutzen PE-HD d110/90;21412;1920;6960;120;SPRI2315;2.483;59.5;59.5;1;120;3328;3328;7;;1274014;;
15;368.700.16.1;Langmuffe m/Doppelbund PE-HD d125;24014;1680;5680;80;SPRI2315;2.483;61.6;61.6;1;80;3214;3214;8;;1479262.4;;
16;369.700.16.1;Langmuffe m/Doppelbund PE-HD d160;33957;1040;4800;40;SPRI2315;2.483;83.2;83.2;1;40;2380;2380;15;;2825222.4;;
17;862.814.16.0;Bogen D110 barbeitet;43044;3696;7128;264;SPRI2315;3.4;23.7;4.6;2;264;8354;7128;7;;1020142.8;;
;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;1528.090306;3733.730556;
;;;;;;;;;;;;;;;;;SPRI2314;SPRI2315;5500
;;;;;;;;;;;;;;;;;27.78%;67.89%;
File added
%% Cell type:code id: tags:
``` python
# importing
import pandas as pd
import numpy as np
import math
from pathlib import Path
```
%% Cell type:code id: tags:
``` python
# Load Data
directory = str(Path.cwd())
dir_IMM = directory+r"\SGPlaene.csv"
print("Loading csv-files and build work df")
try:
# Fast Reading
df_IMM = pd.read_csv(dir_IMM,sep=";",encoding='utf-8',encoding_errors='ignore')
print(f"Cutpack dataset loaded successfully with {len(df_IMM)} rows and {df_IMM.shape[1]} columns.")
#print(f"IMM dataset loaded successfully with {len(df_IMM)} rows and {df_IMM.shape[1]} columns.")
except Exception as e:
print(f"Failed to load the file: {e}")
#df_IMM.dtypes
```
%% Output
Loading csv-files and build work df
Cutpack dataset loaded successfully with 18 rows and 23 columns.
Cutpack dataset loaded successfully with 18 rows and 12 columns.
%% Cell type:code id: tags:
``` python
# Split based on value production IMM
df_14 = df_IMM[df_IMM['work_plan'] == 'SPRI2314']
df_15 = df_IMM[df_IMM['work_plan'] == 'SPRI2315']
```
%% Cell type:code id: tags:
``` python
# target run time per lot (55 h = 55*3600 s, since 5500 h / 50 Weeks / 2 Changeover per Week (assumption by Geberit))
TARGET_RUN_SEC = 55 * 3600
##
# compute ideal lot size, then clamp to [min_lot, max_lot]
df["ideal_lot"] = (TARGET_RUN_SEC / df["cycle_time_sec"]).round().astype(int)
df["opt_lot"] = df["ideal_lot"].clip(lower=df["min_lot"], upper=df["max_lot"])
df_14["ideal_lot"] = (TARGET_RUN_SEC / df_14["cycletime_s"]).round().astype(int)
df_14["opt_lot"] = df_14["ideal_lot"].clip(lower=df_14["minLot"], upper=df_14["maxLot"])
# --- 4) compute number of lots needed to meet annual demand ---
df["n_lots"] = (df["Total"] / df["opt_lot"]).apply(math.ceil).astype(int)
# compute number of lots needed to meet annual demand ---
df_14["n_lots"] = (df_14["Budget"] / df_14["opt_lot"]).apply(math.ceil).astype(int)
# --- 5) report ---
print(df[[
"ID", "Total", "min_lot", "max_lot", "cycle_time_sec",
"ideal_lot", "opt_lot", "n_lots"
]])
df_14.sum(axis=0)
# compute ideal lot size, then clamp to [min_lot, max_lot]
df_15["ideal_lot"] = (TARGET_RUN_SEC / df_15["cycletime_s"]).round().astype(int)
df_15["opt_lot"] = df_15["ideal_lot"].clip(lower=df_15["minLot"], upper=df_15["maxLot"])
# compute number of lots needed to meet annual demand ---
df_15["n_lots"] = (df_15["Budget"] / df_15["opt_lot"]).apply(math.ceil).astype(int)
df_15.sum(axis=0)
```
%% Output
ID Total min_lot max_lot cycle_time_sec ideal_lot opt_lot n_lots
0 0 957 400 5600 32.0 6188 5600 1
1 1 15136 4400 8000 36.0 5500 5500 3
2 2 36286 3960 10560 41.8 4737 4737 8
3 3 13705 2880 16000 84.0 2357 2880 5
4 4 36261 2000 7500 37.6 5266 5266 7
5 5 76744 2880 7040 46.9 4222 4222 19
6 6 4810 1700 6100 48.5 4082 4082 2
7 7 21412 1920 6960 59.5 3328 3328 7
8 8 8785 1280 5600 60.5 3273 3273 3
9 9 6934 1600 8800 58.5 3385 3385 3
10 10 4715 1200 2400 65.0 3046 2400 2
11 11 1691 72 1440 58.8 3367 1440 2
12 12 24519 1440 5640 59.6 3322 3322 8
13 13 19337 1600 6560 56.4 3511 3511 6
14 14 24014 1680 5680 61.6 3214 3214 8
15 15 33957 1040 4800 83.2 2380 2380 15
16 16 189 800 4800 50.0 3960 3960 1
17 17 21522 3696 7128 47.4 4177 4177 6
C:\Users\simone.miele\AppData\Local\Temp\ipykernel_6580\1335359789.py:6: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df_14["ideal_lot"] = (TARGET_RUN_SEC / df_14["cycletime_s"]).round().astype(int)
C:\Users\simone.miele\AppData\Local\Temp\ipykernel_6580\1335359789.py:7: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df_14["opt_lot"] = df_14["ideal_lot"].clip(lower=df_14["minLot"], upper=df_14["maxLot"])
C:\Users\simone.miele\AppData\Local\Temp\ipykernel_6580\1335359789.py:10: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df_14["n_lots"] = (df_14["Budget"] / df_14["opt_lot"]).apply(math.ceil).astype(int)
C:\Users\simone.miele\AppData\Local\Temp\ipykernel_6580\1335359789.py:15: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df_15["ideal_lot"] = (TARGET_RUN_SEC / df_15["cycletime_s"]).round().astype(int)
C:\Users\simone.miele\AppData\Local\Temp\ipykernel_6580\1335359789.py:16: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df_15["opt_lot"] = df_15["ideal_lot"].clip(lower=df_15["minLot"], upper=df_15["maxLot"])
C:\Users\simone.miele\AppData\Local\Temp\ipykernel_6580\1335359789.py:19: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df_15["n_lots"] = (df_15["Budget"] / df_15["opt_lot"]).apply(math.ceil).astype(int)
material-nr 261.855.00.1363.112.16.1363.115.16.1364.112.16...
TextMat Abzweig PE-HD 45G d56/50 mit ManschetteAbzweig...
Budget 331339
minLot 22856
maxLot 71768
roundvalue 2224
work_plan SPRI2315SPRI2315SPRI2315SPRI2315SPRI2315SPRI23...
changeover_H 23.264
cycletime_s 371.8
employeetime_s 264.327
Kavitt 14
Gebindem. 2224
ideal_lot 59061
opt_lot 48060
n_lots 75
dtype: object
%% Cell type:code id: tags:
``` python
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment