Simulink tools to optimally connect different subsystems