How to Resolve Port Widths/Dimensions Mismatch Error in Simulink Model During Surrogate Optimization ?
10 次查看(过去 30 天)
显示 更早的评论
I am currently facing an issue with a surrogate optimization process in MATLAB, using a Simulink model named 'ConfiguredVirtualVehicleModel'. The process involves running a function 'RunEV', which simulates electric vehicle (EV) performance under various conditions. However, I encounter a specific error during the simulation build process, particularly related to the dimensions of input and output ports in the 'BMSController' subsystem.
The error messages are as follows:
- "Error in port widths or dimensions. 'Output Port 1' of 'BMSController/RT' is a one-dimensional vector with 80 elements."
- "Error in port widths or dimensions. 'Input Port 2' of 'BMSController/Balancing Logic' is a one-dimensional vector with 100 elements."
This mismatch in port dimensions is causing the build procedure for the 'BMSController' to abort. I'm seeking advice on how to effectively resolve this port dimensions mismatch issue within the Simulink model to ensure successful execution of the surrogate optimization process. Any guidance on specific steps or strategies to diagnose and fix this discrepancy in port sizes would be greatly appreciated.
1 个评论
madhan ravi
2023-11-25
you probably should share a picture or model so that it is easier for others to understand the problem. is the outport of RT subsytem connecting to inport of Balancing logic subsystem? and are you doing some calculations inbetween them?Again without seeing your model it's hard to guess.
回答(1 个)
Arka
2023-12-26
编辑:Arka
2023-12-26
I understand you are facing an issue with inconsistent block dimensions in a subsystem in your model.
It is difficult to provide a conclusive answer without taking a look at your model, but here are some steps which might help you resolve this issue:
- Identify the mismatched ports in the "BMSController" subsystem.
- Check for Block Parameters (to which the inports and outports are connected) and see if there are any settings which define the port dimensions
- Examine upstream blocks (ones feeding into "RT" and "Balancing Logic") to see if dimensions are defined there.
Hope this helps.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Manual Performance Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!