Commit bcfcfb57 authored by Weerasinghe D.N.H's avatar Weerasinghe D.N.H

BACKEND : Method definitions added for class_diagram_class_detection_service.py

parent ceb44915
class WarehouseOperator:
def Create_Orders_By_Uploading_A_Csv_File(self):
pass
def Make_Adjustments_To_The_Order(self):
pass
def Allocate_A_Vehicle_For_A_Job(self):
pass
def Change_The_System_Suggested_Optimized_Route_If_Required(self):
pass
def Confirm_A_Job(self):
pass
def Change_The_Vehicle_Allocated_For_A_Job(self):
pass
def Export_Information_Of_A_Job_To_Pdf_And_Xls_Format(self):
pass
def Indicate_That_The_Loading_Is_Completed(self):
pass
def Generate_An_Invoice_For_Each_Vehicle(self):
pass
def Generate_Vehicle_Capacity_Utilization_Report(self):
pass
def Generate_Outlet_Wise_Transport_Cost_Report_For_A_Given_Date_Range(self):
pass
def Generate_Vehicle_Turnaround_Time_Report_For_A_Warehouse(self):
pass
def Generate_Cost_Per_1_Kg_Report(self):
pass
def Generate_An_Idle_Time_Limit_Violation_Report(self):
pass
class WarehouseIncharge:
def Confirm_The_Delivered_Items_To_A_Outlet(self):
pass
def Approve_A_Job(self):
pass
def Request_A_Modification_To_The_Planned_Mileage_Of_A_Job(self):
pass
class Admin:
def Approve_The_Planned_Mileage_Modification_Request_Submitted_By_The_Warehouseincharge(self):
pass
def Modify_The_Minimum_Fix_Mileage_Configuration_For_A_Job(self):
pass
def Modify_The_Unloading_Charge(self):
pass
def Update_The_Radius_Limit_From_A_Warehouse_For___Drop_Off___Charges(self):
pass
def Set_Up_The___Drop_Off___Rate_Table_Based_On_Number_Of_Outlets_Visited(self):
pass
def Modify_The___Drop_Off___Rate_Table(self):
pass
def Edit_The_Eligibility_Criteria_For_Driver_Incentive(self):
pass
def Edit_The_Per_Km_Rate_For_An_Existing_Vehicle_Capacity_Type(self):
pass
digraph "classes_carllodhpj" {
rankdir=BT
charset="utf-8"
"carllodhpj.Admin" [color="black", fontcolor="black", label="{Admin|\l|Approve_The_Planned_Mileage_Modification_Request_Submitted_By_The_Warehouseincharge()\lEdit_The_Eligibility_Criteria_For_Driver_Incentive()\lEdit_The_Per_Km_Rate_For_An_Existing_Vehicle_Capacity_Type()\lModify_The_Minimum_Fix_Mileage_Configuration_For_A_Job()\lModify_The_Unloading_Charge()\lModify_The___Drop_Off___Rate_Table()\lSet_Up_The___Drop_Off___Rate_Table_Based_On_Number_Of_Outlets_Visited()\lUpdate_The_Radius_Limit_From_A_Warehouse_For___Drop_Off___Charges()\l}", shape="record", style="solid"];
"carllodhpj.WarehouseIncharge" [color="black", fontcolor="black", label="{WarehouseIncharge|\l|Approve_A_Job()\lConfirm_The_Delivered_Items_To_A_Outlet()\lRequest_A_Modification_To_The_Planned_Mileage_Of_A_Job()\l}", shape="record", style="solid"];
"carllodhpj.WarehouseOperator" [color="black", fontcolor="black", label="{WarehouseOperator|\l|Allocate_A_Vehicle_For_A_Job()\lChange_The_System_Suggested_Optimized_Route_If_Required()\lChange_The_Vehicle_Allocated_For_A_Job()\lConfirm_A_Job()\lCreate_Orders_By_Uploading_A_Csv_File()\lExport_Information_Of_A_Job_To_Pdf_And_Xls_Format()\lGenerate_An_Idle_Time_Limit_Violation_Report()\lGenerate_An_Invoice_For_Each_Vehicle()\lGenerate_Cost_Per_1_Kg_Report()\lGenerate_Outlet_Wise_Transport_Cost_Report_For_A_Given_Date_Range()\lGenerate_Vehicle_Capacity_Utilization_Report()\lGenerate_Vehicle_Turnaround_Time_Report_For_A_Warehouse()\lIndicate_That_The_Loading_Is_Completed()\lMake_Adjustments_To_The_Order()\l}", shape="record", style="solid"];
}
digraph "classes_pifvanokwc" {
rankdir=BT
charset="utf-8"
"pifvanokwc.Admin" [color="black", fontcolor="black", label="{Admin|\l|Approve_The_Planned_Mileage_Modification_Request_Submitted_By_The_Warehouseincharge()\lEdit_The_Eligibility_Criteria_For_Driver_Incentive()\lEdit_The_Per_Km_Rate_For_An_Existing_Vehicle_Capacity_Type()\lModify_The_Minimum_Fix_Mileage_Configuration_For_A_Job()\lModify_The_Unloading_Charge()\lModify_The___Drop_Off___Rate_Table()\lSet_Up_The___Drop_Off___Rate_Table_Based_On_Number_Of_Outlets_Visited()\lUpdate_The_Radius_Limit_From_A_Warehouse_For___Drop_Off___Charges()\l}", shape="record", style="solid"];
"pifvanokwc.WarehouseIncharge" [color="black", fontcolor="black", label="{WarehouseIncharge|\l|Approve_A_Job()\lConfirm_The_Delivered_Items_To_A_Outlet()\lRequest_A_Modification_To_The_Planned_Mileage_Of_A_Job()\l}", shape="record", style="solid"];
"pifvanokwc.WarehouseOperator" [color="black", fontcolor="black", label="{WarehouseOperator|\l|Allocate_A_Vehicle_For_A_Job()\lChange_The_System_Suggested_Optimized_Route_If_Required()\lChange_The_Vehicle_Allocated_For_A_Job()\lConfirm_A_Job()\lCreate_Orders_By_Uploading_A_Csv_File()\lExport_Information_Of_A_Job_To_Pdf_And_Xls_Format()\lGenerate_An_Idle_Time_Limit_Violation_Report()\lGenerate_An_Invoice_For_Each_Vehicle()\lGenerate_Cost_Per_1_Kg_Report()\lGenerate_Outlet_Wise_Transport_Cost_Report_For_A_Given_Date_Range()\lGenerate_Vehicle_Capacity_Utilization_Report()\lGenerate_Vehicle_Turnaround_Time_Report_For_A_Warehouse()\lIndicate_That_The_Loading_Is_Completed()\lMake_Adjustments_To_The_Order()\l}", shape="record", style="solid"];
}
digraph "classes_pkifwsquqn" {
rankdir=BT
charset="utf-8"
"pkifwsquqn.Admin" [color="black", fontcolor="black", label="{Admin|\l|Approve_The_Planned_Mileage_Modification_Request_Submitted_By_The_Warehouseincharge()\lEdit_The_Eligibility_Criteria_For_Driver_Incentive()\lEdit_The_Per_Km_Rate_For_An_Existing_Vehicle_Capacity_Type()\lModify_The_Minimum_Fix_Mileage_Configuration_For_A_Job()\lModify_The_Unloading_Charge()\lModify_The___Drop_Off___Rate_Table()\lSet_Up_The___Drop_Off___Rate_Table_Based_On_Number_Of_Outlets_Visited()\lUpdate_The_Radius_Limit_From_A_Warehouse_For___Drop_Off___Charges()\l}", shape="record", style="solid"];
"pkifwsquqn.WarehouseIncharge" [color="black", fontcolor="black", label="{WarehouseIncharge|\l|Approve_A_Job()\lConfirm_The_Delivered_Items_To_A_Outlet()\lRequest_A_Modification_To_The_Planned_Mileage_Of_A_Job()\l}", shape="record", style="solid"];
"pkifwsquqn.WarehouseOperator" [color="black", fontcolor="black", label="{WarehouseOperator|\l|Allocate_A_Vehicle_For_A_Job()\lChange_The_System_Suggested_Optimized_Route_If_Required()\lChange_The_Vehicle_Allocated_For_A_Job()\lConfirm_A_Job()\lCreate_Orders_By_Uploading_A_Csv_File()\lExport_Information_Of_A_Job_To_Pdf_And_Xls_Format()\lGenerate_An_Idle_Time_Limit_Violation_Report()\lGenerate_An_Invoice_For_Each_Vehicle()\lGenerate_Cost_Per_1_Kg_Report()\lGenerate_Outlet_Wise_Transport_Cost_Report_For_A_Given_Date_Range()\lGenerate_Vehicle_Capacity_Utilization_Report()\lGenerate_Vehicle_Turnaround_Time_Report_For_A_Warehouse()\lIndicate_That_The_Loading_Is_Completed()\lMake_Adjustments_To_The_Order()\l}", shape="record", style="solid"];
}
digraph G {
rankdir=LR;
labelloc="b";
peripheries=0;
node [shape=plaintext]
subgraph WarehouseOperator {label="WarehouseOperator"; warehouseoperator};
warehouseoperator [image="D:\Nanduni.Bsc\research_code\2022-158\backend\backend/stick.png";peripheries=0;];
subgraph WarehouseIncharge {label="WarehouseIncharge"; warehouseincharge};
warehouseincharge [image="D:\Nanduni.Bsc\research_code\2022-158\backend\backend/stick.png";peripheries=0;];
subgraph Admin {label="Admin"; admin};
admin [image="D:\Nanduni.Bsc\research_code\2022-158\backend\backend/stick.png";peripheries=0;];
node [shape=ellipse, style=solid];
sign_up_to_the_system [label="Sign Up To The System"];
sign_in_to_the_system [label="Sign In To The System"];
create_orders_by_uploading_a_csv_file [label="Create Orders By Uploading A Csv File"];
make_adjustments_to_the_order [label="Make Adjustments To The Order"];
allocate_a_vehicle_for_a_job [label="Allocate A Vehicle For A Job"];
change_the_system_suggested_optimized_route_if_required [label="Change The System Suggested Optimized Route If Required"];
confirm_a_job [label="Confirm A Job"];
change_the_vehicle_allocated_for_a_job [label="Change The Vehicle Allocated For A Job"];
export_information_of_a_job_to_pdf_and_xls_format [label="Export Information Of A Job To Pdf And Xls Format"];
indicate_that_the_loading_is_completed [label="Indicate That The Loading Is Completed"];
confirm_the_delivered_items_to_a_outlet [label="Confirm The Delivered Items To A Outlet"];
approve_a_job [label="Approve A Job"];
request_a_modification_to_the_planned_mileage_of_a_job [label="Request A Modification To The Planned Mileage Of A Job"];
approve_the_planned_mileage_modification_request_submitted_by_the_warehouseincharge [label="Approve The Planned Mileage Modification Request Submitted By The Warehouseincharge"];
generate_an_invoice_for_each_vehicle [label="Generate An Invoice For Each Vehicle"];
modify_the_minimum_fix_mileage_configuration_for_a_job [label="Modify The Minimum Fix Mileage Configuration For A Job"];
modify_the_unloading_charge [label="Modify The Unloading Charge"];
update_the_radius_limit_from_a_warehouse_for___drop_off___charges [label="Update The Radius Limit From A Warehouse For Drop Off Charges"];
set_up_the___drop_off___rate_table_based_on_number_of_outlets_visited [label="Set Up The Drop Off Rate Table Based On Number Of Outlets Visited"];
modify_the___drop_off___rate_table [label="Modify The Drop Off Rate Table"];
edit_the_eligibility_criteria_for_driver_incentive [label="Edit The Eligibility Criteria For Driver Incentive"];
edit_the_per_km_rate_for_an_existing_vehicle_capacity_type [label="Edit The Per Km Rate For An Existing Vehicle Capacity Type"];
generate_vehicle_capacity_utilization_report [label="Generate Vehicle Capacity Utilization Report"];
generate_outlet_wise_transport_cost_report_for_a_given_date_range [label="Generate Outlet Wise Transport Cost Report For A Given Date Range"];
generate_vehicle_turnaround_time_report_for_a_warehouse [label="Generate Vehicle Turnaround Time Report For A Warehouse"];
generate_cost_per_1_kg_report [label="Generate Cost Per 1 Kg Report"];
generate_an_idle_time_limit_violation_report [label="Generate An Idle Time Limit Violation Report"];
edge [arrowhead="none"];
user->sign_up_to_the_system;
user->sign_in_to_the_system;
warehouseoperator->create_orders_by_uploading_a_csv_file;
warehouseoperator->make_adjustments_to_the_order;
warehouseoperator->allocate_a_vehicle_for_a_job;
warehouseoperator->change_the_system_suggested_optimized_route_if_required;
warehouseoperator->confirm_a_job;
warehouseoperator->change_the_vehicle_allocated_for_a_job;
warehouseoperator->export_information_of_a_job_to_pdf_and_xls_format;
warehouseoperator->indicate_that_the_loading_is_completed;
warehouseincharge->confirm_the_delivered_items_to_a_outlet;
warehouseincharge->approve_a_job;
warehouseincharge->request_a_modification_to_the_planned_mileage_of_a_job;
admin->approve_the_planned_mileage_modification_request_submitted_by_the_warehouseincharge;
warehouseoperator->generate_an_invoice_for_each_vehicle;
admin->modify_the_minimum_fix_mileage_configuration_for_a_job;
admin->modify_the_unloading_charge;
admin->update_the_radius_limit_from_a_warehouse_for___drop_off___charges;
admin->set_up_the___drop_off___rate_table_based_on_number_of_outlets_visited;
admin->modify_the___drop_off___rate_table;
admin->edit_the_eligibility_criteria_for_driver_incentive;
admin->edit_the_per_km_rate_for_an_existing_vehicle_capacity_type;
warehouseoperator->generate_vehicle_capacity_utilization_report;
warehouseoperator->generate_outlet_wise_transport_cost_report_for_a_given_date_range;
warehouseoperator->generate_vehicle_turnaround_time_report_for_a_warehouse;
warehouseoperator->generate_cost_per_1_kg_report;
warehouseoperator->generate_an_idle_time_limit_violation_report;
edge [arrowtail="vee", label="<<extend>>", style=dashed];
create_orders_by_uploading_a_csv_file->make_adjustments_to_the_order;
confirm_a_job->change_the_vehicle_allocated_for_a_job_change_the_system_suggested_optimized_route_if_required;
edge [arrowtail="vee", label="<<include>>", style=dashed];
confirm_a_job->allocate_a_vehicle_for_a_job;
approve_a_job->confirm_the_delivered_items_to_a_outlet;
request_a_modification_to_the_planned_mileage_of_a_job->approve_the_planned_mileage_modification_request_submitted_by_the_warehouseincharge;
}
\ No newline at end of file
digraph G {
rankdir=LR;
labelloc="b";
peripheries=0;
node [shape=plaintext]
subgraph WarehouseOperator {label="WarehouseOperator"; warehouseoperator};
warehouseoperator [image="D:\Nanduni.Bsc\research_code\2022-158\backend\backend/stick.png";peripheries=0;];
subgraph WarehouseIncharge {label="WarehouseIncharge"; warehouseincharge};
warehouseincharge [image="D:\Nanduni.Bsc\research_code\2022-158\backend\backend/stick.png";peripheries=0;];
subgraph Admin {label="Admin"; admin};
admin [image="D:\Nanduni.Bsc\research_code\2022-158\backend\backend/stick.png";peripheries=0;];
node [shape=ellipse, style=solid];
sign_up_to_the_system [label="Sign Up To The System"];
sign_in_to_the_system [label="Sign In To The System"];
create_orders_by_uploading_a_csv_file [label="Create Orders By Uploading A Csv File"];
make_adjustments_to_the_order [label="Make Adjustments To The Order"];
allocate_a_vehicle_for_a_job [label="Allocate A Vehicle For A Job"];
change_the_system_suggested_optimized_route_if_required [label="Change The System Suggested Optimized Route If Required"];
confirm_a_job [label="Confirm A Job"];
change_the_vehicle_allocated_for_a_job [label="Change The Vehicle Allocated For A Job"];
export_information_of_a_job_to_pdf_and_xls_format [label="Export Information Of A Job To Pdf And Xls Format"];
indicate_that_the_loading_is_completed [label="Indicate That The Loading Is Completed"];
confirm_the_delivered_items_to_a_outlet [label="Confirm The Delivered Items To A Outlet"];
approve_a_job [label="Approve A Job"];
request_a_modification_to_the_planned_mileage_of_a_job [label="Request A Modification To The Planned Mileage Of A Job"];
approve_the_planned_mileage_modification_request_submitted_by_the_warehouseincharge [label="Approve The Planned Mileage Modification Request Submitted By The Warehouseincharge"];
generate_an_invoice_for_each_vehicle [label="Generate An Invoice For Each Vehicle"];
modify_the_minimum_fix_mileage_configuration_for_a_job [label="Modify The Minimum Fix Mileage Configuration For A Job"];
modify_the_unloading_charge [label="Modify The Unloading Charge"];
update_the_radius_limit_from_a_warehouse_for___drop_off___charges [label="Update The Radius Limit From A Warehouse For Drop Off Charges"];
set_up_the___drop_off___rate_table_based_on_number_of_outlets_visited [label="Set Up The Drop Off Rate Table Based On Number Of Outlets Visited"];
modify_the___drop_off___rate_table [label="Modify The Drop Off Rate Table"];
edit_the_eligibility_criteria_for_driver_incentive [label="Edit The Eligibility Criteria For Driver Incentive"];
edit_the_per_km_rate_for_an_existing_vehicle_capacity_type [label="Edit The Per Km Rate For An Existing Vehicle Capacity Type"];
generate_vehicle_capacity_utilization_report [label="Generate Vehicle Capacity Utilization Report"];
generate_outlet_wise_transport_cost_report_for_a_given_date_range [label="Generate Outlet Wise Transport Cost Report For A Given Date Range"];
generate_vehicle_turnaround_time_report_for_a_warehouse [label="Generate Vehicle Turnaround Time Report For A Warehouse"];
generate_cost_per_1_kg_report [label="Generate Cost Per 1 Kg Report"];
generate_an_idle_time_limit_violation_report [label="Generate An Idle Time Limit Violation Report"];
edge [arrowhead="none"];
user->sign_up_to_the_system;
user->sign_in_to_the_system;
warehouseoperator->create_orders_by_uploading_a_csv_file;
warehouseoperator->make_adjustments_to_the_order;
warehouseoperator->allocate_a_vehicle_for_a_job;
warehouseoperator->change_the_system_suggested_optimized_route_if_required;
warehouseoperator->confirm_a_job;
warehouseoperator->change_the_vehicle_allocated_for_a_job;
warehouseoperator->export_information_of_a_job_to_pdf_and_xls_format;
warehouseoperator->indicate_that_the_loading_is_completed;
warehouseincharge->confirm_the_delivered_items_to_a_outlet;
warehouseincharge->approve_a_job;
warehouseincharge->request_a_modification_to_the_planned_mileage_of_a_job;
admin->approve_the_planned_mileage_modification_request_submitted_by_the_warehouseincharge;
warehouseoperator->generate_an_invoice_for_each_vehicle;
admin->modify_the_minimum_fix_mileage_configuration_for_a_job;
admin->modify_the_unloading_charge;
admin->update_the_radius_limit_from_a_warehouse_for___drop_off___charges;
admin->set_up_the___drop_off___rate_table_based_on_number_of_outlets_visited;
admin->modify_the___drop_off___rate_table;
admin->edit_the_eligibility_criteria_for_driver_incentive;
admin->edit_the_per_km_rate_for_an_existing_vehicle_capacity_type;
warehouseoperator->generate_vehicle_capacity_utilization_report;
warehouseoperator->generate_outlet_wise_transport_cost_report_for_a_given_date_range;
warehouseoperator->generate_vehicle_turnaround_time_report_for_a_warehouse;
warehouseoperator->generate_cost_per_1_kg_report;
warehouseoperator->generate_an_idle_time_limit_violation_report;
edge [arrowtail="vee", label="<<extend>>", style=dashed];
create_orders_by_uploading_a_csv_file->make_adjustments_to_the_order;
confirm_a_job->change_the_vehicle_allocated_for_a_job_change_the_system_suggested_optimized_route_if_required;
edge [arrowtail="vee", label="<<include>>", style=dashed];
confirm_a_job->allocate_a_vehicle_for_a_job;
approve_a_job->confirm_the_delivered_items_to_a_outlet;
request_a_modification_to_the_planned_mileage_of_a_job->approve_the_planned_mileage_modification_request_submitted_by_the_warehouseincharge;
}
\ No newline at end of file
digraph G {
rankdir=LR;
labelloc="b";
peripheries=0;
node [shape=plaintext]
subgraph WarehouseOperator {label="WarehouseOperator"; warehouseoperator};
warehouseoperator [image="D:\Nanduni.Bsc\research_code\2022-158\backend\backend/stick.png";peripheries=0;];
subgraph WarehouseIncharge {label="WarehouseIncharge"; warehouseincharge};
warehouseincharge [image="D:\Nanduni.Bsc\research_code\2022-158\backend\backend/stick.png";peripheries=0;];
subgraph Admin {label="Admin"; admin};
admin [image="D:\Nanduni.Bsc\research_code\2022-158\backend\backend/stick.png";peripheries=0;];
node [shape=ellipse, style=solid];
sign_up_to_the_system [label="Sign Up To The System"];
sign_in_to_the_system [label="Sign In To The System"];
create_orders_by_uploading_a_csv_file [label="Create Orders By Uploading A Csv File"];
make_adjustments_to_the_order [label="Make Adjustments To The Order"];
allocate_a_vehicle_for_a_job [label="Allocate A Vehicle For A Job"];
change_the_system_suggested_optimized_route_if_required [label="Change The System Suggested Optimized Route If Required"];
confirm_a_job [label="Confirm A Job"];
change_the_vehicle_allocated_for_a_job [label="Change The Vehicle Allocated For A Job"];
export_information_of_a_job_to_pdf_and_xls_format [label="Export Information Of A Job To Pdf And Xls Format"];
indicate_that_the_loading_is_completed [label="Indicate That The Loading Is Completed"];
confirm_the_delivered_items_to_a_outlet [label="Confirm The Delivered Items To A Outlet"];
approve_a_job [label="Approve A Job"];
request_a_modification_to_the_planned_mileage_of_a_job [label="Request A Modification To The Planned Mileage Of A Job"];
approve_the_planned_mileage_modification_request_submitted_by_the_warehouseincharge [label="Approve The Planned Mileage Modification Request Submitted By The Warehouseincharge"];
generate_an_invoice_for_each_vehicle [label="Generate An Invoice For Each Vehicle"];
modify_the_minimum_fix_mileage_configuration_for_a_job [label="Modify The Minimum Fix Mileage Configuration For A Job"];
modify_the_unloading_charge [label="Modify The Unloading Charge"];
update_the_radius_limit_from_a_warehouse_for___drop_off___charges [label="Update The Radius Limit From A Warehouse For Drop Off Charges"];
set_up_the___drop_off___rate_table_based_on_number_of_outlets_visited [label="Set Up The Drop Off Rate Table Based On Number Of Outlets Visited"];
modify_the___drop_off___rate_table [label="Modify The Drop Off Rate Table"];
edit_the_eligibility_criteria_for_driver_incentive [label="Edit The Eligibility Criteria For Driver Incentive"];
edit_the_per_km_rate_for_an_existing_vehicle_capacity_type [label="Edit The Per Km Rate For An Existing Vehicle Capacity Type"];
generate_vehicle_capacity_utilization_report [label="Generate Vehicle Capacity Utilization Report"];
generate_outlet_wise_transport_cost_report_for_a_given_date_range [label="Generate Outlet Wise Transport Cost Report For A Given Date Range"];
generate_vehicle_turnaround_time_report_for_a_warehouse [label="Generate Vehicle Turnaround Time Report For A Warehouse"];
generate_cost_per_1_kg_report [label="Generate Cost Per 1 Kg Report"];
generate_an_idle_time_limit_violation_report [label="Generate An Idle Time Limit Violation Report"];
edge [arrowhead="none"];
user->sign_up_to_the_system;
user->sign_in_to_the_system;
warehouseoperator->create_orders_by_uploading_a_csv_file;
warehouseoperator->make_adjustments_to_the_order;
warehouseoperator->allocate_a_vehicle_for_a_job;
warehouseoperator->change_the_system_suggested_optimized_route_if_required;
warehouseoperator->confirm_a_job;
warehouseoperator->change_the_vehicle_allocated_for_a_job;
warehouseoperator->export_information_of_a_job_to_pdf_and_xls_format;
warehouseoperator->indicate_that_the_loading_is_completed;
warehouseincharge->confirm_the_delivered_items_to_a_outlet;
warehouseincharge->approve_a_job;
warehouseincharge->request_a_modification_to_the_planned_mileage_of_a_job;
admin->approve_the_planned_mileage_modification_request_submitted_by_the_warehouseincharge;
warehouseoperator->generate_an_invoice_for_each_vehicle;
admin->modify_the_minimum_fix_mileage_configuration_for_a_job;
admin->modify_the_unloading_charge;
admin->update_the_radius_limit_from_a_warehouse_for___drop_off___charges;
admin->set_up_the___drop_off___rate_table_based_on_number_of_outlets_visited;
admin->modify_the___drop_off___rate_table;
admin->edit_the_eligibility_criteria_for_driver_incentive;
admin->edit_the_per_km_rate_for_an_existing_vehicle_capacity_type;
warehouseoperator->generate_vehicle_capacity_utilization_report;
warehouseoperator->generate_outlet_wise_transport_cost_report_for_a_given_date_range;
warehouseoperator->generate_vehicle_turnaround_time_report_for_a_warehouse;
warehouseoperator->generate_cost_per_1_kg_report;
warehouseoperator->generate_an_idle_time_limit_violation_report;
edge [arrowtail="vee", label="<<extend>>", style=dashed];
create_orders_by_uploading_a_csv_file->make_adjustments_to_the_order;
confirm_a_job->change_the_vehicle_allocated_for_a_job_change_the_system_suggested_optimized_route_if_required;
edge [arrowtail="vee", label="<<include>>", style=dashed];
confirm_a_job->allocate_a_vehicle_for_a_job;
approve_a_job->confirm_the_delivered_items_to_a_outlet;
request_a_modification_to_the_planned_mileage_of_a_job->approve_the_planned_mileage_modification_request_submitted_by_the_warehouseincharge;
}
\ No newline at end of file
...@@ -21,41 +21,48 @@ ts.pytesseract.tesseract_cmd = r'C:\Users\DELL\AppData\Local\Programs\Tesseract- ...@@ -21,41 +21,48 @@ ts.pytesseract.tesseract_cmd = r'C:\Users\DELL\AppData\Local\Programs\Tesseract-
def component_separation(filename, class_comp_id): def component_separation(filename, class_comp_id):
"""
detect class diagram component predictions from SSD model & direct the components to correct method
:param filename: name of the submitted image file
:param class_comp_id: ID of the submission
"""
mdl1_path = app.CLASS_SAVED_MODEL_PATH mdl1_path = app.CLASS_SAVED_MODEL_PATH
lbl1_path = app.CLASS_SAVED_LABEL_PATH lbl1_path = app.CLASS_SAVED_LABEL_PATH
img1_path = app.SUBMISSION_PATH_CLASS + '/' + filename img1_path = app.SUBMISSION_PATH_CLASS + '/' + filename
image_nparray = np.array(Image.open(img1_path)) image_nparray = np.array(Image.open(img1_path))
# print(img1_path)
boxes, accurate_indexes, category_index, class_id = class_object_detection(mdl1_path, boxes, accurate_indexes, category_index, class_id = class_object_detection(mdl1_path,
lbl1_path, lbl1_path,
image_nparray) image_nparray)
for index in range(0, len(accurate_indexes)): for index in range(0, len(accurate_indexes)):
# Convert the class id in their name # get the category name of the component
if len(accurate_indexes) > 1: if len(accurate_indexes) > 1:
category = category_index[class_id[index]]['name'] category = category_index[class_id[index]]['name']
elif len(accurate_indexes) == 1: elif len(accurate_indexes) == 1:
category = category_index[class_id]['name'] category = category_index[class_id]['name']
# print(category)
# select the component type and provide method to detect further details # select the component type and provide method to detect further details
if category == 'class': if category == 'class':
# print(filename, 'class')
class_details_detection(image_nparray, boxes, index, class_comp_id, category) class_details_detection(image_nparray, boxes, index, class_comp_id, category)
elif category == 'interface': elif category == 'interface':
# print(filename, 'interface')
class_details_detection(image_nparray, boxes, index, class_comp_id, category) class_details_detection(image_nparray, boxes, index, class_comp_id, category)
else: else:
# print(filename, 'relationship')
detect_class_relationship(image_nparray, boxes, index, class_comp_id, category) detect_class_relationship(image_nparray, boxes, index, class_comp_id, category)
# relationship_details_detection(image_nparray, boxes, index, class_comp_id, category) # relationship_details_detection(image_nparray, boxes, index, class_comp_id, category)
def class_object_detection(model_path, label_path, image_nparray): def class_object_detection(model_path, label_path, image_nparray):
"""
do predictions using trained models
:param model_path: path to the saved model
:param label_path: path to the label_map.pbtxt
:param image_nparray: numpy array for image
:return: prediction details
"""
detect_fn = tf.saved_model.load(model_path) detect_fn = tf.saved_model.load(model_path)
category_index = label_map_util.create_category_index_from_labelmap(label_path, use_display_name=True) category_index = label_map_util.create_category_index_from_labelmap(label_path, use_display_name=True)
image_np = image_nparray image_np = image_nparray
...@@ -80,10 +87,17 @@ def class_object_detection(model_path, label_path, image_nparray): ...@@ -80,10 +87,17 @@ def class_object_detection(model_path, label_path, image_nparray):
def class_details_detection(image_nparray, boxes, index, class_comp_id, class_type): def class_details_detection(image_nparray, boxes, index, class_comp_id, class_type):
"""
detect class or interface details(name, methods & attributes) and save them in the database
:param image_nparray: numpy array for cropped classes or interfaces
:param boxes: coordinates of detected components
:param index: index of the loop in component_separation method
:param class_comp_id: ID of the submission
:param class_type: whether the component a class or interface
"""
methods_attributes = [] methods_attributes = []
_image, cl_ymin, cl_xmin, cl_ymax, cl_xmax = crop_image_(image_nparray, boxes, index) _image, cl_ymin, cl_xmin, cl_ymax, cl_xmax = crop_image_(image_nparray, boxes, index)
# cv2.imwrite('image_1.jpg', _image)
mdl2_path = app.CLASS_COMP_SAVED_MODEL_PATH mdl2_path = app.CLASS_COMP_SAVED_MODEL_PATH
lbl2_path = app.CLASS_COMP_SAVED_LABEL_PATH lbl2_path = app.CLASS_COMP_SAVED_LABEL_PATH
...@@ -96,52 +110,51 @@ def class_details_detection(image_nparray, boxes, index, class_comp_id, class_ty ...@@ -96,52 +110,51 @@ def class_details_detection(image_nparray, boxes, index, class_comp_id, class_ty
else: else:
category = category_index[class_id]['name'] category = category_index[class_id]['name']
# print(category)
if category == 'class_attributes': if category == 'class_attributes':
# print(category, 'line 96 - inside attributes')
class_attributes, y_min, x_min, y_max, x_max = crop_image_(_image, boxes_class, j) class_attributes, y_min, x_min, y_max, x_max = crop_image_(_image, boxes_class, j)
class_attributes = cv2.resize(class_attributes, None, fx=2, fy=2) class_attributes = cv2.resize(class_attributes, None, fx=2, fy=2)
# cv2.imwrite('image.jpg', class_attributes)
text = text_extraction(class_attributes) text = text_extraction(class_attributes)
attr = save_attributes_methods(text, 'attribute') attr = save_attributes_methods(text, 'attribute')
methods_attributes.append(attr) methods_attributes.append(attr)
elif category == 'class_methods': elif category == 'class_methods':
# print(category, 'line 103 - inside methods')
class_methods, y_min, x_min, y_max, x_max = crop_image_(_image, boxes_class, j) class_methods, y_min, x_min, y_max, x_max = crop_image_(_image, boxes_class, j)
class_methods = cv2.resize(class_methods, None, fx=2, fy=2) class_methods = cv2.resize(class_methods, None, fx=2, fy=2)
text = text_extraction(class_methods) text = text_extraction(class_methods)
methods = save_attributes_methods(text, 'method') methods = save_attributes_methods(text, 'method')
methods_attributes.append(methods) methods_attributes.append(methods)
# print(text, '111 line')
comp_name = class_name_detection(_image, boxes_class, category_index, accurate_indexes, class_id) comp_name = class_name_detection(_image, boxes_class, category_index, accurate_indexes, class_id)
# print(comp_name, 'comp_name line 118')
comp = save_class_interface(class_type, comp_name, cl_ymin, cl_xmin, cl_ymax, cl_xmax, class_comp_id) comp = save_class_interface(class_type, comp_name, cl_ymin, cl_xmin, cl_ymax, cl_xmax, class_comp_id)
# print(comp, 'component_id line 120')
alter_attributes_methods(methods_attributes, comp.id) alter_attributes_methods(methods_attributes, comp.id)
# crop image using boxes & index
def crop_image_(image, boxes, index): def crop_image_(image, boxes, index):
"""
crop image according to the given coordinates
:param image: numpy array for image
:param boxes: detection coordinates of predictions
:param index: index of the loop in component_separation method
:return: cropped image as numpy array
"""
height, width, c = image.shape height, width, c = image.shape
# crop box format: xmin, ymin, xmax, ymax
ymin = boxes[index][0] * height ymin = boxes[index][0] * height
xmin = boxes[index][1] * width xmin = boxes[index][1] * width
ymax = boxes[index][2] * height ymax = boxes[index][2] * height
xmax = boxes[index][3] * width xmax = boxes[index][3] * width
cropped_image = image[int(ymin):int(ymax), int(xmin):int(xmax)] cropped_image = image[int(ymin):int(ymax), int(xmin):int(xmax)]
# image = cv2.cvtColor(cropped_image, cv2.COLOR_BGR2GRAY)
# image = cv2.resize(image, (800, 500))
# returns cropped image , ymin,xmin,ymax & xmax
return cropped_image, ymin, xmin, ymax, xmax return cropped_image, ymin, xmin, ymax, xmax
# extract text from provided image
def text_extraction(image): def text_extraction(image):
"""
extract text of image component
:param image: numpy array of image
:return: extracted text as a list
"""
config = '-l eng --oem 1 --psm 4' config = '-l eng --oem 1 --psm 4'
text = ts.image_to_string(image, config=config) text = ts.image_to_string(image, config=config)
text = text.splitlines() text = text.splitlines()
...@@ -150,12 +163,15 @@ def text_extraction(image): ...@@ -150,12 +163,15 @@ def text_extraction(image):
return text return text
# save attributes and methods in database
def save_attributes_methods(text, typ): def save_attributes_methods(text, typ):
"""
detect attribute or method component and save them inside database
:param text: list of text
:param typ: type of object(attribute or method)
:return: all saved attributes and methods
"""
saved_data = [] saved_data = []
nlp = spacy.load('en_core_web_sm')
for element in text: for element in text:
# print(element, 'line 145')
# removable = str.maketrans('', '', '()') # removable = str.maketrans('', '', '()')
nlp_ner = spacy.load('ner_models/model-best') nlp_ner = spacy.load('ner_models/model-best')
nlp_output = nlp_ner(element) nlp_output = nlp_ner(element)
...@@ -185,13 +201,11 @@ def save_attributes_methods(text, typ): ...@@ -185,13 +201,11 @@ def save_attributes_methods(text, typ):
method.return_type = token.text method.return_type = token.text
if typ == 'attribute': if typ == 'attribute':
# print(attr, 'line 175 - attr')
db.session.add(attr) db.session.add(attr)
db.session.commit() db.session.commit()
saved_data.append(attr) saved_data.append(attr)
else: else:
# print(method, 'line 181 method')
db.session.add(method) db.session.add(method)
db.session.commit() db.session.commit()
saved_data.append(method) saved_data.append(method)
...@@ -199,18 +213,24 @@ def save_attributes_methods(text, typ): ...@@ -199,18 +213,24 @@ def save_attributes_methods(text, typ):
return saved_data return saved_data
# update attributes and methods with relevant class id
def alter_attributes_methods(element_list, component_id): def alter_attributes_methods(element_list, component_id):
"""
Update saved method and attributes with class component ID
:param element_list: attributes and method as a list
:param component_id: class ID
"""
for j in element_list: for j in element_list:
for element in j: for element in j:
# print(component_id)
# print(element_list)
element.class_id = component_id element.class_id = component_id
db.session.commit() db.session.commit()
# convert symbol access specifier to string
def covert_to_access_specifier(access): def covert_to_access_specifier(access):
"""
convert access specifier symbols to strings
:param access: access specifier symbol
:return: access specifier string
"""
if access == "-": if access == "-":
return "Private" return "Private"
...@@ -228,20 +248,23 @@ def covert_to_access_specifier(access): ...@@ -228,20 +248,23 @@ def covert_to_access_specifier(access):
def class_name_detection(image, boxes, category_index, accurate_indexes, class_id): def class_name_detection(image, boxes, category_index, accurate_indexes, class_id):
# print(category_index, 'category_index') """
detect & return class or interface name
# print(class_id, 'class_id') :param image: class or interface component image
:param boxes: predicted coordinates of methods and attributes
:param category_index: category index of each component
:param accurate_indexes:
:param class_id:
:return: name of the class or interface
"""
height, width, c = image.shape height, width, c = image.shape
for i in range(0, len(accurate_indexes)): for i in range(0, len(accurate_indexes)):
if len(accurate_indexes) > 1: if len(accurate_indexes) > 1:
category = category_index[class_id[i]]['name'] category = category_index[class_id[i]]['name']
# print(category, '225 line')
else: else:
category = category_index[class_id]['name'] category = category_index[class_id]['name']
# print(category, '225 line')
if category != 'interface_name' or category != 'class_name': if category != 'interface_name' or category != 'class_name':
ymin = boxes[i][0] * height ymin = boxes[i][0] * height
...@@ -250,12 +273,9 @@ def class_name_detection(image, boxes, category_index, accurate_indexes, class_i ...@@ -250,12 +273,9 @@ def class_name_detection(image, boxes, category_index, accurate_indexes, class_i
xmax = boxes[i][3] * width xmax = boxes[i][3] * width
cv2.rectangle(image, (int(xmin), int(ymin)), (int(xmax), int(ymax)), (255, 255, 255), -1) cv2.rectangle(image, (int(xmin), int(ymin)), (int(xmax), int(ymax)), (255, 255, 255), -1)
# cv2.imwrite('image_2.jpg', image)
class_name = text_extraction(image) class_name = text_extraction(image)
# print(class_name, 'line 249 class name')
if ''.join(class_name) is not None: if ''.join(class_name) is not None:
# print(class_name, 'line 251 class name')
if "interface" in ''.join(class_name): if "interface" in ''.join(class_name):
name = ''.join(class_name).replace("<<interface>>", "") name = ''.join(class_name).replace("<<interface>>", "")
else: else:
...@@ -265,10 +285,20 @@ def class_name_detection(image, boxes, category_index, accurate_indexes, class_i ...@@ -265,10 +285,20 @@ def class_name_detection(image, boxes, category_index, accurate_indexes, class_i
def save_class_interface(class_type, comp_name, cl_ymin, cl_xmin, cl_ymax, cl_xmax, class_comp_id): def save_class_interface(class_type, comp_name, cl_ymin, cl_xmin, cl_ymax, cl_xmax, class_comp_id):
"""
save class component and interface components in database
:param class_type: type of component (interface or class)
:param comp_name: name of interface or class
:param cl_ymin:
:param cl_xmin:
:param cl_ymax:
:param cl_xmax:
:param class_comp_id: submission ID of diagram
:return: database saved object
"""
comp = Component(class_answer=class_comp_id, name=comp_name, type=class_type, x_min=cl_xmin, y_min=cl_ymin, comp = Component(class_answer=class_comp_id, name=comp_name, type=class_type, x_min=cl_xmin, y_min=cl_ymin,
x_max=cl_xmax, x_max=cl_xmax,
y_max=cl_ymax) y_max=cl_ymax)
db.session.add(comp) db.session.add(comp)
db.session.commit() db.session.commit()
# print(comp, 'line 261 comp')
return comp return comp
...@@ -15,15 +15,9 @@ from models.class_relationship_muplicity import Multiplicity ...@@ -15,15 +15,9 @@ from models.class_relationship_muplicity import Multiplicity
def detect_class_relationship(image_nparray, boxes, index, class_comp_id, category): def detect_class_relationship(image_nparray, boxes, index, class_comp_id, category):
# image = cv2.imread(app.SUBMISSION_PATH + '/' + filename)
height, width, c = image_nparray.shape height, width, c = image_nparray.shape
class_objects = Component.query.filter_by(class_answer=class_comp_id).all() class_objects = Component.query.filter_by(class_answer=class_comp_id).all()
# for i in range(0, len(accurate_indexes))
# if category_index[class_id[i]]['name'] != 'class' and category_index[class_id[i]]['name'] != 'interface':
# category_name = category_index[class_id[i]]['name']
ymin = boxes[index][0] * height ymin = boxes[index][0] * height
xmin = boxes[index][1] * width xmin = boxes[index][1] * width
ymax = boxes[index][2] * height ymax = boxes[index][2] * height
...@@ -244,20 +238,13 @@ def relationship_details_detection(image_nparray, boxes, index, class_comp_id, c ...@@ -244,20 +238,13 @@ def relationship_details_detection(image_nparray, boxes, index, class_comp_id, c
if result is not None: if result is not None:
relationship_text(_image, result, relationship) relationship_text(_image, result, relationship)
# print(relationship, 'relationship')
def relationship_text(_image, result, relationship): def relationship_text(_image, result, relationship):
# boxes = [res[0] for res in result]
# texts = [res[1][0] for res in result]
# scores = [res[1][1] for res in result]
for element in result: for element in result:
text = element[1][0] text = element[1][0]
box = element[0] box = element[0]
nlp_ner = spacy.load('ner_models/model-best') nlp_ner = spacy.load('ner_models/model-best')
nlp_output = nlp_ner(text) nlp_output = nlp_ner(text)
# print(text, 'line 290')
# box = np.array(box,dtype=float)
box = np.array(box).astype(np.int32) box = np.array(box).astype(np.int32)
xmin = min(box[:, 0]) xmin = min(box[:, 0])
...@@ -265,8 +252,6 @@ def relationship_text(_image, result, relationship): ...@@ -265,8 +252,6 @@ def relationship_text(_image, result, relationship):
xmax = max(box[:, 0]) xmax = max(box[:, 0])
ymax = max(box[:, 1]) ymax = max(box[:, 1])
for token in nlp_output.ents: for token in nlp_output.ents:
# print(token.text, 'line 301')
# print(token.label_, 'line 302')
if token.label_ == 'MULTIPLICITY' or contains_number(text): if token.label_ == 'MULTIPLICITY' or contains_number(text):
multiplicity = Multiplicity(value=token.text, relationship_id=relationship.id, x_min=xmin, multiplicity = Multiplicity(value=token.text, relationship_id=relationship.id, x_min=xmin,
...@@ -287,14 +272,12 @@ def contains_number(string): ...@@ -287,14 +272,12 @@ def contains_number(string):
# crop image using boxes & index # crop image using boxes & index
def crop_image_(image, boxes, index): def crop_image_(image, boxes, index):
height, width, c = image.shape height, width, c = image.shape
# crop box format: xmin, ymin, xmax, ymax
ymin = boxes[index][0] * height ymin = boxes[index][0] * height
xmin = boxes[index][1] * width xmin = boxes[index][1] * width
ymax = boxes[index][2] * height ymax = boxes[index][2] * height
xmax = boxes[index][3] * width xmax = boxes[index][3] * width
cropped_image = image[int(ymin):int(ymax), int(xmin):int(xmax)] cropped_image = image[int(ymin):int(ymax), int(xmin):int(xmax)]
# image = cv2.cvtColor(cropped_image, cv2.COLOR_BGR2GRAY)
# image = cv2.resize(image, (800, 500))
# returns cropped image , ymin,xmin,ymax & xmax # returns cropped image , ymin,xmin,ymax & xmax
return cropped_image, ymin, xmin, ymax, xmax return cropped_image, ymin, xmin, ymax, xmax
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment