How to Resolve Port Widths/Dimensions Mismatch Error in Simulink Model During Surrogate Optimization ?

10 visualizzazioni (ultimi 30 giorni)
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:
  1. "Error in port widths or dimensions. 'Output Port 1' of 'BMSController/RT' is a one-dimensional vector with 80 elements."
  2. "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 Commento
madhan ravi
madhan ravi il 25 Nov 2023
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.

Accedi per commentare.

Risposte (1)

Arka
Arka il 26 Dic 2023
Modificato: Arka il 26 Dic 2023
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:
  1. Identify the mismatched ports in the "BMSController" subsystem.
  2. Check for Block Parameters (to which the inports and outports are connected) and see if there are any settings which define the port dimensions
  3. Examine upstream blocks (ones feeding into "RT" and "Balancing Logic") to see if dimensions are defined there.
Hope this helps.

Categorie

Scopri di più su Manual Performance Optimization in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by