Python Forum
Help to Plot timeline for intreruption of one line production
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help to Plot timeline for intreruption of one line production
#1
Output:
ShiftDate Shift StartDate Duration DetailCode 18-03-2021 0:00 1 18-03-2021 6:00 13.37 0.009284722 18-03-2021 0:00 1 18-03-2021 6:48 1.07 0.000743056 18-03-2021 0:00 1 18-03-2021 6:56 2.68 0.001861111 18-03-2021 0:00 1 18-03-2021 7:41 9.65 0.006701389 18-03-2021 0:00 1 18-03-2021 8:25 6.8 0.004722222 18-03-2021 0:00 1 18-03-2021 9:10 6.75 0.0046875 18-03-2021 0:00 1 18-03-2021 9:22 2.03 0.001409722 18-03-2021 0:00 1 18-03-2021 9:27 2.95 0.002048611 18-03-2021 0:00 1 18-03-2021 9:33 1.55 0.001076389 18-03-2021 0:00 1 18-03-2021 10:02 30 0.020833333 18-03-2021 0:00 1 18-03-2021 10:32 7.63 0.005298611 18-03-2021 0:00 1 18-03-2021 12:25 10.37 0.007201389 18-03-2021 0:00 1 18-03-2021 13:02 3.8 0.002638889 18-03-2021 0:00 1 18-03-2021 13:25 2.53 0.001756944 18-03-2021 0:00 1 18-03-2021 13:31 9.33 0.006479167 18-03-2021 0:00 1 18-03-2021 13:43 17 0.011805556 18-03-2021 0:00 1 18-03-2021 14:00 7.58 0.005263889 18-03-2021 0:00 1 18-03-2021 14:11 1.53 0.0010625 18-03-2021 0:00 1 18-03-2021 14:39 14.85 0.0103125 18-03-2021 0:00 1 18-03-2021 15:58 2.35 0.001631944 18-03-2021 0:00 1 18-03-2021 16:31 1.03 0.000715278 18-03-2021 0:00 1 18-03-2021 17:02 13.45 0.009340278 18-03-2021 0:00 1 18-03-2021 17:54 1.2 0.000833333 18-03-2021 0:00 1 18-03-2021 18:09 30 0.020833333 18-03-2021 0:00 1 18-03-2021 18:39 15.2 0.010555556 18-03-2021 0:00 1 18-03-2021 19:51 2.15 0.001493056 18-03-2021 0:00 1 18-03-2021 20:53 16.4 0.011388889 18-03-2021 0:00 1 18-03-2021 21:13 1.52 0.001055556 18-03-2021 0:00 1 18-03-2021 21:18 2.28 0.001583333 18-03-2021 0:00 1 18-03-2021 21:27 16.38 0.011375 18-03-2021 0:00 1 18-03-2021 21:46 14 0.009722222 18-03-2021 0:00 1 18-03-2021 22:00 3.55 0.002465278 18-03-2021 0:00 1 18-03-2021 23:59 9 0.00625 18-03-2021 0:00 1 19-03-2021 0:08 11 0.007638889 18-03-2021 0:00 1 19-03-2021 0:19 13.2 0.009166667 18-03-2021 0:00 1 19-03-2021 2:08 29.9 0.020763889 18-03-2021 0:00 1 19-03-2021 4:47 1.92 0.001333333 18-03-2021 0:00 1 19-03-2021 5:49 11 0.007638889
Larz60+ write Mar-20-2021, 11:15 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

Note: Input data looks better when surrounded by output tags.
Unfortunately there are no input tags available.

Added for you this time. Please use bbcode tags on future posts
Reply
#2
what have you tried so far?

If you'd like someone to do the work for you, please post thread on Jobs Column. and give complete details of what your goal is, and what you will pay for compensation.
Reply
#3
Sure, I can help you with that. Here's an example timeline for an interruption in a production line:

Start of Production: The production line is operating smoothly, and products are being manufactured.

Intermittent Issues: The production line experiences intermittent issues, such as occasional equipment failures or quality control problems. These issues cause minor delays in production, but the line continues to operate.

Major Equipment Failure: A critical piece of equipment on the production line fails, causing a significant interruption in production. The line must be shut down while the equipment is repaired or replaced.

Repair/Replacement of Equipment: The repair or replacement of the equipment takes several hours or days, depending on the extent of the damage. During this time, production is completely halted.

A restart of Production: Once the equipment is repaired or replaced, the production line can be restarted. However, there may be a period of time required to calibrate the equipment or perform quality control checks before production can resume at full capacity.

Catch-Up Period: Even after production resumes, there may be a period of time required to catch up on the lost production. This may involve overtime work or increased production speeds to meet demand.


here's an example of how you can create a timeline for an interruption in a production line using Python:


import datetime

# Define start and end times for the production line
start_time = datetime.datetime(2023, 2, 28, 8, 0, 0) # Assuming production started at 8 AM on Feb 28th, 2023
end_time = datetime.datetime(2023, 3, 3, 12, 0, 0) # Assuming production ended at noon on March 3rd, 2023

# Define the interruption events
events = [
{'name': 'Intermittent Issues', 'start': datetime.datetime(2023, 2, 28, 10, 0, 0), 'end': datetime.datetime(2023, 2, 28, 14, 0, 0)},
{'name': 'Major Equipment Failure', 'start': datetime.datetime(2023, 2, 28, 16, 0, 0), 'end': datetime.datetime(2023, 3, 1, 12, 0, 0)},
{'name': 'Repair/Replacement of Equipment', 'start': datetime.datetime(2023, 3, 1, 12, 0, 0), 'end': datetime.datetime(2023, 3, 2, 10, 0, 0)},
{'name': 'Restart of Production', 'start': datetime.datetime(2023, 3, 2, 10, 0, 0), 'end': datetime.datetime(2023, 3, 2, 14, 0, 0)},
{'name': 'Catch-Up Period', 'start': datetime.datetime(2023, 3, 2, 14, 0, 0), 'end': datetime.datetime(2023, 3, 3, 12, 0, 0)}
]

# Plot the timeline
for event in events:
event_duration = event['end'] - event['start']
event_start_offset = event['start'] - start_time
event_duration_hours = event_duration.total_seconds() / 3600
event_start_offset_hours = event_start_offset.total_seconds() / 3600
print(f"{event['name']}: {event_start_offset_hours:.2f} - {event_start_offset_hours+event_duration_hours:.2f} hours")


This code defines the start and end times for the production line, and then creates a list of interruption events with their start and end times. It then calculates the duration of each event and the time offset from the start of production, and prints out a timeline of the events with their start and end times in hours. You can modify the event names, start and end times, and other variables to match your specific scenario.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to create a plot with line graphs and vertical bars devansing 6 2,319 Feb-28-2023, 05:38 PM
Last Post: devansing
  Time Series Production Process Problem Mzarour 1 2,131 Feb-28-2023, 12:25 PM
Last Post: get2sid
  Plot Line chart based on the input parthi1705 4 3,456 Feb-28-2023, 12:08 PM
Last Post: get2sid
  Pick a line in a plot with matplotlib Romain 3 5,619 Feb-28-2023, 11:56 AM
Last Post: get2sid

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020