Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
MATLAB_R2013a_SimEvents_маг.doc
Скачиваний:
0
Добавлен:
01.05.2025
Размер:
5.48 Mб
Скачать

Open a Model and Libraries

The first steps in building a model are to set up your environment, open a new model (см. ниже Open a Model Window) window, and open the libraries (см. ниже Open SimEvents Libraries) containing blocks.

Open a New Model Window

On the Home tab (раздел инструментов стола Desktop), select File (секция раздела Home) > New > Model f (или Simulink Model). An empty model window opens:

To name the model and save it as a file, select File > Save (или Save As) from the model window's menu. Save the model in your working folder under the file name dd1 (см. выше Overview).

После операции сохранения на поле Current Folder рабочего стола Desktop появится, как показано ранее в Overview, файл dd1.slx, и имя модели в окнах сохранения (Save или Save As) и редактора untitled изменится на dd1:

Open SimEvents Libraries

In the MATLAB Command Window, enter

simeventslib

The main SimEvents library window appears(появятся):

This window contains an icon for each SimEvents library. To open a library and view the blocks it contains, double-click the icon that represents that library. Open Simulink Libraries

In the MATLAB Command Window, enter

simulink

The Simulink® Library Browser opens, using a tree structure to display the available libraries and blocks:

To view the blocks in a library listed in the left pane, select the library name, and the list of blocks appears in the right pane. The Library Browser provides access not only to Simulink blocks but also to SimEvents blocks.

Для работы с разделом SimEvents каталога Libraries в нем необходимо сдвинуть вертикальный ползунок вниз:

For details about the Library Browser, see Simulink Library Browser (директория R2013a>Simulink>Getting Started with Simulink>Simulink User Interface) in the Simulink documentation.

Move Blocks into the Model Window

To move blocks from libraries into the model window, follow these steps:

  1. In the main SimEvents library window (см. выше Open SimEvents Libraries), double-click the Generators icon to open the Generators library. Then double-click the Entity Generators icon to open the Entity Generators sublibrary:

  1. Drag the Time-Based Entity Generator block from the library into the model window (или сделать правый клик блока, из выпадающего меню выбрать Copy, перейти в окно редактора модели и правым кликом из выпадающего меню выбрать Paste):

This might cause(может привести) an informational dialog box to open, with a brief(кратким) description of the difference between entities and events.

  1. In the main SimEvents library window, double-click the Queues icon to open the Queues library:

  1. Drag the FIFO Queue block from the library into the model window.

  2. In the main SimEvents library window, double-click the Servers icon to open the Servers library:

  1. Drag the Single Server block from the library into the model window.

  2. In the main SimEvents library window, double-click the SimEvents Sinks icon to open the SimEvents Sinks library:

  1. Drag the Signal Scope block and the Entity Sink block from the library into the model window.

As a result, the model window looks like the following figure. The model window contains blocks that represent the key processes in the simulation: blocks that generate entities, store(хранят) entities in a queue, serve entities, and create a plot showing relevant(отношение, уместный) data.

ДОПОЛНЕНИЕ к разделу Build a Discrete-Event Model директории R2013a SimEvents Getting Started with SimEvents.

Рассмотрим описания блоков модели dd1.

  • R2013a>SimEvents>Modeling>Entity Generation>Scheduled Generation

Time-Based Entity Generator(время, основанное на построении сущностей)

Generate entities using intergeneration(интергенерационное время — я по-русски это слово не понимаю))) ) times from signal or statistical distribution(распределения)

Library

Generators / Entity Generators

Description

This block is designed to generate entities using intergeneration times that satisfy(удовлетворяют) criteria that you specify. The intergeneration time is the time interval between two successive generation events(разница между двумя успешными событиями).

Intergeneration Times

Value of Generate entities upon(на) Parameter

Distributed according(распределяются в соответствии) to various parameters in the block dialog box (см. ниже Generate entities upon)

Intergeneration time from dialog

Specified using an input signal that the block reads at the start of the simulation and each time it generates an entity (см. ниже Generate entities upon)

Intergeneration time from port t

For details about these options, see Specify Intergeneration Times for Entities (директория R2013a>SimEvents>Getting Started with SimEvents).

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]