From fa8643b37616a0090c5b293a91c6c3ba88409db6 Mon Sep 17 00:00:00 2001 From: mistangl Date: Fri, 19 Sep 2025 17:24:03 +0200 Subject: [PATCH] =?UTF-8?q?erste=20Fassung=20einer=20Teststation=20impleme?= =?UTF-8?q?ntiert.=20Referenzfiles=20m=C3=BCssen=20noch=20=C3=BCberpr?= =?UTF-8?q?=C3=BCft=20werden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/run_tests.bat | 29 + lib/run_tests.py | 384 +++++++++++ testdata/Erdungsbsp.json | 75 +++ testdata/Erdungsbsp_positionsdraw.json | 75 +++ testdata/Erdungsbsp_todraw.json | 193 ++++++ testdata/easy.json | 340 ++++++++++ testdata/easy_hdiff_nb.json | 292 +++++++++ testdata/easy_hdiff_nb_positionsdraw.json | 292 +++++++++ testdata/easy_hdiff_nb_todraw.json | 605 +++++++++++++++++ testdata/easy_hoehe.json | 340 ++++++++++ testdata/easy_hoehe_positionsdraw.json | 340 ++++++++++ testdata/easy_hoehe_todraw.json | 605 +++++++++++++++++ testdata/easy_positionsconv.json | 340 ++++++++++ testdata/easy_positionsdraw.json | 340 ++++++++++ testdata/easy_sps.json | 619 ++++++++++++++++++ testdata/easy_sps_positionsdraw.json | 619 ++++++++++++++++++ testdata/easy_sps_todraw.json | 750 ++++++++++++++++++++++ testdata/easy_todraw.json | 605 +++++++++++++++++ testdata/easy_tunnelerror1.json | 358 +++++++++++ testdata/easyn.json | 300 +++++++++ testdata/easyn_positionsdraw.json | 300 +++++++++ testdata/easyn_todraw.json | 496 ++++++++++++++ 22 files changed, 8297 insertions(+) create mode 100644 bin/run_tests.bat create mode 100644 lib/run_tests.py create mode 100644 testdata/Erdungsbsp.json create mode 100644 testdata/Erdungsbsp_positionsdraw.json create mode 100644 testdata/Erdungsbsp_todraw.json create mode 100644 testdata/easy.json create mode 100644 testdata/easy_hdiff_nb.json create mode 100644 testdata/easy_hdiff_nb_positionsdraw.json create mode 100644 testdata/easy_hdiff_nb_todraw.json create mode 100644 testdata/easy_hoehe.json create mode 100644 testdata/easy_hoehe_positionsdraw.json create mode 100644 testdata/easy_hoehe_todraw.json create mode 100644 testdata/easy_positionsconv.json create mode 100644 testdata/easy_positionsdraw.json create mode 100644 testdata/easy_sps.json create mode 100644 testdata/easy_sps_positionsdraw.json create mode 100644 testdata/easy_sps_todraw.json create mode 100644 testdata/easy_todraw.json create mode 100644 testdata/easy_tunnelerror1.json create mode 100644 testdata/easyn.json create mode 100644 testdata/easyn_positionsdraw.json create mode 100644 testdata/easyn_todraw.json diff --git a/bin/run_tests.bat b/bin/run_tests.bat new file mode 100644 index 0000000..7fcb407 --- /dev/null +++ b/bin/run_tests.bat @@ -0,0 +1,29 @@ +@echo off +REM Test runner batch script for kabellaengen project +REM Calls run_tests.py to execute all tests + +call %~dp0setenv.bat + +CALL manage_interpreter.bat activate_interpreter +if %ERRORLEVEL% NEQ 0 ( + echo. + echo Failed to activate the Python interpreter! + pause + exit /B 1 +) + +python %PROJECT_LIB%\run_tests.py %* + +if %ERRORLEVEL% NEQ 0 ( + echo. + echo Tests failed! + CALL manage_interpreter.bat deactivate_interpreter + pause + exit /B 1 +) else ( + echo. + echo All tests passed! + CALL manage_interpreter.bat deactivate_interpreter + pause + exit /B 0 +) \ No newline at end of file diff --git a/lib/run_tests.py b/lib/run_tests.py new file mode 100644 index 0000000..1b4baa5 --- /dev/null +++ b/lib/run_tests.py @@ -0,0 +1,384 @@ +#!/usr/bin/env python3 +""" +Test runner for kabellaengen project +Executes getexdraw.bat for all DXF files in testdata directory and compares outputs +""" + +import os +import sys +import json +import subprocess +import glob +from pathlib import Path +import difflib +import argparse + + +class TestResult: + def __init__(self, test_name): + self.test_name = test_name + self.passed = False + self.error_msg = "" + self.differences = [] + + +class TestRunner: + def __init__(self, create_references=False, mode='getexdraw', clean=False, target_file=None): + # Use environment variables set by setenv.bat + self.project_root = Path(os.environ['PROJECT']) + self.testdata_dir = Path(os.environ.get('PROJECT_TEST', self.project_root / "testdata")) + self.work_dir = Path(os.environ.get('PROJECT_WORK', self.project_root / "work")) + self.bin_dir = Path(os.environ.get('PROJECT_BIN', self.project_root / "bin")) + self.getexdraw_bat = self.bin_dir / "getexdraw.bat" + self.ioconverter_bat = self.bin_dir / "ioconverter.bat" + + self.test_results = [] + self.failed_tests = [] + self.create_references = create_references + self.mode = mode + self.clean = clean + self.target_file = target_file + + def find_test_files(self): + """Find DXF files in testdata directory - all files or specific file""" + if self.target_file: + # Check if specific file exists + target_dxf = self.testdata_dir / f"{self.target_file}.dxf" + if target_dxf.exists(): + return [self.target_file] + else: + print(f"Error: Test file {target_dxf} not found") + return [] + else: + # Return all DXF files + dxf_files = list(self.testdata_dir.glob("*.dxf")) + return [f.stem for f in dxf_files] # Return filenames without extension + + def run_getexdraw(self, test_filename): + """Execute getexdraw.bat for given test file""" + dxf_file = self.testdata_dir / f"{test_filename}.dxf" + if not dxf_file.exists(): + return False, f"Test file {dxf_file} not found" + + try: + # Change to bin directory for execution (where batch scripts expect to run from) + os.chdir(self.bin_dir) + + # Execute getexdraw.bat with automated input to handle pause + cmd = [str(self.getexdraw_bat), str(dxf_file)] + # Send newline to handle the pause command + result = subprocess.run(cmd, capture_output=True, text=True, shell=True, input="\n") + + # Check if the expected output files were created instead of relying on return code + # The batch script always exits with code 1 due to interactive design, but files are created + expected_positions_file = self.work_dir / test_filename / f"{test_filename}_positionsdraw.json" + expected_todraw_file = self.work_dir / test_filename / f"{test_filename}_todraw.json" + expected_errors_file = self.work_dir / test_filename / f"{test_filename}_errors.json" + + # Success case: both normal files exist + if expected_positions_file.exists() and expected_todraw_file.exists(): + return True, "Success" + # Error case: positions file missing but errors file exists + elif not expected_positions_file.exists() and expected_errors_file.exists(): + return True, "Success (with errors)" + else: + missing_files = [] + if not expected_positions_file.exists() and not expected_errors_file.exists(): + missing_files.append(f"{test_filename}_positionsdraw.json or {test_filename}_errors.json") + if not expected_todraw_file.exists(): + missing_files.append(str(expected_todraw_file)) + return False, f"getexdraw.bat failed - expected output files not found: {', '.join(missing_files)}\nSTDOUT: {result.stdout}\nSTDERR: {result.stderr}" + + except Exception as e: + return False, f"Exception during execution: {str(e)}" + + def run_ioconverter(self, test_filename): + """Execute ioconverter.bat for given test file""" + dxf_file = self.testdata_dir / f"{test_filename}.dxf" + if not dxf_file.exists(): + return False, f"Test file {dxf_file} not found" + + try: + # Change to bin directory for execution (where batch scripts expect to run from) + os.chdir(self.bin_dir) + + # Execute ioconverter.bat with automated input to handle pause + cmd = [str(self.ioconverter_bat), str(dxf_file)] + # Send newline to handle the pause command + result = subprocess.run(cmd, capture_output=True, text=True, shell=True, input="\n") + + # Check if the expected output files were created + expected_positions_file = self.work_dir / test_filename / f"{test_filename}_positionsconv.json" + expected_errors_file = self.work_dir / test_filename / f"{test_filename}_errors.json" + + # Success case: positions file exists + if expected_positions_file.exists(): + return True, "Success" + # Error case: positions file missing but errors file exists + elif expected_errors_file.exists(): + return True, "Success (with errors)" + else: + return False, f"ioconverter.bat failed - expected output file not found: {expected_positions_file} or {expected_errors_file}\nSTDOUT: {result.stdout}\nSTDERR: {result.stderr}" + + except Exception as e: + return False, f"Exception during execution: {str(e)}" + + def cleanup_test_files(self, test_filename): + """Remove the work folder for the given test""" + if not self.clean: + return + + test_work_dir = self.work_dir / test_filename + if test_work_dir.exists(): + try: + import shutil + shutil.rmtree(test_work_dir) + print(f" [cleaned up {test_work_dir}]") + except Exception as e: + print(f" [cleanup failed: {e}]") + + def compare_json_files(self, test_filename): + """Compare generated JSON files with reference JSON files""" + all_diffs = [] + + # Check what files actually exist and determine comparison strategy based on mode + errors_file = self.work_dir / test_filename / f"{test_filename}_errors.json" + + if self.mode == 'ioconverter': + # For ioconverter mode: check for _positionsconv.json + positions_file = self.work_dir / test_filename / f"{test_filename}_positionsconv.json" + + # Determine which files to compare based on what exists + if positions_file.exists(): + # Normal case: compare _positionsconv only + file_suffixes = ['_positionsconv'] + elif errors_file.exists(): + # Error case: compare _errors only + file_suffixes = ['_errors'] + else: + return False, f"No generated files found for {test_filename}", [] + else: + # For getexdraw mode: check for _positionsdraw.json and _todraw.json + positions_file = self.work_dir / test_filename / f"{test_filename}_positionsdraw.json" + todraw_file = self.work_dir / test_filename / f"{test_filename}_todraw.json" + + # Determine which files to compare based on what exists + if positions_file.exists(): + # Normal case: compare _positionsdraw and _todraw + file_suffixes = ['_positionsdraw', '_todraw'] + elif errors_file.exists(): + # Error case: compare _errors only (no _todraw expected when errors occur) + file_suffixes = ['_errors'] + else: + return False, f"No generated files found for {test_filename}", [] + + for suffix in file_suffixes: + # Generated file should be in work//.json + generated_file = self.work_dir / test_filename / f"{test_filename}{suffix}.json" + + # Reference file should be in testdata/.json + reference_file = self.testdata_dir / f"{test_filename}{suffix}.json" + + if not generated_file.exists(): + return False, f"Generated file {generated_file} not found", [] + + if not reference_file.exists(): + if self.create_references: + # Copy generated file as reference + import shutil + shutil.copy2(generated_file, reference_file) + print(f"\nCreated reference file: {reference_file}") + continue + else: + return False, f"Reference file {reference_file} not found", [] + + try: + # Load and compare JSON files + with open(generated_file, 'r', encoding='utf-8') as f: + generated_data = json.load(f) + + with open(reference_file, 'r', encoding='utf-8') as f: + reference_data = json.load(f) + + if generated_data != reference_data: + # Generate diff for debugging + generated_str = json.dumps(generated_data, indent=2, sort_keys=True) + reference_str = json.dumps(reference_data, indent=2, sort_keys=True) + + diff = list(difflib.unified_diff( + reference_str.splitlines(keepends=True), + generated_str.splitlines(keepends=True), + fromfile=str(reference_file), + tofile=str(generated_file), + n=3 + )) + + all_diffs.extend([f"\n=== Differences in {suffix}.json ==="]) + all_diffs.extend(diff) + + except json.JSONDecodeError as e: + return False, f"JSON decode error in {suffix}.json: {str(e)}", [] + except Exception as e: + return False, f"Exception during comparison of {suffix}.json: {str(e)}", [] + + if all_diffs: + return False, "Files differ", all_diffs + else: + return True, "All files match", [] + + def run_single_test(self, test_filename): + """Run a single test case""" + print(f"Running test: {test_filename} ... ", end="") + + result = TestResult(test_filename) + + # Step 1: Run the appropriate batch script based on mode + if self.mode == 'ioconverter': + success, msg = self.run_ioconverter(test_filename) + else: + success, msg = self.run_getexdraw(test_filename) + + if not success: + result.error_msg = f"Execution failed: {msg}" + print("FAIL", end="") + self.cleanup_test_files(test_filename) + if not self.clean: + print() + return result + + # Step 2: Compare JSON files + success, msg, diff = self.compare_json_files(test_filename) + if not success: + result.error_msg = f"Comparison failed: {msg}" + result.differences = diff + print("FAIL", end="") + self.cleanup_test_files(test_filename) + if not self.clean: + print() + return result + + result.passed = True + print("OK", end="") + + # Step 3: Cleanup if requested + self.cleanup_test_files(test_filename) + + if not self.clean: + print() # Add newline if no cleanup message was printed + + return result + + def run_all_tests(self): + """Run all tests and collect results""" + test_files = self.find_test_files() + + if not test_files: + if self.target_file: + print(f"Test file {self.target_file}.dxf not found in testdata directory") + else: + print("No test files found in testdata directory") + return + + if self.target_file: + print(f"Running test for file: {self.target_file}") + else: + print(f"Found {len(test_files)} test files") + print("=" * 70) + + for test_file in test_files: + result = self.run_single_test(test_file) + self.test_results.append(result) + + if not result.passed: + self.failed_tests.append(test_file) + + print("=" * 70) + self.print_summary() + + def print_summary(self): + """Print test summary similar to unittest""" + total_tests = len(self.test_results) + passed_tests = sum(1 for r in self.test_results if r.passed) + failed_tests = total_tests - passed_tests + + print(f"\nRan {total_tests} tests in {self.testdata_dir}") + print() + + if failed_tests > 0: + print("FAILURES:") + print("=" * 70) + + for result in self.test_results: + if not result.passed: + print(f"FAIL: {result.test_name}") + print("-" * 70) + print(result.error_msg) + + if result.differences: + print("\nDifferences:") + for line in result.differences[:50]: # Limit diff output + print(line.rstrip()) + if len(result.differences) > 50: + print(f"... ({len(result.differences) - 50} more lines)") + print() + + print("=" * 70) + print(f"FAILED (failures={failed_tests})") + + print(f"\nFailed test files: {', '.join(self.failed_tests)}") + else: + print("OK") + + return failed_tests == 0 + + +def main(): + """Main entry point""" + parser = argparse.ArgumentParser( + description="Runs batch scripts for all DXF files in testdata and compares results" + ) + parser.add_argument( + '--create-references', + action='store_true', + help='Create reference JSON files from current outputs' + ) + parser.add_argument( + '--clean', + action='store_true', + help='Remove work/filename folders after each test run' + ) + parser.add_argument( + '--file', + type=str, + help='Run test for specific filename (without .dxf extension)' + ) + + # Mode selection (mutually exclusive) + mode_group = parser.add_mutually_exclusive_group() + mode_group.add_argument( + '--getexdraw', + action='store_true', + help='Run getexdraw.bat tests (default)' + ) + mode_group.add_argument( + '--ioconverter', + action='store_true', + help='Run ioconverter.bat tests' + ) + + args = parser.parse_args() + + # Determine mode - default to getexdraw if neither is specified + if args.ioconverter: + mode = 'ioconverter' + else: + mode = 'getexdraw' + + runner = TestRunner(create_references=args.create_references, mode=mode, clean=args.clean, target_file=args.file) + success = runner.run_all_tests() + + return 0 if success else 1 + + +if __name__ == "__main__": + sys.exit(main()) \ No newline at end of file diff --git a/testdata/Erdungsbsp.json b/testdata/Erdungsbsp.json new file mode 100644 index 0000000..725a064 --- /dev/null +++ b/testdata/Erdungsbsp.json @@ -0,0 +1,75 @@ +{ + "sensors": { + "POT-RA-3036": { + "REALE_POSITION": "x", + "NAME": "POT-RA-3036", + "KENNZEICHNUNG": "AH01+UC0101-x", + "pos": [ + 22624.4, + 13807.7 + ] + }, + "POT-RA-3122": { + "REALE_POSITION": "x", + "NAME": "POT-RA-3122", + "KENNZEICHNUNG": "AH01-UC0102-x", + "pos": [ + 19150.5, + 14361.8 + ] + } + }, + "schaltschrank_elemente": {}, + "mappings": { + "UC0101": [ + "POT-RA-3036" + ], + "UC0102": [ + "POT-RA-3122" + ] + }, + "distributors": { + "UC0101": [ + 20963.1, + 8705.7 + ], + "UC0102": [ + 19581.2, + 5559.7 + ] + }, + "tunnels": {}, + "racks": { + "Rack_1": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_2": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ] + }, + "not_found": { + "missing_distributors": [], + "missing_sensors": [], + "missing_tunnel": [], + "missing_attributes": {} + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/Erdungsbsp_positionsdraw.json b/testdata/Erdungsbsp_positionsdraw.json new file mode 100644 index 0000000..725a064 --- /dev/null +++ b/testdata/Erdungsbsp_positionsdraw.json @@ -0,0 +1,75 @@ +{ + "sensors": { + "POT-RA-3036": { + "REALE_POSITION": "x", + "NAME": "POT-RA-3036", + "KENNZEICHNUNG": "AH01+UC0101-x", + "pos": [ + 22624.4, + 13807.7 + ] + }, + "POT-RA-3122": { + "REALE_POSITION": "x", + "NAME": "POT-RA-3122", + "KENNZEICHNUNG": "AH01-UC0102-x", + "pos": [ + 19150.5, + 14361.8 + ] + } + }, + "schaltschrank_elemente": {}, + "mappings": { + "UC0101": [ + "POT-RA-3036" + ], + "UC0102": [ + "POT-RA-3122" + ] + }, + "distributors": { + "UC0101": [ + 20963.1, + 8705.7 + ], + "UC0102": [ + 19581.2, + 5559.7 + ] + }, + "tunnels": {}, + "racks": { + "Rack_1": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_2": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ] + }, + "not_found": { + "missing_distributors": [], + "missing_sensors": [], + "missing_tunnel": [], + "missing_attributes": {} + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/Erdungsbsp_todraw.json b/testdata/Erdungsbsp_todraw.json new file mode 100644 index 0000000..c6b954b --- /dev/null +++ b/testdata/Erdungsbsp_todraw.json @@ -0,0 +1,193 @@ +{ + "kabel": [ + { + "id": "UC0101-POT-RA-3036", + "s_artinr": "", + "coords": [ + { + "x": 20963.1, + "y": 8705.7 + }, + { + "x": 20282.5, + "y": 8705.7 + }, + { + "x": 20282.5, + "y": 14141.3 + }, + { + "x": 22624.4, + "y": 14141.3 + }, + { + "x": 22624.4, + "y": 13807.7 + } + ], + "length": 8791.7, + "tunnel_indices": [] + }, + { + "id": "UC0102-POT-RA-3122", + "s_artinr": "", + "coords": [ + { + "x": 19581.2, + "y": 5559.7 + }, + { + "x": 20282.5, + "y": 5559.7 + }, + { + "x": 20282.5, + "y": 8705.7 + }, + { + "x": 20282.5, + "y": 14141.3 + }, + { + "x": 19150.5, + "y": 14141.3 + }, + { + "x": 19150.5, + "y": 14361.8 + } + ], + "length": 10635.4, + "tunnel_indices": [] + } + ], + "rack_geometry": { + "Rack_1": { + "length": 4.4, + "coordinates": [ + { + "x": 18561.2, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 19150.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 22624.4, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 23052.9, + "y": 14141.3, + "z": 0.0 + } + ] + }, + "Rack_2": { + "length": 11.8, + "coordinates": [ + { + "x": 20282.5, + "y": 4064.6, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 5559.7, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 8705.7, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 15960.6, + "z": 0.0 + } + ] + }, + "v-POT-RA-3036-Rack_1": { + "length": 0.3, + "coordinates": [ + { + "x": 22624.4, + "y": 13807.7, + "z": 0.0 + }, + { + "x": 22624.4, + "y": 14141.3, + "z": 0.0 + } + ] + }, + "v-POT-RA-3122-Rack_1": { + "length": 0.2, + "coordinates": [ + { + "x": 19150.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 19150.5, + "y": 14361.8, + "z": 0.0 + } + ] + }, + "v-UC0101-Rack_2": { + "length": 0.7, + "coordinates": [ + { + "x": 20282.5, + "y": 8705.7, + "z": 0.0 + }, + { + "x": 20963.1, + "y": 8705.7, + "z": 0.0 + } + ] + }, + "v-UC0102-Rack_2": { + "length": 0.7, + "coordinates": [ + { + "x": 20282.5, + "y": 5559.7, + "z": 0.0 + }, + { + "x": 19581.2, + "y": 5559.7, + "z": 0.0 + } + ] + } + }, + "errors_routing": [], + "errors_sensors": [], + "errors_dists": [], + "errors_tunnels": [], + "errors_dists_not_in_layout": [], + "errors_sensors_not_in_layout": [], + "errors_missing_attributes": {} +} \ No newline at end of file diff --git a/testdata/easy.json b/testdata/easy.json new file mode 100644 index 0000000..57f9bae --- /dev/null +++ b/testdata/easy.json @@ -0,0 +1,340 @@ +{ + "sensors": { + "BG3241@1": { + "A": "0", + "B": "BG3241", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 38.8, + 1280.2 + ], + "IO": "BG3241", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "MA0062@1": { + "A": "0", + "B": "MA0062", + "C": "20073710081010151939", + "ARTINR": "790902001", + "BESCHR": "E-Teile für SEW Motor ASE1/HAN10ES - BG", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4967.0, + 8072.5 + ], + "IO": "MA0062", + "ID": "", + "VERW": "CV-M0062_0,75", + "BEZEICHNUNG": "Motor MA0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DQ04", + "TEXT-E": "Motor MA0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3240@1": { + "A": "0", + "B": "BG3240", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4961.9, + 5609.0 + ], + "IO": "BG3240", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3270@1": { + "A": "0", + "B": "BG3270", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5893.0, + 12968.1 + ], + "IO": "BG3270", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "" + }, + "BG3260@1": { + "A": "0", + "B": "BG3260", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 22355.3, + 13524.1 + ], + "IO": "BG3260", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + } + }, + "schaltschrank_elemente": { + "FC0062": { + "A": "0", + "B": "FC0062", + "C": "20073710081010151939", + "ARTINR": "703001017", + "BESCHR": "Hilfschalter für 3RV2011 ", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5272.5, + 8378.8 + ] + }, + "FC0062@1": { + "IO": "FC0062", + "ID": "", + "VERW": "MS FC0062", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DI2", + "TEXT-E": "Motor protection switch signaling contact FC0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x", + "pos": [ + 4973.9, + 8072.5 + ] + } + }, + "mappings": { + "UC0101": [ + "BG3241@1", + "BG3240@1", + "BG3270@1", + "BG3260@1" + ], + "UH01": [ + "MA0062@1" + ] + }, + "distributors": { + "UC0101": [ + 0.0, + 4162.8 + ], + "UH01": [ + 7000.0, + 16300.0 + ] + }, + "tunnels": { + "TUNNEL1": [ + [ + 9800.0, + 9000.0 + ], + [ + 21282.5, + 9295.2 + ] + ], + "length": { + "TUNNEL1": "3500" + } + }, + "racks": { + "Rack_1": [ + [ + 5000.0, + 10000.0, + 0 + ], + [ + 5000.0, + 3500.0, + 0 + ] + ], + "Rack_2": [ + [ + 0.0, + 0.0, + 0 + ], + [ + 0.0, + 3500.0, + 0 + ], + [ + 15000.0, + 3500.0, + 0 + ] + ], + "Rack_3": [ + [ + 1000.0, + 15000.0, + 0 + ], + [ + 12000.0, + 15000.0, + 0 + ] + ], + "Rack_4": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_5": [ + [ + 2800.0, + 10000.0, + 0 + ], + [ + 2800.0, + 3500.0, + 0 + ] + ], + "Rack_6": [ + [ + 9000.0, + 10000.0, + 0 + ], + [ + 9000.0, + 3500.0, + 0 + ] + ], + "Rack_7": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ], + "Rack_8": [ + [ + 2800.0, + 10000.0, + 0.0 + ], + [ + 2800.0, + 15000.0, + 0.0 + ] + ], + "Rack_9": [ + [ + 5000.0, + 10000.0, + 0.0 + ], + [ + 5000.0, + 15000.0, + 0.0 + ] + ], + "Rack_10": [ + [ + 9000.0, + 10000.0, + 0.0 + ], + [ + 9000.0, + 15000.0, + 0.0 + ] + ] + }, + "not_found": { + "missing_distributors": [], + "missing_sensors": [], + "missing_tunnel": [], + "missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/easy_hdiff_nb.json b/testdata/easy_hdiff_nb.json new file mode 100644 index 0000000..4a8405a --- /dev/null +++ b/testdata/easy_hdiff_nb.json @@ -0,0 +1,292 @@ +{ + "sensors": { + "MA0062@1": { + "IO": "MA0062", + "B": "MA0062", + "VERW": "CV-M0062_0,75", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DQ04", + "TEXT-E": "Motor MA0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "TEXT-D": "", + "REALE_POSITION": "x", + "BESCHR": "E-Teile für SEW Motor ASE1/HAN10ES - BG", + "ARTINR": "790902001", + "pos": [ + 5274.5, + 7605.7 + ] + }, + "BG3240@1": { + "IO": "BG3240", + "B": "BG3240", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "TEXT-D": "", + "REALE_POSITION": "x", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "ARTINR": "200000248", + "pos": [ + 5274.5, + 5889.0 + ] + }, + "BG3241@1": { + "IO": "BG3241", + "B": "BG3241", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "TEXT-D": "", + "REALE_POSITION": "x", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "ARTINR": "200000248", + "pos": [ + 461.6, + 1904.3 + ] + }, + "BG3260@1": { + "IO": "BG3260", + "B": "BG3260", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "TEXT-D": "", + "REALE_POSITION": "x", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "ARTINR": "200000248", + "pos": [ + 22751.5, + 13404.9 + ] + }, + "BG3270@1": { + "IO": "BG3270", + "B": "BG3270", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "TEXT-D": "", + "REALE_POSITION": "x", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "ARTINR": "200000248", + "pos": [ + 5891.5, + 13244.9 + ] + } + }, + "schaltschrank_elemente": { + "FC0062@1": { + "IO": "FC0062", + "B": "FC0062", + "VERW": "MS FC0062", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DI2", + "TEXT-E": "Motor protection switch signaling contact FC0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "TEXT-D": "", + "REALE_POSITION": "x", + "BESCHR": "Hilfschalter für 3RV2011 ", + "ARTINR": "703001017", + "pos": [ + 5274.5, + 8545.2 + ] + } + }, + "mappings": { + "UH01": [ + "MA0062@1" + ], + "UC0101": [ + "BG3240@1", + "BG3241@1", + "BG3260@1", + "BG3270@1" + ] + }, + "distributors": { + "UC0101": [ + 0.0, + 4162.8 + ], + "UH01": [ + 7000.0, + 16300.0 + ] + }, + "tunnels": { + "TUNNEL1": [ + [ + 9800.0, + 9000.0 + ], + [ + 21282.5, + 9295.2 + ] + ], + "length": { + "TUNNEL1": "3500" + } + }, + "racks": { + "Rack_1": [ + [ + 5000.0, + 10000.0, + 0 + ], + [ + 5000.0, + 3500.0, + 0 + ] + ], + "Rack_2": [ + [ + 0.0, + 0.0, + 0 + ], + [ + 0.0, + 3500.0, + 0 + ], + [ + 15000.0, + 3500.0, + 0 + ] + ], + "Rack_3": [ + [ + 1000.0, + 15000.0, + 1000.0 + ], + [ + 12000.0, + 15000.0, + 1000.0 + ] + ], + "Rack_4": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_5": [ + [ + 2800.0, + 10000.0, + 0 + ], + [ + 2800.0, + 3500.0, + 0 + ] + ], + "Rack_6": [ + [ + 9000.0, + 10000.0, + 0 + ], + [ + 9000.0, + 3500.0, + 0 + ] + ], + "Rack_7": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ], + "Rack_8": [ + [ + 2800.0, + 10000.0, + 0.0 + ], + [ + 2800.0, + 15000.0, + 1000.0 + ] + ], + "Rack_9": [ + [ + 5000.0, + 10000.0, + 0.0 + ], + [ + 5000.0, + 15000.0, + 1000.0 + ] + ], + "Rack_10": [ + [ + 9000.0, + 10000.0, + 0.0 + ], + [ + 9000.0, + 15000.0, + 1000.0 + ] + ] + }, + "not_found": { + "missing_distributors": [], + "missing_sensors": [], + "missing_tunnel": [], + "missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/easy_hdiff_nb_positionsdraw.json b/testdata/easy_hdiff_nb_positionsdraw.json new file mode 100644 index 0000000..4a8405a --- /dev/null +++ b/testdata/easy_hdiff_nb_positionsdraw.json @@ -0,0 +1,292 @@ +{ + "sensors": { + "MA0062@1": { + "IO": "MA0062", + "B": "MA0062", + "VERW": "CV-M0062_0,75", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DQ04", + "TEXT-E": "Motor MA0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "TEXT-D": "", + "REALE_POSITION": "x", + "BESCHR": "E-Teile für SEW Motor ASE1/HAN10ES - BG", + "ARTINR": "790902001", + "pos": [ + 5274.5, + 7605.7 + ] + }, + "BG3240@1": { + "IO": "BG3240", + "B": "BG3240", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "TEXT-D": "", + "REALE_POSITION": "x", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "ARTINR": "200000248", + "pos": [ + 5274.5, + 5889.0 + ] + }, + "BG3241@1": { + "IO": "BG3241", + "B": "BG3241", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "TEXT-D": "", + "REALE_POSITION": "x", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "ARTINR": "200000248", + "pos": [ + 461.6, + 1904.3 + ] + }, + "BG3260@1": { + "IO": "BG3260", + "B": "BG3260", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "TEXT-D": "", + "REALE_POSITION": "x", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "ARTINR": "200000248", + "pos": [ + 22751.5, + 13404.9 + ] + }, + "BG3270@1": { + "IO": "BG3270", + "B": "BG3270", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "TEXT-D": "", + "REALE_POSITION": "x", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "ARTINR": "200000248", + "pos": [ + 5891.5, + 13244.9 + ] + } + }, + "schaltschrank_elemente": { + "FC0062@1": { + "IO": "FC0062", + "B": "FC0062", + "VERW": "MS FC0062", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DI2", + "TEXT-E": "Motor protection switch signaling contact FC0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "TEXT-D": "", + "REALE_POSITION": "x", + "BESCHR": "Hilfschalter für 3RV2011 ", + "ARTINR": "703001017", + "pos": [ + 5274.5, + 8545.2 + ] + } + }, + "mappings": { + "UH01": [ + "MA0062@1" + ], + "UC0101": [ + "BG3240@1", + "BG3241@1", + "BG3260@1", + "BG3270@1" + ] + }, + "distributors": { + "UC0101": [ + 0.0, + 4162.8 + ], + "UH01": [ + 7000.0, + 16300.0 + ] + }, + "tunnels": { + "TUNNEL1": [ + [ + 9800.0, + 9000.0 + ], + [ + 21282.5, + 9295.2 + ] + ], + "length": { + "TUNNEL1": "3500" + } + }, + "racks": { + "Rack_1": [ + [ + 5000.0, + 10000.0, + 0 + ], + [ + 5000.0, + 3500.0, + 0 + ] + ], + "Rack_2": [ + [ + 0.0, + 0.0, + 0 + ], + [ + 0.0, + 3500.0, + 0 + ], + [ + 15000.0, + 3500.0, + 0 + ] + ], + "Rack_3": [ + [ + 1000.0, + 15000.0, + 1000.0 + ], + [ + 12000.0, + 15000.0, + 1000.0 + ] + ], + "Rack_4": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_5": [ + [ + 2800.0, + 10000.0, + 0 + ], + [ + 2800.0, + 3500.0, + 0 + ] + ], + "Rack_6": [ + [ + 9000.0, + 10000.0, + 0 + ], + [ + 9000.0, + 3500.0, + 0 + ] + ], + "Rack_7": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ], + "Rack_8": [ + [ + 2800.0, + 10000.0, + 0.0 + ], + [ + 2800.0, + 15000.0, + 1000.0 + ] + ], + "Rack_9": [ + [ + 5000.0, + 10000.0, + 0.0 + ], + [ + 5000.0, + 15000.0, + 1000.0 + ] + ], + "Rack_10": [ + [ + 9000.0, + 10000.0, + 0.0 + ], + [ + 9000.0, + 15000.0, + 1000.0 + ] + ] + }, + "not_found": { + "missing_distributors": [], + "missing_sensors": [], + "missing_tunnel": [], + "missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/easy_hdiff_nb_todraw.json b/testdata/easy_hdiff_nb_todraw.json new file mode 100644 index 0000000..ac26801 --- /dev/null +++ b/testdata/easy_hdiff_nb_todraw.json @@ -0,0 +1,605 @@ +{ + "kabel": [ + { + "id": "UH01-MA0062@1", + "s_artinr": "790902001", + "coords": [ + { + "x": 7000.0, + "y": 16300.0 + }, + { + "x": 7000.0, + "y": 15000.0 + }, + { + "x": 5000.0, + "y": 15000.0 + }, + { + "x": 5000.0, + "y": 13244.9 + }, + { + "x": 5000.0, + "y": 10000.0 + }, + { + "x": 5000.0, + "y": 7605.7 + }, + { + "x": 5274.5, + "y": 7605.7 + } + ], + "length": 11067.8, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3240@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 5889.0 + }, + { + "x": 5274.5, + "y": 5889.0 + } + ], + "length": 8326.3, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3241@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 0.0, + "y": 1904.3 + }, + { + "x": 461.6, + "y": 1904.3 + } + ], + "length": 2720.1, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3260@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 9000.0, + "y": 3500.0 + }, + { + "x": 9000.0, + "y": 9000.0 + }, + { + "x": 9800.0, + "y": 9000.0 + }, + { + "x": 21282.5, + "y": 9295.2 + }, + { + "x": 20282.5, + "y": 9295.2 + }, + { + "x": 20282.5, + "y": 14141.3 + }, + { + "x": 22751.5, + "y": 14141.3 + }, + { + "x": 22751.5, + "y": 13404.9 + } + ], + "length": 28514.3, + "tunnel_indices": [ + 6, + 7 + ] + }, + { + "id": "UC0101-BG3270@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 5889.0 + }, + { + "x": 5000.0, + "y": 7605.7 + }, + { + "x": 5000.0, + "y": 10000.0 + }, + { + "x": 5000.0, + "y": 13244.9 + }, + { + "x": 5891.5, + "y": 13244.9 + } + ], + "length": 16363.5, + "tunnel_indices": [] + } + ], + "rack_geometry": { + "Rack_1": { + "length": 6.5, + "coordinates": [ + { + "x": 5000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 5889.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 7605.7, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_2-1": { + "length": 3.5, + "coordinates": [ + { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + { + "x": 0.0, + "y": 1904.3, + "z": 0.0 + }, + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + } + ] + }, + "Rack_2-2": { + "length": 15.0, + "coordinates": [ + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 15000.0, + "y": 3500.0, + "z": 0.0 + } + ] + }, + "Rack_3": { + "length": 11.0, + "coordinates": [ + { + "x": 1000.0, + "y": 15000.0, + "z": 1000.0 + }, + { + "x": 2800.0, + "y": 15000.0, + "z": 1000.0 + }, + { + "x": 5000.0, + "y": 15000.0, + "z": 1000.0 + }, + { + "x": 7000.0, + "y": 15000.0, + "z": 1000.0 + }, + { + "x": 9000.0, + "y": 15000.0, + "z": 1000.0 + }, + { + "x": 12000.0, + "y": 15000.0, + "z": 1000.0 + } + ] + }, + "Rack_4": { + "length": 4.5, + "coordinates": [ + { + "x": 18561.2, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 22751.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 23052.9, + "y": 14141.3, + "z": 0.0 + } + ] + }, + "Rack_5": { + "length": 6.5, + "coordinates": [ + { + "x": 2800.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_6": { + "length": 6.5, + "coordinates": [ + { + "x": 9000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 9000.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_7": { + "length": 11.8, + "coordinates": [ + { + "x": 20282.5, + "y": 4064.6, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 9295.2, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 15960.6, + "z": 0.0 + } + ] + }, + "Rack_8": { + "length": 5.1, + "coordinates": [ + { + "x": 2800.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 15000.0, + "z": 1000.0 + } + ] + }, + "Rack_9": { + "length": 5.1, + "coordinates": [ + { + "x": 5000.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 13244.9, + "z": 649.0 + }, + { + "x": 5000.0, + "y": 15000.0, + "z": 1000.0 + } + ] + }, + "Rack_10": { + "length": 5.1, + "coordinates": [ + { + "x": 9000.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 15000.0, + "z": 1000.0 + } + ] + }, + "v-MA0062@1-Rack_1": { + "length": 0.3, + "coordinates": [ + { + "x": 5000.0, + "y": 7605.7, + "z": 0.0 + }, + { + "x": 5274.5, + "y": 7605.7, + "z": 0.0 + } + ] + }, + "v-BG3240@1-Rack_1": { + "length": 0.3, + "coordinates": [ + { + "x": 5000.0, + "y": 5889.0, + "z": 0.0 + }, + { + "x": 5274.5, + "y": 5889.0, + "z": 0.0 + } + ] + }, + "v-BG3241@1-Rack_2-1": { + "length": 0.5, + "coordinates": [ + { + "x": 0.0, + "y": 1904.3, + "z": 0.0 + }, + { + "x": 461.6, + "y": 1904.3, + "z": 0.0 + } + ] + }, + "v-BG3260@1-Rack_4": { + "length": 0.7, + "coordinates": [ + { + "x": 22751.5, + "y": 13404.9, + "z": 0.0 + }, + { + "x": 22751.5, + "y": 14141.3, + "z": 0.0 + } + ] + }, + "v-BG3270@1-Rack_9": { + "length": 0.9, + "coordinates": [ + { + "x": 5000.0, + "y": 13244.9, + "z": 649.0 + }, + { + "x": 5891.5, + "y": 13244.9, + "z": 0.0 + } + ] + }, + "v-UC0101-Rack_2-1": { + "length": 0.7, + "coordinates": [ + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 0.0, + "y": 4162.8, + "z": 0.0 + } + ] + }, + "v-UH01-Rack_3": { + "length": 1.3, + "coordinates": [ + { + "x": 7000.0, + "y": 15000.0, + "z": 1000.0 + }, + { + "x": 7000.0, + "y": 16300.0, + "z": 0.0 + } + ] + }, + "t-Rack-TUNNEL1": { + "length": 3.5, + "coordinates": [ + { + "x": 9800.0, + "y": 9000.0, + "z": 0.0 + }, + { + "x": 21282.5, + "y": 9295.2, + "z": 0.0 + } + ] + }, + "v-TUNNEL1-A-Rack_6": { + "length": 0.8, + "coordinates": [ + { + "x": 9000.0, + "y": 9000.0, + "z": 0.0 + }, + { + "x": 9800.0, + "y": 9000.0, + "z": 0.0 + } + ] + }, + "v-TUNNEL1-E-Rack_7": { + "length": 1.0, + "coordinates": [ + { + "x": 20282.5, + "y": 9295.2, + "z": 0.0 + }, + { + "x": 21282.5, + "y": 9295.2, + "z": 0.0 + } + ] + } + }, + "errors_routing": [], + "errors_sensors": [], + "errors_dists": [], + "errors_tunnels": [], + "errors_dists_not_in_layout": [], + "errors_sensors_not_in_layout": [], + "errors_missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } +} \ No newline at end of file diff --git a/testdata/easy_hoehe.json b/testdata/easy_hoehe.json new file mode 100644 index 0000000..653b033 --- /dev/null +++ b/testdata/easy_hoehe.json @@ -0,0 +1,340 @@ +{ + "sensors": { + "BG3241@1": { + "A": "0", + "B": "BG3241", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 38.8, + 1280.2 + ], + "IO": "BG3241", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "MA0062@1": { + "A": "0", + "B": "MA0062", + "C": "20073710081010151939", + "ARTINR": "790902001", + "BESCHR": "E-Teile für SEW Motor ASE1/HAN10ES - BG", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4967.0, + 8072.5 + ], + "IO": "MA0062", + "ID": "", + "VERW": "CV-M0062_0,75", + "BEZEICHNUNG": "Motor MA0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DQ04", + "TEXT-E": "Motor MA0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3240@1": { + "A": "0", + "B": "BG3240", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4961.9, + 5609.0 + ], + "IO": "BG3240", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3270@1": { + "A": "0", + "B": "BG3270", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5893.0, + 12968.1 + ], + "IO": "BG3270", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "" + }, + "BG3260@1": { + "A": "0", + "B": "BG3260", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 22355.3, + 13524.1 + ], + "IO": "BG3260", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + } + }, + "schaltschrank_elemente": { + "FC0062": { + "A": "0", + "B": "FC0062", + "C": "20073710081010151939", + "ARTINR": "703001017", + "BESCHR": "Hilfschalter für 3RV2011 ", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5272.5, + 8378.8 + ] + }, + "FC0062@1": { + "IO": "FC0062", + "ID": "", + "VERW": "MS FC0062", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DI2", + "TEXT-E": "Motor protection switch signaling contact FC0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x", + "pos": [ + 4973.9, + 8072.5 + ] + } + }, + "mappings": { + "UC0101": [ + "BG3241@1", + "BG3240@1", + "BG3270@1", + "BG3260@1" + ], + "UH01": [ + "MA0062@1" + ] + }, + "distributors": { + "UC0101": [ + 0.0, + 4162.8 + ], + "UH01": [ + 7000.0, + 16300.0 + ] + }, + "tunnels": { + "TUNNEL1": [ + [ + 9800.0, + 9000.0 + ], + [ + 21282.5, + 9295.2 + ] + ], + "length": { + "TUNNEL1": "3500" + } + }, + "racks": { + "Rack_1": [ + [ + 5000.0, + 10000.0, + 0 + ], + [ + 5000.0, + 3500.0, + 0 + ] + ], + "Rack_2": [ + [ + 0.0, + 0.0, + 0 + ], + [ + 0.0, + 3500.0, + 0 + ], + [ + 15000.0, + 3500.0, + 0 + ] + ], + "Rack_3": [ + [ + 1000.0, + 15000.0, + 1000.0 + ], + [ + 12000.0, + 15000.0, + 1000.0 + ] + ], + "Rack_4": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_5": [ + [ + 2800.0, + 10000.0, + 0 + ], + [ + 2800.0, + 3500.0, + 0 + ] + ], + "Rack_6": [ + [ + 9000.0, + 10000.0, + 0 + ], + [ + 9000.0, + 3500.0, + 0 + ] + ], + "Rack_7": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ], + "Rack_8": [ + [ + 2800.0, + 10000.0, + 0.0 + ], + [ + 2800.0, + 15000.0, + 1000.0 + ] + ], + "Rack_9": [ + [ + 5000.0, + 10000.0, + 0.0 + ], + [ + 5000.0, + 15000.0, + 1000.0 + ] + ], + "Rack_10": [ + [ + 9000.0, + 10000.0, + 0.0 + ], + [ + 9000.0, + 15000.0, + 1000.0 + ] + ] + }, + "not_found": { + "missing_distributors": [], + "missing_sensors": [], + "missing_tunnel": [], + "missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/easy_hoehe_positionsdraw.json b/testdata/easy_hoehe_positionsdraw.json new file mode 100644 index 0000000..653b033 --- /dev/null +++ b/testdata/easy_hoehe_positionsdraw.json @@ -0,0 +1,340 @@ +{ + "sensors": { + "BG3241@1": { + "A": "0", + "B": "BG3241", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 38.8, + 1280.2 + ], + "IO": "BG3241", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "MA0062@1": { + "A": "0", + "B": "MA0062", + "C": "20073710081010151939", + "ARTINR": "790902001", + "BESCHR": "E-Teile für SEW Motor ASE1/HAN10ES - BG", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4967.0, + 8072.5 + ], + "IO": "MA0062", + "ID": "", + "VERW": "CV-M0062_0,75", + "BEZEICHNUNG": "Motor MA0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DQ04", + "TEXT-E": "Motor MA0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3240@1": { + "A": "0", + "B": "BG3240", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4961.9, + 5609.0 + ], + "IO": "BG3240", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3270@1": { + "A": "0", + "B": "BG3270", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5893.0, + 12968.1 + ], + "IO": "BG3270", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "" + }, + "BG3260@1": { + "A": "0", + "B": "BG3260", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 22355.3, + 13524.1 + ], + "IO": "BG3260", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + } + }, + "schaltschrank_elemente": { + "FC0062": { + "A": "0", + "B": "FC0062", + "C": "20073710081010151939", + "ARTINR": "703001017", + "BESCHR": "Hilfschalter für 3RV2011 ", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5272.5, + 8378.8 + ] + }, + "FC0062@1": { + "IO": "FC0062", + "ID": "", + "VERW": "MS FC0062", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DI2", + "TEXT-E": "Motor protection switch signaling contact FC0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x", + "pos": [ + 4973.9, + 8072.5 + ] + } + }, + "mappings": { + "UC0101": [ + "BG3241@1", + "BG3240@1", + "BG3270@1", + "BG3260@1" + ], + "UH01": [ + "MA0062@1" + ] + }, + "distributors": { + "UC0101": [ + 0.0, + 4162.8 + ], + "UH01": [ + 7000.0, + 16300.0 + ] + }, + "tunnels": { + "TUNNEL1": [ + [ + 9800.0, + 9000.0 + ], + [ + 21282.5, + 9295.2 + ] + ], + "length": { + "TUNNEL1": "3500" + } + }, + "racks": { + "Rack_1": [ + [ + 5000.0, + 10000.0, + 0 + ], + [ + 5000.0, + 3500.0, + 0 + ] + ], + "Rack_2": [ + [ + 0.0, + 0.0, + 0 + ], + [ + 0.0, + 3500.0, + 0 + ], + [ + 15000.0, + 3500.0, + 0 + ] + ], + "Rack_3": [ + [ + 1000.0, + 15000.0, + 1000.0 + ], + [ + 12000.0, + 15000.0, + 1000.0 + ] + ], + "Rack_4": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_5": [ + [ + 2800.0, + 10000.0, + 0 + ], + [ + 2800.0, + 3500.0, + 0 + ] + ], + "Rack_6": [ + [ + 9000.0, + 10000.0, + 0 + ], + [ + 9000.0, + 3500.0, + 0 + ] + ], + "Rack_7": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ], + "Rack_8": [ + [ + 2800.0, + 10000.0, + 0.0 + ], + [ + 2800.0, + 15000.0, + 1000.0 + ] + ], + "Rack_9": [ + [ + 5000.0, + 10000.0, + 0.0 + ], + [ + 5000.0, + 15000.0, + 1000.0 + ] + ], + "Rack_10": [ + [ + 9000.0, + 10000.0, + 0.0 + ], + [ + 9000.0, + 15000.0, + 1000.0 + ] + ] + }, + "not_found": { + "missing_distributors": [], + "missing_sensors": [], + "missing_tunnel": [], + "missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/easy_hoehe_todraw.json b/testdata/easy_hoehe_todraw.json new file mode 100644 index 0000000..2804d9d --- /dev/null +++ b/testdata/easy_hoehe_todraw.json @@ -0,0 +1,605 @@ +{ + "kabel": [ + { + "id": "UC0101-BG3241@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 0.0, + "y": 1280.2 + }, + { + "x": 38.8, + "y": 1280.2 + } + ], + "length": 2921.4, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3240@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 5609.0 + }, + { + "x": 4961.9, + "y": 5609.0 + } + ], + "length": 7809.9, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3270@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 5609.0 + }, + { + "x": 5000.0, + "y": 8072.5 + }, + { + "x": 5000.0, + "y": 10000.0 + }, + { + "x": 5000.0, + "y": 12968.1 + }, + { + "x": 5893.0, + "y": 12968.1 + } + ], + "length": 16082.7, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3260@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 9000.0, + "y": 3500.0 + }, + { + "x": 9000.0, + "y": 9000.0 + }, + { + "x": 9800.0, + "y": 9000.0 + }, + { + "x": 21282.5, + "y": 9295.2 + }, + { + "x": 20282.5, + "y": 9295.2 + }, + { + "x": 20282.5, + "y": 14141.3 + }, + { + "x": 22355.3, + "y": 14141.3 + }, + { + "x": 22355.3, + "y": 13524.1 + } + ], + "length": 27998.9, + "tunnel_indices": [ + 6, + 7 + ] + }, + { + "id": "UH01-MA0062@1", + "s_artinr": "790902001", + "coords": [ + { + "x": 7000.0, + "y": 16300.0 + }, + { + "x": 7000.0, + "y": 15000.0 + }, + { + "x": 5000.0, + "y": 15000.0 + }, + { + "x": 5000.0, + "y": 12968.1 + }, + { + "x": 5000.0, + "y": 10000.0 + }, + { + "x": 5000.0, + "y": 8072.5 + }, + { + "x": 4967.0, + "y": 8072.5 + } + ], + "length": 10359.5, + "tunnel_indices": [] + } + ], + "rack_geometry": { + "Rack_1": { + "length": 6.5, + "coordinates": [ + { + "x": 5000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 5609.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 8072.5, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_2-1": { + "length": 3.5, + "coordinates": [ + { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + { + "x": 0.0, + "y": 1280.2, + "z": 0.0 + }, + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + } + ] + }, + "Rack_2-2": { + "length": 15.0, + "coordinates": [ + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 15000.0, + "y": 3500.0, + "z": 0.0 + } + ] + }, + "Rack_3": { + "length": 11.0, + "coordinates": [ + { + "x": 1000.0, + "y": 15000.0, + "z": 1000.0 + }, + { + "x": 2800.0, + "y": 15000.0, + "z": 1000.0 + }, + { + "x": 5000.0, + "y": 15000.0, + "z": 1000.0 + }, + { + "x": 7000.0, + "y": 15000.0, + "z": 1000.0 + }, + { + "x": 9000.0, + "y": 15000.0, + "z": 1000.0 + }, + { + "x": 12000.0, + "y": 15000.0, + "z": 1000.0 + } + ] + }, + "Rack_4": { + "length": 4.5, + "coordinates": [ + { + "x": 18561.2, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 22355.3, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 23052.9, + "y": 14141.3, + "z": 0.0 + } + ] + }, + "Rack_5": { + "length": 6.5, + "coordinates": [ + { + "x": 2800.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_6": { + "length": 6.5, + "coordinates": [ + { + "x": 9000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 9000.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_7": { + "length": 11.8, + "coordinates": [ + { + "x": 20282.5, + "y": 4064.6, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 9295.2, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 15960.6, + "z": 0.0 + } + ] + }, + "Rack_8": { + "length": 5.1, + "coordinates": [ + { + "x": 2800.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 15000.0, + "z": 1000.0 + } + ] + }, + "Rack_9": { + "length": 5.1, + "coordinates": [ + { + "x": 5000.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 12968.1, + "z": 593.6 + }, + { + "x": 5000.0, + "y": 15000.0, + "z": 1000.0 + } + ] + }, + "Rack_10": { + "length": 5.1, + "coordinates": [ + { + "x": 9000.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 15000.0, + "z": 1000.0 + } + ] + }, + "v-BG3241@1-Rack_2-1": { + "length": 0.0, + "coordinates": [ + { + "x": 0.0, + "y": 1280.2, + "z": 0.0 + }, + { + "x": 38.8, + "y": 1280.2, + "z": 0.0 + } + ] + }, + "v-MA0062@1-Rack_1": { + "length": 0.0, + "coordinates": [ + { + "x": 4967.0, + "y": 8072.5, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 8072.5, + "z": 0.0 + } + ] + }, + "v-BG3240@1-Rack_1": { + "length": 0.0, + "coordinates": [ + { + "x": 4961.9, + "y": 5609.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 5609.0, + "z": 0.0 + } + ] + }, + "v-BG3270@1-Rack_9": { + "length": 0.9, + "coordinates": [ + { + "x": 5000.0, + "y": 12968.1, + "z": 593.6 + }, + { + "x": 5893.0, + "y": 12968.1, + "z": 0.0 + } + ] + }, + "v-BG3260@1-Rack_4": { + "length": 0.6, + "coordinates": [ + { + "x": 22355.3, + "y": 13524.1, + "z": 0.0 + }, + { + "x": 22355.3, + "y": 14141.3, + "z": 0.0 + } + ] + }, + "v-UC0101-Rack_2-1": { + "length": 0.7, + "coordinates": [ + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 0.0, + "y": 4162.8, + "z": 0.0 + } + ] + }, + "v-UH01-Rack_3": { + "length": 1.3, + "coordinates": [ + { + "x": 7000.0, + "y": 15000.0, + "z": 1000.0 + }, + { + "x": 7000.0, + "y": 16300.0, + "z": 0.0 + } + ] + }, + "t-Rack-TUNNEL1": { + "length": 3.5, + "coordinates": [ + { + "x": 9800.0, + "y": 9000.0, + "z": 0.0 + }, + { + "x": 21282.5, + "y": 9295.2, + "z": 0.0 + } + ] + }, + "v-TUNNEL1-A-Rack_6": { + "length": 0.8, + "coordinates": [ + { + "x": 9000.0, + "y": 9000.0, + "z": 0.0 + }, + { + "x": 9800.0, + "y": 9000.0, + "z": 0.0 + } + ] + }, + "v-TUNNEL1-E-Rack_7": { + "length": 1.0, + "coordinates": [ + { + "x": 20282.5, + "y": 9295.2, + "z": 0.0 + }, + { + "x": 21282.5, + "y": 9295.2, + "z": 0.0 + } + ] + } + }, + "errors_routing": [], + "errors_sensors": [], + "errors_dists": [], + "errors_tunnels": [], + "errors_dists_not_in_layout": [], + "errors_sensors_not_in_layout": [], + "errors_missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } +} \ No newline at end of file diff --git a/testdata/easy_positionsconv.json b/testdata/easy_positionsconv.json new file mode 100644 index 0000000..57f9bae --- /dev/null +++ b/testdata/easy_positionsconv.json @@ -0,0 +1,340 @@ +{ + "sensors": { + "BG3241@1": { + "A": "0", + "B": "BG3241", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 38.8, + 1280.2 + ], + "IO": "BG3241", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "MA0062@1": { + "A": "0", + "B": "MA0062", + "C": "20073710081010151939", + "ARTINR": "790902001", + "BESCHR": "E-Teile für SEW Motor ASE1/HAN10ES - BG", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4967.0, + 8072.5 + ], + "IO": "MA0062", + "ID": "", + "VERW": "CV-M0062_0,75", + "BEZEICHNUNG": "Motor MA0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DQ04", + "TEXT-E": "Motor MA0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3240@1": { + "A": "0", + "B": "BG3240", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4961.9, + 5609.0 + ], + "IO": "BG3240", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3270@1": { + "A": "0", + "B": "BG3270", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5893.0, + 12968.1 + ], + "IO": "BG3270", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "" + }, + "BG3260@1": { + "A": "0", + "B": "BG3260", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 22355.3, + 13524.1 + ], + "IO": "BG3260", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + } + }, + "schaltschrank_elemente": { + "FC0062": { + "A": "0", + "B": "FC0062", + "C": "20073710081010151939", + "ARTINR": "703001017", + "BESCHR": "Hilfschalter für 3RV2011 ", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5272.5, + 8378.8 + ] + }, + "FC0062@1": { + "IO": "FC0062", + "ID": "", + "VERW": "MS FC0062", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DI2", + "TEXT-E": "Motor protection switch signaling contact FC0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x", + "pos": [ + 4973.9, + 8072.5 + ] + } + }, + "mappings": { + "UC0101": [ + "BG3241@1", + "BG3240@1", + "BG3270@1", + "BG3260@1" + ], + "UH01": [ + "MA0062@1" + ] + }, + "distributors": { + "UC0101": [ + 0.0, + 4162.8 + ], + "UH01": [ + 7000.0, + 16300.0 + ] + }, + "tunnels": { + "TUNNEL1": [ + [ + 9800.0, + 9000.0 + ], + [ + 21282.5, + 9295.2 + ] + ], + "length": { + "TUNNEL1": "3500" + } + }, + "racks": { + "Rack_1": [ + [ + 5000.0, + 10000.0, + 0 + ], + [ + 5000.0, + 3500.0, + 0 + ] + ], + "Rack_2": [ + [ + 0.0, + 0.0, + 0 + ], + [ + 0.0, + 3500.0, + 0 + ], + [ + 15000.0, + 3500.0, + 0 + ] + ], + "Rack_3": [ + [ + 1000.0, + 15000.0, + 0 + ], + [ + 12000.0, + 15000.0, + 0 + ] + ], + "Rack_4": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_5": [ + [ + 2800.0, + 10000.0, + 0 + ], + [ + 2800.0, + 3500.0, + 0 + ] + ], + "Rack_6": [ + [ + 9000.0, + 10000.0, + 0 + ], + [ + 9000.0, + 3500.0, + 0 + ] + ], + "Rack_7": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ], + "Rack_8": [ + [ + 2800.0, + 10000.0, + 0.0 + ], + [ + 2800.0, + 15000.0, + 0.0 + ] + ], + "Rack_9": [ + [ + 5000.0, + 10000.0, + 0.0 + ], + [ + 5000.0, + 15000.0, + 0.0 + ] + ], + "Rack_10": [ + [ + 9000.0, + 10000.0, + 0.0 + ], + [ + 9000.0, + 15000.0, + 0.0 + ] + ] + }, + "not_found": { + "missing_distributors": [], + "missing_sensors": [], + "missing_tunnel": [], + "missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/easy_positionsdraw.json b/testdata/easy_positionsdraw.json new file mode 100644 index 0000000..57f9bae --- /dev/null +++ b/testdata/easy_positionsdraw.json @@ -0,0 +1,340 @@ +{ + "sensors": { + "BG3241@1": { + "A": "0", + "B": "BG3241", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 38.8, + 1280.2 + ], + "IO": "BG3241", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "MA0062@1": { + "A": "0", + "B": "MA0062", + "C": "20073710081010151939", + "ARTINR": "790902001", + "BESCHR": "E-Teile für SEW Motor ASE1/HAN10ES - BG", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4967.0, + 8072.5 + ], + "IO": "MA0062", + "ID": "", + "VERW": "CV-M0062_0,75", + "BEZEICHNUNG": "Motor MA0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DQ04", + "TEXT-E": "Motor MA0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3240@1": { + "A": "0", + "B": "BG3240", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4961.9, + 5609.0 + ], + "IO": "BG3240", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3270@1": { + "A": "0", + "B": "BG3270", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5893.0, + 12968.1 + ], + "IO": "BG3270", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "" + }, + "BG3260@1": { + "A": "0", + "B": "BG3260", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 22355.3, + 13524.1 + ], + "IO": "BG3260", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + } + }, + "schaltschrank_elemente": { + "FC0062": { + "A": "0", + "B": "FC0062", + "C": "20073710081010151939", + "ARTINR": "703001017", + "BESCHR": "Hilfschalter für 3RV2011 ", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5272.5, + 8378.8 + ] + }, + "FC0062@1": { + "IO": "FC0062", + "ID": "", + "VERW": "MS FC0062", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DI2", + "TEXT-E": "Motor protection switch signaling contact FC0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x", + "pos": [ + 4973.9, + 8072.5 + ] + } + }, + "mappings": { + "UC0101": [ + "BG3241@1", + "BG3240@1", + "BG3270@1", + "BG3260@1" + ], + "UH01": [ + "MA0062@1" + ] + }, + "distributors": { + "UC0101": [ + 0.0, + 4162.8 + ], + "UH01": [ + 7000.0, + 16300.0 + ] + }, + "tunnels": { + "TUNNEL1": [ + [ + 9800.0, + 9000.0 + ], + [ + 21282.5, + 9295.2 + ] + ], + "length": { + "TUNNEL1": "3500" + } + }, + "racks": { + "Rack_1": [ + [ + 5000.0, + 10000.0, + 0 + ], + [ + 5000.0, + 3500.0, + 0 + ] + ], + "Rack_2": [ + [ + 0.0, + 0.0, + 0 + ], + [ + 0.0, + 3500.0, + 0 + ], + [ + 15000.0, + 3500.0, + 0 + ] + ], + "Rack_3": [ + [ + 1000.0, + 15000.0, + 0 + ], + [ + 12000.0, + 15000.0, + 0 + ] + ], + "Rack_4": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_5": [ + [ + 2800.0, + 10000.0, + 0 + ], + [ + 2800.0, + 3500.0, + 0 + ] + ], + "Rack_6": [ + [ + 9000.0, + 10000.0, + 0 + ], + [ + 9000.0, + 3500.0, + 0 + ] + ], + "Rack_7": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ], + "Rack_8": [ + [ + 2800.0, + 10000.0, + 0.0 + ], + [ + 2800.0, + 15000.0, + 0.0 + ] + ], + "Rack_9": [ + [ + 5000.0, + 10000.0, + 0.0 + ], + [ + 5000.0, + 15000.0, + 0.0 + ] + ], + "Rack_10": [ + [ + 9000.0, + 10000.0, + 0.0 + ], + [ + 9000.0, + 15000.0, + 0.0 + ] + ] + }, + "not_found": { + "missing_distributors": [], + "missing_sensors": [], + "missing_tunnel": [], + "missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/easy_sps.json b/testdata/easy_sps.json new file mode 100644 index 0000000..2c8c823 --- /dev/null +++ b/testdata/easy_sps.json @@ -0,0 +1,619 @@ +{ + "sensors": { + "BG3241@1": { + "A": "0", + "B": "BG3241", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 38.8, + 1280.2 + ], + "IO": "BG3241", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "MA0062@1": { + "A": "0", + "B": "MA0062", + "C": "20073710081010151939", + "ARTINR": "790902001", + "BESCHR": "E-Teile für SEW Motor ASE1/HAN10ES - BG", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4967.0, + 8072.5 + ], + "IO": "MA0062", + "ID": "", + "VERW": "CV-M0062_0,75", + "BEZEICHNUNG": "Motor MA0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DQ04", + "TEXT-E": "Motor MA0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3240@1": { + "A": "0", + "B": "BG3240", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4961.9, + 5609.0 + ], + "IO": "BG3240", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3270@1": { + "A": "0", + "B": "BG3270", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5893.0, + 12968.1 + ], + "IO": "BG3270", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "" + }, + "BG3270@2": { + "A": "0", + "B": "BG3270", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5926.6, + 12188.4 + ], + "IO": "BG3270", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "2", + "REALE_POSITION": "" + }, + "BG3260@1": { + "A": "0", + "B": "BG3260", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 22355.3, + 13524.1 + ], + "IO": "BG3260", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "PF0000@6": { + "A": "0", + "B": "PF0000", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -2662.9, + 13821.7 + ], + "IO": "PF0000", + "ID": "9999", + "VERW": "IL-YE-LED", + "BEZEICHNUNG": "LM Störung ", + "KENNZEICHNUNG": "=A01+UH06-KF1DQ1", + "TEXT-D": "LM Störung", + "TEXT-E": "IL Trouble", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "SF0003@6": { + "A": "0", + "B": "SF0003", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -3405.4, + 14091.7 + ], + "IO": "SF0003", + "ID": "9999", + "VERW": "PB-WH-NO", + "BEZEICHNUNG": "DT Lampentest", + "KENNZEICHNUNG": "=A01+UH06-KF1DI1", + "TEXT-D": "DT Lampentest", + "TEXT-E": "PB Lamp test", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "PF0003@6": { + "A": "0", + "B": "PF0003", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -2662.9, + 13551.7 + ], + "IO": "PF0003", + "ID": "9999", + "VERW": "IL-YE-LED", + "BEZEICHNUNG": "LM Druckluft fehlt", + "KENNZEICHNUNG": "=A01+UH06-KF1DQ1", + "TEXT-D": "LM Druckluft fehlt", + "TEXT-E": "IL Air pressure missing", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "PF0004@6": { + "A": "0", + "B": "PF0004", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -2662.9, + 13281.7 + ], + "IO": "PF0004", + "ID": "9999", + "VERW": "IL-YE-LED", + "BEZEICHNUNG": "LM Motorschutz hat ausgelöst", + "KENNZEICHNUNG": "=A01+UH06-KF1DQ1", + "TEXT-D": "LM Motorschutz hat ausgelöst", + "TEXT-E": "IL Motor protection has tripped", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "PF0005@6": { + "A": "0", + "B": "PF0005", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -2662.9, + 13011.7 + ], + "IO": "PF0005", + "ID": "9999", + "VERW": "IL-YE-LED", + "BEZEICHNUNG": "LM Sicherung hat ausgelöst", + "KENNZEICHNUNG": "=A01+UH06-KF1DQ1", + "TEXT-D": "LM Sicherung hat ausgelöst", + "TEXT-E": "IL Fuse has tripped", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "PF0006@6": { + "A": "0", + "B": "PF0006", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -2662.9, + 12741.7 + ], + "IO": "PF0006", + "ID": "9999", + "VERW": "IL-RD-LED", + "BEZEICHNUNG": "LM Störung Branschutztüre", + "KENNZEICHNUNG": "=A01+UH06-KF1DQ1", + "TEXT-D": "LM Störung Brandschutztüren", + "TEXT-E": "IL Trouble fire door", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "SF0400@6": { + "A": "0", + "B": "SF0400", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -3405.4, + 12471.7 + ], + "IO": "SF0400", + "ID": "9999", + "VERW": "PDT-NC-1", + "BEZEICHNUNG": "Not Halt Kanal 1 UH06", + "KENNZEICHNUNG": "=A01+UH06-KF1FDI9", + "TEXT-D": "Not-Halt Kanal 1", + "TEXT-E": "E-Stop Canal 1", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "SF0404@6": { + "A": "0", + "B": "SF0404", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -3405.4, + 12201.7 + ], + "IO": "SF0404", + "ID": "9999", + "VERW": "PDT-NC-1", + "BEZEICHNUNG": "Not Halt Kanal 1 UH06", + "KENNZEICHNUNG": "=A01+UH06-KF1FDI9", + "TEXT-D": "Not-Halt Kanal 1", + "TEXT-E": "E-stop Canal 1", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + } + }, + "schaltschrank_elemente": { + "FC0062": { + "A": "0", + "B": "FC0062", + "C": "20073710081010151939", + "ARTINR": "703001017", + "BESCHR": "Hilfschalter für 3RV2011 ", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5272.5, + 8378.8 + ] + }, + "FC0062@1": { + "IO": "FC0062", + "ID": "", + "VERW": "MS FC0062", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DI2", + "TEXT-E": "Motor protection switch signaling contact FC0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x", + "pos": [ + 4973.9, + 8072.5 + ] + }, + "DI0005@6": { + "IO": "DI0005", + "ID": "9999", + "VERW": "RELAY-NO", + "BEZEICHNUNG": "Phasenausfall 400V", + "KENNZEICHNUNG": "=A01+UH06-KF1DI1", + "TEXT-D": "Phasenausfall 400V", + "TEXT-E": "Phase failure relay 400V", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6", + "pos": [ + -3405.4, + 11346.6 + ] + }, + "DI0005": { + "A": "0", + "B": "DI0005", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -3423.4, + 11493.1 + ] + } + }, + "mappings": { + "UC0101": [ + "BG3241@1", + "BG3240@1", + "BG3270@1", + "BG3270@2", + "BG3260@1" + ], + "UH01": [ + "MA0062@1" + ], + "UH06": [ + "PF0000@6", + "SF0003@6", + "PF0003@6", + "PF0004@6", + "PF0005@6", + "PF0006@6", + "SF0400@6", + "SF0404@6" + ] + }, + "distributors": { + "UC0101": [ + 0.0, + 4162.8 + ], + "UH01": [ + 7000.0, + 16300.0 + ] + }, + "tunnels": { + "TUNNEL1": [ + [ + 9800.0, + 9000.0 + ], + [ + 21282.5, + 9295.2 + ] + ], + "length": { + "TUNNEL1": "3500" + } + }, + "racks": { + "Rack_1": [ + [ + 5000.0, + 10000.0, + 0 + ], + [ + 5000.0, + 3500.0, + 0 + ] + ], + "Rack_2": [ + [ + 0.0, + 0.0, + 0 + ], + [ + 0.0, + 3500.0, + 0 + ], + [ + 15000.0, + 3500.0, + 0 + ] + ], + "Rack_3": [ + [ + 1000.0, + 15000.0, + 0 + ], + [ + 12000.0, + 15000.0, + 0 + ] + ], + "Rack_4": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_5": [ + [ + 2800.0, + 10000.0, + 0 + ], + [ + 2800.0, + 3500.0, + 0 + ] + ], + "Rack_6": [ + [ + 9000.0, + 10000.0, + 0 + ], + [ + 9000.0, + 3500.0, + 0 + ] + ], + "Rack_7": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ], + "Rack_8": [ + [ + 2800.0, + 10000.0, + 0.0 + ], + [ + 2800.0, + 15000.0, + 0.0 + ] + ], + "Rack_9": [ + [ + 5000.0, + 10000.0, + 0.0 + ], + [ + 5000.0, + 15000.0, + 0.0 + ] + ], + "Rack_10": [ + [ + 9000.0, + 10000.0, + 0.0 + ], + [ + 9000.0, + 15000.0, + 0.0 + ] + ] + }, + "not_found": { + "missing_distributors": [ + "UH06" + ], + "missing_sensors": [], + "missing_tunnel": [], + "missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/easy_sps_positionsdraw.json b/testdata/easy_sps_positionsdraw.json new file mode 100644 index 0000000..2c8c823 --- /dev/null +++ b/testdata/easy_sps_positionsdraw.json @@ -0,0 +1,619 @@ +{ + "sensors": { + "BG3241@1": { + "A": "0", + "B": "BG3241", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 38.8, + 1280.2 + ], + "IO": "BG3241", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "MA0062@1": { + "A": "0", + "B": "MA0062", + "C": "20073710081010151939", + "ARTINR": "790902001", + "BESCHR": "E-Teile für SEW Motor ASE1/HAN10ES - BG", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4967.0, + 8072.5 + ], + "IO": "MA0062", + "ID": "", + "VERW": "CV-M0062_0,75", + "BEZEICHNUNG": "Motor MA0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DQ04", + "TEXT-E": "Motor MA0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3240@1": { + "A": "0", + "B": "BG3240", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4961.9, + 5609.0 + ], + "IO": "BG3240", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3270@1": { + "A": "0", + "B": "BG3270", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5893.0, + 12968.1 + ], + "IO": "BG3270", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "" + }, + "BG3270@2": { + "A": "0", + "B": "BG3270", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5926.6, + 12188.4 + ], + "IO": "BG3270", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "2", + "REALE_POSITION": "" + }, + "BG3260@1": { + "A": "0", + "B": "BG3260", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 22355.3, + 13524.1 + ], + "IO": "BG3260", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "PF0000@6": { + "A": "0", + "B": "PF0000", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -2662.9, + 13821.7 + ], + "IO": "PF0000", + "ID": "9999", + "VERW": "IL-YE-LED", + "BEZEICHNUNG": "LM Störung ", + "KENNZEICHNUNG": "=A01+UH06-KF1DQ1", + "TEXT-D": "LM Störung", + "TEXT-E": "IL Trouble", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "SF0003@6": { + "A": "0", + "B": "SF0003", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -3405.4, + 14091.7 + ], + "IO": "SF0003", + "ID": "9999", + "VERW": "PB-WH-NO", + "BEZEICHNUNG": "DT Lampentest", + "KENNZEICHNUNG": "=A01+UH06-KF1DI1", + "TEXT-D": "DT Lampentest", + "TEXT-E": "PB Lamp test", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "PF0003@6": { + "A": "0", + "B": "PF0003", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -2662.9, + 13551.7 + ], + "IO": "PF0003", + "ID": "9999", + "VERW": "IL-YE-LED", + "BEZEICHNUNG": "LM Druckluft fehlt", + "KENNZEICHNUNG": "=A01+UH06-KF1DQ1", + "TEXT-D": "LM Druckluft fehlt", + "TEXT-E": "IL Air pressure missing", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "PF0004@6": { + "A": "0", + "B": "PF0004", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -2662.9, + 13281.7 + ], + "IO": "PF0004", + "ID": "9999", + "VERW": "IL-YE-LED", + "BEZEICHNUNG": "LM Motorschutz hat ausgelöst", + "KENNZEICHNUNG": "=A01+UH06-KF1DQ1", + "TEXT-D": "LM Motorschutz hat ausgelöst", + "TEXT-E": "IL Motor protection has tripped", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "PF0005@6": { + "A": "0", + "B": "PF0005", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -2662.9, + 13011.7 + ], + "IO": "PF0005", + "ID": "9999", + "VERW": "IL-YE-LED", + "BEZEICHNUNG": "LM Sicherung hat ausgelöst", + "KENNZEICHNUNG": "=A01+UH06-KF1DQ1", + "TEXT-D": "LM Sicherung hat ausgelöst", + "TEXT-E": "IL Fuse has tripped", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "PF0006@6": { + "A": "0", + "B": "PF0006", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -2662.9, + 12741.7 + ], + "IO": "PF0006", + "ID": "9999", + "VERW": "IL-RD-LED", + "BEZEICHNUNG": "LM Störung Branschutztüre", + "KENNZEICHNUNG": "=A01+UH06-KF1DQ1", + "TEXT-D": "LM Störung Brandschutztüren", + "TEXT-E": "IL Trouble fire door", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "SF0400@6": { + "A": "0", + "B": "SF0400", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -3405.4, + 12471.7 + ], + "IO": "SF0400", + "ID": "9999", + "VERW": "PDT-NC-1", + "BEZEICHNUNG": "Not Halt Kanal 1 UH06", + "KENNZEICHNUNG": "=A01+UH06-KF1FDI9", + "TEXT-D": "Not-Halt Kanal 1", + "TEXT-E": "E-Stop Canal 1", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + }, + "SF0404@6": { + "A": "0", + "B": "SF0404", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -3405.4, + 12201.7 + ], + "IO": "SF0404", + "ID": "9999", + "VERW": "PDT-NC-1", + "BEZEICHNUNG": "Not Halt Kanal 1 UH06", + "KENNZEICHNUNG": "=A01+UH06-KF1FDI9", + "TEXT-D": "Not-Halt Kanal 1", + "TEXT-E": "E-stop Canal 1", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6" + } + }, + "schaltschrank_elemente": { + "FC0062": { + "A": "0", + "B": "FC0062", + "C": "20073710081010151939", + "ARTINR": "703001017", + "BESCHR": "Hilfschalter für 3RV2011 ", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5272.5, + 8378.8 + ] + }, + "FC0062@1": { + "IO": "FC0062", + "ID": "", + "VERW": "MS FC0062", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DI2", + "TEXT-E": "Motor protection switch signaling contact FC0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x", + "pos": [ + 4973.9, + 8072.5 + ] + }, + "DI0005@6": { + "IO": "DI0005", + "ID": "9999", + "VERW": "RELAY-NO", + "BEZEICHNUNG": "Phasenausfall 400V", + "KENNZEICHNUNG": "=A01+UH06-KF1DI1", + "TEXT-D": "Phasenausfall 400V", + "TEXT-E": "Phase failure relay 400V", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "6", + "pos": [ + -3405.4, + 11346.6 + ] + }, + "DI0005": { + "A": "0", + "B": "DI0005", + "C": "20092710081010151939", + "ARTINR": "", + "BESCHR": "", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + -3423.4, + 11493.1 + ] + } + }, + "mappings": { + "UC0101": [ + "BG3241@1", + "BG3240@1", + "BG3270@1", + "BG3270@2", + "BG3260@1" + ], + "UH01": [ + "MA0062@1" + ], + "UH06": [ + "PF0000@6", + "SF0003@6", + "PF0003@6", + "PF0004@6", + "PF0005@6", + "PF0006@6", + "SF0400@6", + "SF0404@6" + ] + }, + "distributors": { + "UC0101": [ + 0.0, + 4162.8 + ], + "UH01": [ + 7000.0, + 16300.0 + ] + }, + "tunnels": { + "TUNNEL1": [ + [ + 9800.0, + 9000.0 + ], + [ + 21282.5, + 9295.2 + ] + ], + "length": { + "TUNNEL1": "3500" + } + }, + "racks": { + "Rack_1": [ + [ + 5000.0, + 10000.0, + 0 + ], + [ + 5000.0, + 3500.0, + 0 + ] + ], + "Rack_2": [ + [ + 0.0, + 0.0, + 0 + ], + [ + 0.0, + 3500.0, + 0 + ], + [ + 15000.0, + 3500.0, + 0 + ] + ], + "Rack_3": [ + [ + 1000.0, + 15000.0, + 0 + ], + [ + 12000.0, + 15000.0, + 0 + ] + ], + "Rack_4": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_5": [ + [ + 2800.0, + 10000.0, + 0 + ], + [ + 2800.0, + 3500.0, + 0 + ] + ], + "Rack_6": [ + [ + 9000.0, + 10000.0, + 0 + ], + [ + 9000.0, + 3500.0, + 0 + ] + ], + "Rack_7": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ], + "Rack_8": [ + [ + 2800.0, + 10000.0, + 0.0 + ], + [ + 2800.0, + 15000.0, + 0.0 + ] + ], + "Rack_9": [ + [ + 5000.0, + 10000.0, + 0.0 + ], + [ + 5000.0, + 15000.0, + 0.0 + ] + ], + "Rack_10": [ + [ + 9000.0, + 10000.0, + 0.0 + ], + [ + 9000.0, + 15000.0, + 0.0 + ] + ] + }, + "not_found": { + "missing_distributors": [ + "UH06" + ], + "missing_sensors": [], + "missing_tunnel": [], + "missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/easy_sps_todraw.json b/testdata/easy_sps_todraw.json new file mode 100644 index 0000000..97da6b5 --- /dev/null +++ b/testdata/easy_sps_todraw.json @@ -0,0 +1,750 @@ +{ + "kabel": [ + { + "id": "UC0101-BG3241@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 0.0, + "y": 1280.2 + }, + { + "x": 38.8, + "y": 1280.2 + } + ], + "length": 2921.4, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3240@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 5609.0 + }, + { + "x": 4961.9, + "y": 5609.0 + } + ], + "length": 7809.9, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3270@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 5609.0 + }, + { + "x": 5000.0, + "y": 8072.5 + }, + { + "x": 5000.0, + "y": 10000.0 + }, + { + "x": 5000.0, + "y": 12188.4 + }, + { + "x": 5000.0, + "y": 12968.1 + }, + { + "x": 5893.0, + "y": 12968.1 + } + ], + "length": 16023.9, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3270@2", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 5609.0 + }, + { + "x": 5000.0, + "y": 8072.5 + }, + { + "x": 5000.0, + "y": 10000.0 + }, + { + "x": 5000.0, + "y": 12188.4 + }, + { + "x": 5926.6, + "y": 12188.4 + } + ], + "length": 15277.8, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3260@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 9000.0, + "y": 3500.0 + }, + { + "x": 9000.0, + "y": 9000.0 + }, + { + "x": 9800.0, + "y": 9000.0 + }, + { + "x": 21282.5, + "y": 9295.2 + }, + { + "x": 20282.5, + "y": 9295.2 + }, + { + "x": 20282.5, + "y": 14141.3 + }, + { + "x": 22355.3, + "y": 14141.3 + }, + { + "x": 22355.3, + "y": 13524.1 + } + ], + "length": 27998.9, + "tunnel_indices": [ + 6, + 7 + ] + }, + { + "id": "UH01-MA0062@1", + "s_artinr": "790902001", + "coords": [ + { + "x": 7000.0, + "y": 16300.0 + }, + { + "x": 7000.0, + "y": 15000.0 + }, + { + "x": 5000.0, + "y": 15000.0 + }, + { + "x": 5000.0, + "y": 12968.1 + }, + { + "x": 5000.0, + "y": 12188.4 + }, + { + "x": 5000.0, + "y": 10000.0 + }, + { + "x": 5000.0, + "y": 8072.5 + }, + { + "x": 4967.0, + "y": 8072.5 + } + ], + "length": 10260.5, + "tunnel_indices": [] + } + ], + "rack_geometry": { + "Rack_1": { + "length": 6.5, + "coordinates": [ + { + "x": 5000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 5609.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 8072.5, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_2-1": { + "length": 3.5, + "coordinates": [ + { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + { + "x": 0.0, + "y": 1280.2, + "z": 0.0 + }, + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + } + ] + }, + "Rack_2-2": { + "length": 15.0, + "coordinates": [ + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 15000.0, + "y": 3500.0, + "z": 0.0 + } + ] + }, + "Rack_3": { + "length": 11.0, + "coordinates": [ + { + "x": 1000.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 7000.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 12000.0, + "y": 15000.0, + "z": 0.0 + } + ] + }, + "Rack_4": { + "length": 4.5, + "coordinates": [ + { + "x": 18561.2, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 22355.3, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 23052.9, + "y": 14141.3, + "z": 0.0 + } + ] + }, + "Rack_5": { + "length": 6.5, + "coordinates": [ + { + "x": 2800.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_6": { + "length": 6.5, + "coordinates": [ + { + "x": 9000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 9000.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_7": { + "length": 11.8, + "coordinates": [ + { + "x": 20282.5, + "y": 4064.6, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 9295.2, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 15960.6, + "z": 0.0 + } + ] + }, + "Rack_8": { + "length": 5.0, + "coordinates": [ + { + "x": 2800.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 15000.0, + "z": 0.0 + } + ] + }, + "Rack_9": { + "length": 5.0, + "coordinates": [ + { + "x": 5000.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 12188.4, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 12968.1, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 15000.0, + "z": 0.0 + } + ] + }, + "Rack_10": { + "length": 5.0, + "coordinates": [ + { + "x": 9000.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 15000.0, + "z": 0.0 + } + ] + }, + "v-BG3241@1-Rack_2-1": { + "length": 0.0, + "coordinates": [ + { + "x": 0.0, + "y": 1280.2, + "z": 0.0 + }, + { + "x": 38.8, + "y": 1280.2, + "z": 0.0 + } + ] + }, + "v-MA0062@1-Rack_1": { + "length": 0.0, + "coordinates": [ + { + "x": 4967.0, + "y": 8072.5, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 8072.5, + "z": 0.0 + } + ] + }, + "v-BG3240@1-Rack_1": { + "length": 0.0, + "coordinates": [ + { + "x": 4961.9, + "y": 5609.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 5609.0, + "z": 0.0 + } + ] + }, + "v-BG3270@1-Rack_9": { + "length": 0.9, + "coordinates": [ + { + "x": 5000.0, + "y": 12968.1, + "z": 0.0 + }, + { + "x": 5893.0, + "y": 12968.1, + "z": 0.0 + } + ] + }, + "v-BG3270@2-Rack_9": { + "length": 0.9, + "coordinates": [ + { + "x": 5000.0, + "y": 12188.4, + "z": 0.0 + }, + { + "x": 5926.6, + "y": 12188.4, + "z": 0.0 + } + ] + }, + "v-BG3260@1-Rack_4": { + "length": 0.6, + "coordinates": [ + { + "x": 22355.3, + "y": 13524.1, + "z": 0.0 + }, + { + "x": 22355.3, + "y": 14141.3, + "z": 0.0 + } + ] + }, + "v-UC0101-Rack_2-1": { + "length": 0.7, + "coordinates": [ + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 0.0, + "y": 4162.8, + "z": 0.0 + } + ] + }, + "v-UH01-Rack_3": { + "length": 1.3, + "coordinates": [ + { + "x": 7000.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 7000.0, + "y": 16300.0, + "z": 0.0 + } + ] + }, + "t-Rack-TUNNEL1": { + "length": 3.5, + "coordinates": [ + { + "x": 9800.0, + "y": 9000.0, + "z": 0.0 + }, + { + "x": 21282.5, + "y": 9295.2, + "z": 0.0 + } + ] + }, + "v-TUNNEL1-A-Rack_6": { + "length": 0.8, + "coordinates": [ + { + "x": 9000.0, + "y": 9000.0, + "z": 0.0 + }, + { + "x": 9800.0, + "y": 9000.0, + "z": 0.0 + } + ] + }, + "v-TUNNEL1-E-Rack_7": { + "length": 1.0, + "coordinates": [ + { + "x": 20282.5, + "y": 9295.2, + "z": 0.0 + }, + { + "x": 21282.5, + "y": 9295.2, + "z": 0.0 + } + ] + } + }, + "errors_routing": [ + { + "unterverteiler": "UH06", + "sensoren": [ + "PF0000@6", + "SF0003@6", + "PF0003@6", + "PF0004@6", + "PF0005@6", + "PF0006@6", + "SF0400@6", + "SF0404@6" + ] + } + ], + "errors_sensors": [ + { + "name": "PF0000@6", + "coords": { + "x": -2662.9, + "y": 13821.7 + } + }, + { + "name": "SF0003@6", + "coords": { + "x": -3405.4, + "y": 14091.7 + } + }, + { + "name": "PF0003@6", + "coords": { + "x": -2662.9, + "y": 13551.7 + } + }, + { + "name": "PF0004@6", + "coords": { + "x": -2662.9, + "y": 13281.7 + } + }, + { + "name": "PF0005@6", + "coords": { + "x": -2662.9, + "y": 13011.7 + } + }, + { + "name": "PF0006@6", + "coords": { + "x": -2662.9, + "y": 12741.7 + } + }, + { + "name": "SF0400@6", + "coords": { + "x": -3405.4, + "y": 12471.7 + } + }, + { + "name": "SF0404@6", + "coords": { + "x": -3405.4, + "y": 12201.7 + } + } + ], + "errors_dists": [], + "errors_tunnels": [], + "errors_dists_not_in_layout": [ + "UH06" + ], + "errors_sensors_not_in_layout": [], + "errors_missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } +} \ No newline at end of file diff --git a/testdata/easy_todraw.json b/testdata/easy_todraw.json new file mode 100644 index 0000000..03b8da9 --- /dev/null +++ b/testdata/easy_todraw.json @@ -0,0 +1,605 @@ +{ + "kabel": [ + { + "id": "UC0101-BG3241@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 0.0, + "y": 1280.2 + }, + { + "x": 38.8, + "y": 1280.2 + } + ], + "length": 2921.4, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3240@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 5609.0 + }, + { + "x": 4961.9, + "y": 5609.0 + } + ], + "length": 7809.9, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3270@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 5609.0 + }, + { + "x": 5000.0, + "y": 8072.5 + }, + { + "x": 5000.0, + "y": 10000.0 + }, + { + "x": 5000.0, + "y": 12968.1 + }, + { + "x": 5893.0, + "y": 12968.1 + } + ], + "length": 16023.9, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3260@1", + "s_artinr": "200000248", + "coords": [ + { + "x": 0.0, + "y": 4162.8 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 9000.0, + "y": 3500.0 + }, + { + "x": 9000.0, + "y": 9000.0 + }, + { + "x": 9800.0, + "y": 9000.0 + }, + { + "x": 21282.5, + "y": 9295.2 + }, + { + "x": 20282.5, + "y": 9295.2 + }, + { + "x": 20282.5, + "y": 14141.3 + }, + { + "x": 22355.3, + "y": 14141.3 + }, + { + "x": 22355.3, + "y": 13524.1 + } + ], + "length": 27998.9, + "tunnel_indices": [ + 6, + 7 + ] + }, + { + "id": "UH01-MA0062@1", + "s_artinr": "790902001", + "coords": [ + { + "x": 7000.0, + "y": 16300.0 + }, + { + "x": 7000.0, + "y": 15000.0 + }, + { + "x": 5000.0, + "y": 15000.0 + }, + { + "x": 5000.0, + "y": 12968.1 + }, + { + "x": 5000.0, + "y": 10000.0 + }, + { + "x": 5000.0, + "y": 8072.5 + }, + { + "x": 4967.0, + "y": 8072.5 + } + ], + "length": 10260.5, + "tunnel_indices": [] + } + ], + "rack_geometry": { + "Rack_1": { + "length": 6.5, + "coordinates": [ + { + "x": 5000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 5609.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 8072.5, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_2-1": { + "length": 3.5, + "coordinates": [ + { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + { + "x": 0.0, + "y": 1280.2, + "z": 0.0 + }, + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + } + ] + }, + "Rack_2-2": { + "length": 15.0, + "coordinates": [ + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 15000.0, + "y": 3500.0, + "z": 0.0 + } + ] + }, + "Rack_3": { + "length": 11.0, + "coordinates": [ + { + "x": 1000.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 7000.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 12000.0, + "y": 15000.0, + "z": 0.0 + } + ] + }, + "Rack_4": { + "length": 4.5, + "coordinates": [ + { + "x": 18561.2, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 22355.3, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 23052.9, + "y": 14141.3, + "z": 0.0 + } + ] + }, + "Rack_5": { + "length": 6.5, + "coordinates": [ + { + "x": 2800.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_6": { + "length": 6.5, + "coordinates": [ + { + "x": 9000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 9000.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_7": { + "length": 11.8, + "coordinates": [ + { + "x": 20282.5, + "y": 4064.6, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 9295.2, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 15960.6, + "z": 0.0 + } + ] + }, + "Rack_8": { + "length": 5.0, + "coordinates": [ + { + "x": 2800.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 15000.0, + "z": 0.0 + } + ] + }, + "Rack_9": { + "length": 5.0, + "coordinates": [ + { + "x": 5000.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 12968.1, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 15000.0, + "z": 0.0 + } + ] + }, + "Rack_10": { + "length": 5.0, + "coordinates": [ + { + "x": 9000.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 15000.0, + "z": 0.0 + } + ] + }, + "v-BG3241@1-Rack_2-1": { + "length": 0.0, + "coordinates": [ + { + "x": 0.0, + "y": 1280.2, + "z": 0.0 + }, + { + "x": 38.8, + "y": 1280.2, + "z": 0.0 + } + ] + }, + "v-MA0062@1-Rack_1": { + "length": 0.0, + "coordinates": [ + { + "x": 4967.0, + "y": 8072.5, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 8072.5, + "z": 0.0 + } + ] + }, + "v-BG3240@1-Rack_1": { + "length": 0.0, + "coordinates": [ + { + "x": 4961.9, + "y": 5609.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 5609.0, + "z": 0.0 + } + ] + }, + "v-BG3270@1-Rack_9": { + "length": 0.9, + "coordinates": [ + { + "x": 5000.0, + "y": 12968.1, + "z": 0.0 + }, + { + "x": 5893.0, + "y": 12968.1, + "z": 0.0 + } + ] + }, + "v-BG3260@1-Rack_4": { + "length": 0.6, + "coordinates": [ + { + "x": 22355.3, + "y": 13524.1, + "z": 0.0 + }, + { + "x": 22355.3, + "y": 14141.3, + "z": 0.0 + } + ] + }, + "v-UC0101-Rack_2-1": { + "length": 0.7, + "coordinates": [ + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 0.0, + "y": 4162.8, + "z": 0.0 + } + ] + }, + "v-UH01-Rack_3": { + "length": 1.3, + "coordinates": [ + { + "x": 7000.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 7000.0, + "y": 16300.0, + "z": 0.0 + } + ] + }, + "t-Rack-TUNNEL1": { + "length": 3.5, + "coordinates": [ + { + "x": 9800.0, + "y": 9000.0, + "z": 0.0 + }, + { + "x": 21282.5, + "y": 9295.2, + "z": 0.0 + } + ] + }, + "v-TUNNEL1-A-Rack_6": { + "length": 0.8, + "coordinates": [ + { + "x": 9000.0, + "y": 9000.0, + "z": 0.0 + }, + { + "x": 9800.0, + "y": 9000.0, + "z": 0.0 + } + ] + }, + "v-TUNNEL1-E-Rack_7": { + "length": 1.0, + "coordinates": [ + { + "x": 20282.5, + "y": 9295.2, + "z": 0.0 + }, + { + "x": 21282.5, + "y": 9295.2, + "z": 0.0 + } + ] + } + }, + "errors_routing": [], + "errors_sensors": [], + "errors_dists": [], + "errors_tunnels": [], + "errors_dists_not_in_layout": [], + "errors_sensors_not_in_layout": [], + "errors_missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } +} \ No newline at end of file diff --git a/testdata/easy_tunnelerror1.json b/testdata/easy_tunnelerror1.json new file mode 100644 index 0000000..6190304 --- /dev/null +++ b/testdata/easy_tunnelerror1.json @@ -0,0 +1,358 @@ +{ + "sensors": { + "BG3241@1": { + "A": "0", + "B": "BG3241", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 38.8, + 1280.2 + ], + "IO": "BG3241", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "MA0062@1": { + "A": "0", + "B": "MA0062", + "C": "20073710081010151939", + "ARTINR": "790902001", + "BESCHR": "E-Teile für SEW Motor ASE1/HAN10ES - BG", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4967.0, + 8072.5 + ], + "IO": "MA0062", + "ID": "", + "VERW": "CV-M0062_0,75", + "BEZEICHNUNG": "Motor MA0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DQ04", + "TEXT-E": "Motor MA0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3240@1": { + "A": "0", + "B": "BG3240", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 4961.9, + 5609.0 + ], + "IO": "BG3240", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3270@1": { + "A": "0", + "B": "BG3270", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5893.0, + 12968.1 + ], + "IO": "BG3270", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "" + }, + "BG3260@1": { + "A": "0", + "B": "BG3260", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 22355.3, + 13524.1 + ], + "IO": "BG3260", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + } + }, + "schaltschrank_elemente": { + "FC0062": { + "A": "0", + "B": "FC0062", + "C": "20073710081010151939", + "ARTINR": "703001017", + "BESCHR": "Hilfschalter für 3RV2011 ", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5272.5, + 8378.8 + ] + }, + "FC0062@1": { + "IO": "FC0062", + "ID": "", + "VERW": "MS FC0062", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "KENNZEICHNUNG": "=A01+UH01-KF1DI2", + "TEXT-E": "Motor protection switch signaling contact FC0062", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x", + "pos": [ + 4973.9, + 8072.5 + ] + } + }, + "mappings": { + "UC0101": [ + "BG3241@1", + "BG3240@1", + "BG3270@1", + "BG3260@1" + ], + "UH01": [ + "MA0062@1" + ] + }, + "distributors": { + "UC0101": [ + 0.0, + 4162.8 + ], + "UH01": [ + 7000.0, + 16300.0 + ] + }, + "tunnels": { + "TUNNEL1": [ + [ + 9800.0, + 9000.0 + ], + [ + 21282.5, + 9295.2 + ] + ], + "TUNNEL2": [ + [ + 19214.1, + 7471.9 + ], + [ + 18988.2, + 6447.7 + ], + [ + 19219.3, + 6024.1 + ] + ], + "length": { + "TUNNEL1": "3500", + "TUNNEL2": "3500" + } + }, + "racks": { + "Rack_1": [ + [ + 5000.0, + 10000.0, + 0 + ], + [ + 5000.0, + 3500.0, + 0 + ] + ], + "Rack_2": [ + [ + 0.0, + 0.0, + 0 + ], + [ + 0.0, + 3500.0, + 0 + ], + [ + 15000.0, + 3500.0, + 0 + ] + ], + "Rack_3": [ + [ + 1000.0, + 15000.0, + 0 + ], + [ + 12000.0, + 15000.0, + 0 + ] + ], + "Rack_4": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_5": [ + [ + 2800.0, + 10000.0, + 0 + ], + [ + 2800.0, + 3500.0, + 0 + ] + ], + "Rack_6": [ + [ + 9000.0, + 10000.0, + 0 + ], + [ + 9000.0, + 3500.0, + 0 + ] + ], + "Rack_7": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ], + "Rack_8": [ + [ + 2800.0, + 10000.0, + 0.0 + ], + [ + 2800.0, + 15000.0, + 0.0 + ] + ], + "Rack_9": [ + [ + 5000.0, + 10000.0, + 0.0 + ], + [ + 5000.0, + 15000.0, + 0.0 + ] + ], + "Rack_10": [ + [ + 9000.0, + 10000.0, + 0.0 + ], + [ + 9000.0, + 15000.0, + 0.0 + ] + ] + }, + "not_found": { + "missing_distributors": [], + "missing_sensors": [], + "missing_tunnel": [], + "overdefined_tunnel": [ + "TUNNEL2" + ], + "missing_attributes": { + "BX0101": "Nur ein Block und/oder fehlende Attribute: dict_keys(['A', 'B', 'C', 'ARTINR', 'BESCHR', 'MENGE', 'POSITION', 'GRUPPE', 'ETIKETTE', 'AUFLOESE', 'pos'])" + } + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/easyn.json b/testdata/easyn.json new file mode 100644 index 0000000..2b32e65 --- /dev/null +++ b/testdata/easyn.json @@ -0,0 +1,300 @@ +{ + "sensors": { + "BG3240@1": { + "SPS": "1", + "IO": "BG3240", + "VERW": "Jam detector (LP)", + "BEZEICHNUNG": "", + "ARTINR": "722001335", + "ARTIBEZEICHN": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-D": "", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "TEXT-I": "", + "ID": "", + "REALE_POSITION": "x", + "pos": [ + 5493.9, + 5608.9 + ] + }, + "MA0062@1": { + "SPS": "1", + "IO": "MA0062", + "VERW": "TEF-M0000-0,55", + "BEZEICHNUNG": "Motor MA0062", + "ARTINR": "790902001", + "ARTIBEZEICHN": "E-Teile für SEW Motor ASE1 - HAN10ES - BG", + "KENNZEICHNUNG": "=A01+UH01-KF1DQ04", + "TEXT-D": "", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "TEXT-I": "", + "ID": "", + "REALE_POSITION": "x", + "pos": [ + 5272.9, + 7970.2 + ] + }, + "BG3241@1": { + "A": "0", + "B": "BG3241", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 38.8, + 1280.2 + ], + "IO": "BG3241", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3270@1": { + "A": "0", + "B": "BG3270", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5893.0, + 12968.1 + ], + "IO": "BG3270", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "" + }, + "BG3260@1": { + "A": "0", + "B": "BG3260", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 22355.3, + 13524.1 + ], + "IO": "BG3260", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + } + }, + "schaltschrank_elemente": { + "FC0062@1": { + "SPS": "1", + "IO": "FC0062", + "VERW": "MS FC0062", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "ARTINR": "722001335", + "ARTIBEZEICHN": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-D": "", + "TEXT-E": "Motor protection switch signaling contact FC0062", + "TEXT-ES": "", + "TEXT-F": "", + "TEXT-I": "", + "ID": "", + "REALE_POSITION": "x", + "pos": [ + 5272.9, + 8240.2 + ] + } + }, + "mappings": { + "UC0101": [ + "BG3240@1", + "BG3241@1", + "BG3270@1", + "BG3260@1" + ], + "UH01": [ + "MA0062@1" + ] + }, + "distributors": { + "UC0101": [ + -233.4, + 4221.1 + ], + "UH01": [ + 6756.1, + 16291.2 + ] + }, + "tunnels": {}, + "racks": { + "Rack_1": [ + [ + 5000.0, + 10000.0, + 0 + ], + [ + 5000.0, + 3500.0, + 0 + ] + ], + "Rack_2": [ + [ + 0.0, + 0.0, + 0 + ], + [ + 0.0, + 3500.0, + 0 + ], + [ + 15000.0, + 3500.0, + 0 + ] + ], + "Rack_3": [ + [ + 1000.0, + 15000.0, + 0 + ], + [ + 12000.0, + 15000.0, + 0 + ] + ], + "Rack_4": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_5": [ + [ + 2800.0, + 10000.0, + 0 + ], + [ + 2800.0, + 3500.0, + 0 + ] + ], + "Rack_6": [ + [ + 9000.0, + 10000.0, + 0 + ], + [ + 9000.0, + 3500.0, + 0 + ] + ], + "Rack_7": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ], + "Rack_8": [ + [ + 2800.0, + 10000.0, + 0.0 + ], + [ + 2800.0, + 15000.0, + 0.0 + ] + ], + "Rack_9": [ + [ + 5000.0, + 10000.0, + 0.0 + ], + [ + 5000.0, + 15000.0, + 0.0 + ] + ], + "Rack_10": [ + [ + 9000.0, + 10000.0, + 0.0 + ], + [ + 9000.0, + 15000.0, + 0.0 + ] + ] + }, + "not_found": { + "missing_distributors": [], + "missing_sensors": [], + "missing_tunnel": [], + "missing_attributes": {} + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/easyn_positionsdraw.json b/testdata/easyn_positionsdraw.json new file mode 100644 index 0000000..2b32e65 --- /dev/null +++ b/testdata/easyn_positionsdraw.json @@ -0,0 +1,300 @@ +{ + "sensors": { + "BG3240@1": { + "SPS": "1", + "IO": "BG3240", + "VERW": "Jam detector (LP)", + "BEZEICHNUNG": "", + "ARTINR": "722001335", + "ARTIBEZEICHN": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-D": "", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "TEXT-I": "", + "ID": "", + "REALE_POSITION": "x", + "pos": [ + 5493.9, + 5608.9 + ] + }, + "MA0062@1": { + "SPS": "1", + "IO": "MA0062", + "VERW": "TEF-M0000-0,55", + "BEZEICHNUNG": "Motor MA0062", + "ARTINR": "790902001", + "ARTIBEZEICHN": "E-Teile für SEW Motor ASE1 - HAN10ES - BG", + "KENNZEICHNUNG": "=A01+UH01-KF1DQ04", + "TEXT-D": "", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "TEXT-I": "", + "ID": "", + "REALE_POSITION": "x", + "pos": [ + 5272.9, + 7970.2 + ] + }, + "BG3241@1": { + "A": "0", + "B": "BG3241", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 38.8, + 1280.2 + ], + "IO": "BG3241", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + }, + "BG3270@1": { + "A": "0", + "B": "BG3270", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 5893.0, + 12968.1 + ], + "IO": "BG3270", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "" + }, + "BG3260@1": { + "A": "0", + "B": "BG3260", + "C": "20073710081010151939", + "ARTINR": "200000248", + "BESCHR": "STAUABFRAGE[LT] KPL.", + "MENGE": "1", + "POSITION": "0", + "GRUPPE": "9", + "ETIKETTE": "0", + "AUFLOESE": "N", + "pos": [ + 22355.3, + 13524.1 + ], + "IO": "BG3260", + "ID": "", + "VERW": "Jam detector", + "BEZEICHNUNG": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-E": "conveyor full", + "TEXT-ES": "", + "TEXT-F": "", + "SPS": "1", + "REALE_POSITION": "x" + } + }, + "schaltschrank_elemente": { + "FC0062@1": { + "SPS": "1", + "IO": "FC0062", + "VERW": "MS FC0062", + "BEZEICHNUNG": "Meldekontakt Motorschutzschalter FC0062", + "ARTINR": "722001335", + "ARTIBEZEICHN": "Stausensor 1 (ILS-CV M0108)", + "KENNZEICHNUNG": "=A01+UC0101-KF1DI1", + "TEXT-D": "", + "TEXT-E": "Motor protection switch signaling contact FC0062", + "TEXT-ES": "", + "TEXT-F": "", + "TEXT-I": "", + "ID": "", + "REALE_POSITION": "x", + "pos": [ + 5272.9, + 8240.2 + ] + } + }, + "mappings": { + "UC0101": [ + "BG3240@1", + "BG3241@1", + "BG3270@1", + "BG3260@1" + ], + "UH01": [ + "MA0062@1" + ] + }, + "distributors": { + "UC0101": [ + -233.4, + 4221.1 + ], + "UH01": [ + 6756.1, + 16291.2 + ] + }, + "tunnels": {}, + "racks": { + "Rack_1": [ + [ + 5000.0, + 10000.0, + 0 + ], + [ + 5000.0, + 3500.0, + 0 + ] + ], + "Rack_2": [ + [ + 0.0, + 0.0, + 0 + ], + [ + 0.0, + 3500.0, + 0 + ], + [ + 15000.0, + 3500.0, + 0 + ] + ], + "Rack_3": [ + [ + 1000.0, + 15000.0, + 0 + ], + [ + 12000.0, + 15000.0, + 0 + ] + ], + "Rack_4": [ + [ + 18561.2, + 14141.3, + 0 + ], + [ + 23052.9, + 14141.3, + 0 + ] + ], + "Rack_5": [ + [ + 2800.0, + 10000.0, + 0 + ], + [ + 2800.0, + 3500.0, + 0 + ] + ], + "Rack_6": [ + [ + 9000.0, + 10000.0, + 0 + ], + [ + 9000.0, + 3500.0, + 0 + ] + ], + "Rack_7": [ + [ + 20282.5, + 15960.6, + 0 + ], + [ + 20282.5, + 4064.6, + 0 + ] + ], + "Rack_8": [ + [ + 2800.0, + 10000.0, + 0.0 + ], + [ + 2800.0, + 15000.0, + 0.0 + ] + ], + "Rack_9": [ + [ + 5000.0, + 10000.0, + 0.0 + ], + [ + 5000.0, + 15000.0, + 0.0 + ] + ], + "Rack_10": [ + [ + 9000.0, + 10000.0, + 0.0 + ], + [ + 9000.0, + 15000.0, + 0.0 + ] + ] + }, + "not_found": { + "missing_distributors": [], + "missing_sensors": [], + "missing_tunnel": [], + "missing_attributes": {} + }, + "double_ids": {} +} \ No newline at end of file diff --git a/testdata/easyn_todraw.json b/testdata/easyn_todraw.json new file mode 100644 index 0000000..6284861 --- /dev/null +++ b/testdata/easyn_todraw.json @@ -0,0 +1,496 @@ +{ + "kabel": [ + { + "id": "UC0101-BG3240@1", + "s_artinr": "722001335", + "coords": [ + { + "x": -233.4, + "y": 4221.1 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 5608.9 + }, + { + "x": 5493.9, + "y": 5608.9 + } + ], + "length": 8360.7, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3241@1", + "s_artinr": "200000248", + "coords": [ + { + "x": -233.4, + "y": 4221.1 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 0.0, + "y": 1280.2 + }, + { + "x": 38.8, + "y": 1280.2 + } + ], + "length": 3016.5, + "tunnel_indices": [] + }, + { + "id": "UC0101-BG3270@1", + "s_artinr": "200000248", + "coords": [ + { + "x": -233.4, + "y": 4221.1 + }, + { + "x": 0.0, + "y": 3500.0 + }, + { + "x": 2800.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 3500.0 + }, + { + "x": 5000.0, + "y": 5608.9 + }, + { + "x": 5000.0, + "y": 7970.2 + }, + { + "x": 5000.0, + "y": 10000.0 + }, + { + "x": 5000.0, + "y": 12968.1 + }, + { + "x": 5893.0, + "y": 12968.1 + } + ], + "length": 16119.0, + "tunnel_indices": [] + }, + { + "id": "UH01-MA0062@1", + "s_artinr": "790902001", + "coords": [ + { + "x": 6756.1, + "y": 16291.2 + }, + { + "x": 6756.1, + "y": 15000.0 + }, + { + "x": 5000.0, + "y": 15000.0 + }, + { + "x": 5000.0, + "y": 12968.1 + }, + { + "x": 5000.0, + "y": 10000.0 + }, + { + "x": 5000.0, + "y": 7970.2 + }, + { + "x": 5272.9, + "y": 7970.2 + } + ], + "length": 10350.0, + "tunnel_indices": [] + } + ], + "rack_geometry": { + "Rack_1": { + "length": 6.5, + "coordinates": [ + { + "x": 5000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 5608.9, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 7970.2, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_2-1": { + "length": 3.5, + "coordinates": [ + { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + { + "x": 0.0, + "y": 1280.2, + "z": 0.0 + }, + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + } + ] + }, + "Rack_2-2": { + "length": 15.0, + "coordinates": [ + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 15000.0, + "y": 3500.0, + "z": 0.0 + } + ] + }, + "Rack_3": { + "length": 11.0, + "coordinates": [ + { + "x": 1000.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 6756.1, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 12000.0, + "y": 15000.0, + "z": 0.0 + } + ] + }, + "Rack_4": { + "length": 4.5, + "coordinates": [ + { + "x": 18561.2, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 22355.3, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 23052.9, + "y": 14141.3, + "z": 0.0 + } + ] + }, + "Rack_5": { + "length": 6.5, + "coordinates": [ + { + "x": 2800.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_6": { + "length": 6.5, + "coordinates": [ + { + "x": 9000.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 10000.0, + "z": 0.0 + } + ] + }, + "Rack_7": { + "length": 11.9, + "coordinates": [ + { + "x": 20282.5, + "y": 4064.6, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 14141.3, + "z": 0.0 + }, + { + "x": 20282.5, + "y": 15960.6, + "z": 0.0 + } + ] + }, + "Rack_8": { + "length": 5.0, + "coordinates": [ + { + "x": 2800.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 2800.0, + "y": 15000.0, + "z": 0.0 + } + ] + }, + "Rack_9": { + "length": 5.0, + "coordinates": [ + { + "x": 5000.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 12968.1, + "z": 0.0 + }, + { + "x": 5000.0, + "y": 15000.0, + "z": 0.0 + } + ] + }, + "Rack_10": { + "length": 5.0, + "coordinates": [ + { + "x": 9000.0, + "y": 10000.0, + "z": 0.0 + }, + { + "x": 9000.0, + "y": 15000.0, + "z": 0.0 + } + ] + }, + "v-BG3240@1-Rack_1": { + "length": 0.5, + "coordinates": [ + { + "x": 5000.0, + "y": 5608.9, + "z": 0.0 + }, + { + "x": 5493.9, + "y": 5608.9, + "z": 0.0 + } + ] + }, + "v-MA0062@1-Rack_1": { + "length": 0.3, + "coordinates": [ + { + "x": 5000.0, + "y": 7970.2, + "z": 0.0 + }, + { + "x": 5272.9, + "y": 7970.2, + "z": 0.0 + } + ] + }, + "v-BG3241@1-Rack_2-1": { + "length": 0.0, + "coordinates": [ + { + "x": 0.0, + "y": 1280.2, + "z": 0.0 + }, + { + "x": 38.8, + "y": 1280.2, + "z": 0.0 + } + ] + }, + "v-BG3270@1-Rack_9": { + "length": 0.9, + "coordinates": [ + { + "x": 5000.0, + "y": 12968.1, + "z": 0.0 + }, + { + "x": 5893.0, + "y": 12968.1, + "z": 0.0 + } + ] + }, + "v-BG3260@1-Rack_4": { + "length": 0.6, + "coordinates": [ + { + "x": 22355.3, + "y": 13524.1, + "z": 0.0 + }, + { + "x": 22355.3, + "y": 14141.3, + "z": 0.0 + } + ] + }, + "v-UC0101-Rack_2-1": { + "length": 0.8, + "coordinates": [ + { + "x": 0.0, + "y": 3500.0, + "z": 0.0 + }, + { + "x": -233.4, + "y": 4221.1, + "z": 0.0 + } + ] + }, + "v-UH01-Rack_3": { + "length": 1.3, + "coordinates": [ + { + "x": 6756.1, + "y": 15000.0, + "z": 0.0 + }, + { + "x": 6756.1, + "y": 16291.2, + "z": 0.0 + } + ] + } + }, + "errors_routing": [ + { + "unterverteiler": "UC0101", + "sensoren": [ + "BG3260@1" + ] + } + ], + "errors_sensors": [], + "errors_dists": [], + "errors_tunnels": [], + "errors_dists_not_in_layout": [], + "errors_sensors_not_in_layout": [], + "errors_missing_attributes": {} +} \ No newline at end of file