Commit Graph

18 Commits

Author SHA1 Message Date
Miguel 88c8eea35e Implement comprehensive tests and solutions for TSNet division by zero issues, including extraction of results, configuration validation, and timestep stability demonstrations. Added multiple test scripts to ensure robustness and correctness of the simulation, along with detailed documentation of identified problems and their resolutions. 2025-09-12 02:16:27 +02:00
Miguel 1df7a24140 Implement threading optimizations and error handling improvements in MCP server and hydraulic components
- Replaced blocking Dispatcher.Invoke() calls with non-blocking Dispatcher.BeginInvoke() in MainViewModel, osBase, and ObjectManipulationManager to enhance responsiveness during simulations.
- Added checks for Dispatcher availability to prevent crashes during application shutdown.
- Implemented comprehensive error handling with try-catch blocks and logging for better debugging.
- Corrected hydraulic connection logic to use component names instead of IDs for better accuracy in osHydPump.
- Introduced methods for safe Dispatcher invocation with timeout handling in MCPServer.
- Enhanced debug logging for better traceability of errors and server status.
- Documented threading improvements and their impact on MCP stability in new markdown files.
2025-09-11 10:28:26 +02:00
Miguel 5727c1b376 Refactor TSNet test suites and migrate CtrEditor MCP to CPython
- Updated `tsnet_direct_tests.py` to improve code formatting and consistency.
- Enhanced `tsnet_edge_test_suite.py` with better error handling and logging.
- Refactored `tsnet_mcp_test_suite.py` for improved structure and clarity.
- Revised `tsnet_simple_verification.py` for better readability and error checking.
- Added comprehensive migration summary for CtrEditor from IronPython to CPython.
- Introduced new test scripts (`test_debug.py`, `test_mcp.py`, `test_python.py`) for validating CPython integration.
- Ensured all tests are compatible with the new CPython environment and improved performance metrics.
2025-09-11 07:54:52 +02:00
Miguel d8c03fdc39 Refactor project structure and remove unused files
- Updated CtrEditor.code-workspace to correct folder paths.
- Removed detailed analysis of critical issues from MemoriadeEvolucion.md.
- Deleted README_Canvas_Reference.md as it was no longer needed.
- Refactored ScreenshotManager.cs to improve bounding box calculations and remove auto-zoom functionality.
- Deleted analyze_canvas_screenshot.py and generate_canvas_reference.py scripts as they are no longer in use.
- Removed requirements.txt since associated scripts were deleted.
2025-09-10 11:10:55 +02:00
Miguel fa637eb323 fix: Mejorar la lógica de captura en ScreenshotManager para manejar posiciones relativas y errores de VisualBrush 2025-09-08 22:52:57 +02:00
Miguel 369bcce3d7 feat: Implement circular debug log system with pattern matching and statistics retrieval 2025-09-08 22:49:24 +02:00
Miguel 59c1c0cd3e Refactor code structure for improved readability and maintainability 2025-09-08 22:10:19 +02:00
Miguel 4ef265705c feat: Enhance base64 generation logic in ScreenshotManager with conditions and skip reasons 2025-09-08 21:43:03 +02:00
Miguel 3153f38068 Implement ScreenshotManager for enhanced screenshot functionality
- Added ScreenshotManager class to centralize screenshot capturing logic.
- Implemented methods to capture specific objects, areas, and full canvas.
- Updated MCPServer to utilize ScreenshotManager for taking screenshots.
- Introduced new API method to take screenshots of specific objects by their IDs.
- Enhanced error handling and result reporting for screenshot operations.
- Refactored TakeScreenshot and added TakeObjectScreenshot methods in MCPServer.
- Updated analyze_screenshots.py to use a relative path for screenshots directory.
- Removed outdated test script for Python execution.
2025-09-08 21:32:04 +02:00
Miguel 181a3db41c Implement Python execution support and enhance hydraulic component management
- Added Python execution capabilities via MCPServer, allowing scripts to interact with CtrEditor objects.
- Introduced methods for executing Python code and retrieving help on available objects.
- Updated osHydPump and osHydTank classes to remove direct hydraulic object management, leveraging the new unified hydraulic simulation system.
- Created documentation for Python integration and usage examples.
- Developed a script for analyzing screenshots to detect circular objects and assess their centering.
- Implemented tests for Python execution functionality to ensure proper integration and response handling.
- Addressed potential freeze issues in MCPServer and StateManager by improving async handling and cancellation support.
2025-09-08 11:52:06 +02:00
Miguel 3c9c0e2479 Refactor hydraulic components: Simplify pump and tank logic, remove unused properties, and enhance flow calculations
- Updated osHydPump.cs to replace NPSH and cavitation calculations with a simpler flow check.
- Modified pump status display to indicate whether the pump is pumping or not.
- Streamlined fluid updates in osHydPump.cs to only occur when there is flow.
- Refactored osHydTank.cs to consolidate flow handling and remove unnecessary three-section logic.
- Adjusted UI elements in ucHydTank.xaml to reflect changes in flow representation and removed deprecated visual indicators.
- Enhanced DebugConsoleServer.cs to improve client connection handling with timeout and error management.
2025-09-07 17:06:15 +02:00
Miguel 322d335edd feat: Add detailed status properties and margin converter for tank sections in hydraulic components 2025-09-06 23:09:55 +02:00
Miguel 5c03e19207 Implementación del sistema de pruebas hidráulicas con timing preciso y generación de resultados en formato JSON. Se agregaron clases para tanques, bombas y tuberías, junto con métodos para gestionar la simulación y realizar pruebas de equilibrio de flujo. Se documentaron resultados de pruebas y se identificaron mejoras necesarias en la visualización de datos. Se creó un resumen completo de las pruebas realizadas y se actualizaron las recomendaciones para futuras mejoras del sistema. 2025-09-06 22:18:26 +02:00
Miguel 10a1617833 feat: Implement Debug Console Server for enhanced logging and remote monitoring 2025-09-06 19:49:03 +02:00
Miguel f07e7895f6 Add MCP Server and Proxy for CtrEditor with LLM Integration
- Implemented MCPServer class for TCP communication, allowing remote control of CtrEditor simulations.
- Added JSON-RPC methods for object management, simulation control, and screenshot functionality.
- Created a comprehensive LLM usage guide in MCP_LLM_Guide.md for interacting with the MCP server.
- Developed start_mcp_proxy.bat and start_mcp_proxy.py scripts to facilitate connection between GitHub Copilot and the MCP server.
- Enhanced error handling and logging throughout the MCP server and proxy scripts.
2025-09-06 17:05:59 +02:00
Miguel 736068619a Agregado de PaddleOCR y correccion de TagPattern 2025-03-27 14:50:51 +01:00
Miguel 633cd71d00 Mejorado la descripcion de las extracciones de Tag con Patrones 2025-02-17 13:04:21 +01:00
Miguel 8573d942c4 Agregado exportacion a Excel desde la ventana de Analizar la Matriz. Agregada la correccion de las columnas de descripcion. 2025-02-15 22:38:12 +01:00