Spaces:
Runtime error
Runtime error
import streamlit as st | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import pandas as pd | |
import math | |
st.set_page_config( | |
page_title="Ex-stream-ly Cool App", | |
page_icon="🧊", | |
layout="wide", | |
initial_sidebar_state="expanded" | |
) | |
st.title("Калькулятор Toyota 📦") | |
st.subheader('Toyota Material Handling') | |
st.write(""" | |
тут информация про калькулятор | |
""") | |
col1, col2 = st.columns(2) | |
Number_of_incoming_pallets = st.number_input('Количество поступаемых паллет, паллет/месяц', value=40) | |
Number_of_pallets_shipped = st.number_input('Количество отгружаемых паллет, паллет/месяц', value=40) | |
The_average_cost_of_one_product = st.number_input('Средняя стоимость одного товара, руб.', value=3000) | |
with col1: | |
The_cost_of_warehouse_maintenance_services = st.number_input('Стоимость услуг по обеспечению склада, руб./месяц', value=50000) | |
Average_salary = st.number_input('Средняя зарпала, сотрудник', value=50850) | |
Equipment_breakdown_rate_in_stock = st.number_input('Коэффициент поломки оборудования на складе, %', value=5) | |
The_cost_of_equipment_repair_in_the_warehouse = st.number_input('Стоимость ремонта оборудования на складе, руб./шт.', value=20000) | |
The_cost_of_warehouse_information_support = st.number_input('Стоимость информационной поддержки склада, руб./месяц', value=20000) | |
Spoilage_coefficient = st.number_input('Коэффициент порчи, %', value=0.1) | |
Number_of_working_hours_per_month = st.number_input('Количество рабочих часов в месяц, час', value=176) | |
Average_number_of_goods_per_pallet = st.number_input('Среднее количество товаров в одном паллете, шт./палелт', value=120) | |
Productivity_of_one_employee = st.number_input('Производительность одного сотрудника, паллетомест/час', value=0.2) | |
with col2: | |
Price_for_processing_ont_pallet = st.number_input('Цена за обработку 1 паллета, руб.', value=300) | |
def get_average_number_of_damaged_goods(): | |
return (Number_of_incoming_pallets + Number_of_pallets_shipped) * Spoilage_coefficient * Average_number_of_goods_per_pallet / 100 | |
def get_cnt_emplyes_and_equipment(): | |
The_number_of_pallets_processed_by_one_employee = Productivity_of_one_employee * Number_of_working_hours_per_month | |
Number_of_employees = math.ceil((Number_of_incoming_pallets + Number_of_pallets_shipped) / The_number_of_pallets_processed_by_one_employee) | |
return Number_of_employees, Number_of_employees | |
def get_insource_cost(): | |
Wage_fund = Number_of_employees * Average_salary | |
The_cost_of_repairing_broken_equipment = Number_of_equipment * The_cost_of_equipment_repair_in_the_warehouse * Equipment_breakdown_rate_in_stock / 100 | |
Spoilage = Average_number_of_damaged_goods * The_average_cost_of_one_product | |
return [The_cost_of_warehouse_maintenance_services, | |
Wage_fund, | |
The_cost_of_warehouse_information_support, | |
The_cost_of_repairing_broken_equipment, | |
Spoilage, | |
The_cost_of_warehouse_maintenance_services + Wage_fund + The_cost_of_repairing_broken_equipment + The_cost_of_warehouse_information_support + Spoilage] | |
def get_outsource_cost(): | |
pass | |
if st.button('Расчет эффективности'): | |
Number_of_employees, Number_of_equipment = get_cnt_emplyes_and_equipment() | |
Average_number_of_damaged_goods = get_average_number_of_damaged_goods() | |
insource_cost = get_insource_cost() | |
st.write(f'Затраты Insource склад {insource_cost}') |