2024-12-02 18:41:02 +03:00
|
|
|
from typing import Optional
|
|
|
|
|
import os
|
|
|
|
|
import numpy as np
|
|
|
|
|
import pandas as pd
|
2024-12-03 12:03:52 +03:00
|
|
|
from intervaltree import Interval, IntervalTree
|
2024-12-02 18:41:02 +03:00
|
|
|
|
|
|
|
|
from roboter import RobotPerformance, TWC_Performance
|
|
|
|
|
|
|
|
|
|
class PerformanceProcessor:
|
|
|
|
|
|
|
|
|
|
def calc_performance(self, path, df):
|
|
|
|
|
robot = RobotPerformance()
|
|
|
|
|
TWC = TWC_Performance()
|
2024-12-03 12:03:52 +03:00
|
|
|
point_tree, movement_tree, dialog_tree = robot.job(path)
|
|
|
|
|
closing_tree, squeeze_tree, relief_tree = TWC.job(df)
|
|
|
|
|
|
|
|
|
|
dialog_inPoint = point_tree & dialog_tree
|
|
|
|
|
dialog_inMovement = movement_tree & dialog_tree
|
|
|
|
|
|
|
|
|
|
closing_inPoint = point_tree & closing_tree
|
|
|
|
|
closing_inMovement = movement_tree & closing_tree
|
|
|
|
|
|
|
|
|
|
squeeze_inPoint = point_tree & squeeze_tree
|
|
|
|
|
squeeze_inMovement = movement_tree & squeeze_tree
|
|
|
|
|
|
|
|
|
|
relief_inPoint = point_tree & relief_tree
|
|
|
|
|
relief_inMovement = movement_tree & relief_tree
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-02 18:41:02 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
path = "D:\downloads\Test2\TeslaTIME29_71_KRCIO.dat"
|
|
|
|
|
robot = RobotPerformance()
|
|
|
|
|
#TWC = TWC_Performance()
|
|
|
|
|
result = robot.job(path)
|
2024-12-03 12:03:52 +03:00
|
|
|
print (result[0])
|
|
|
|
|
print (result[1])
|