set simulation time depend on condition (simulink)

To run a typical Simulink model, enter the simulation time.
However, our simulink model (Ship Maneuvering Model) inputs unlimited simulation time ( ex. 99999999)
After the simulation starts, if the output of the model satisfies any condition [if(the output function direction of the model == one direction of the target)], the next step is taken.
If a new target direction is set in the model and the output function direction of the model coincides with the target direction, the next step is taken. (iteration . . . )
All of this should be done within a sim ("SimulationModel.slx") command.
When I try to design like this, will there be any necessary blocks or logic in the Simulink model? ( stop block, assertion block, . . . etc)
please help me !...

回答 (1 件)

Roman Mnev
Roman Mnev 2019 年 1 月 25 日

0 投票

First, you can set stop time to "inf".
Second, you need a Stop block.

カテゴリ

ヘルプ センター および File ExchangeModeling についてさらに検索

製品

質問済み:

2019 年 1 月 22 日

回答済み:

2019 年 1 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by