AnswerHub Upload Issue
Our AnswerHub community currently has a bug that prevents you from attaching your model or other files to your questions. AnswerHub is aware of this issue and they are working on a fix. Until we receive their patch, you can upload your models and other files to FlexSim's file share site. Include the file name in your question so that we know which upload to reference.

question

Gabriel I6 avatar image
0 Likes"
Gabriel I6 asked Kavika F answered

Criar objetos a partir de um banco de dados

Sou novo e ainda não tenho muito conhecimento com o FlexSim, estou fazendo uma tentativa de a partir de uma banco de dados que conectei ao flexsim fazer a criação de objetos e plota-los sobre um rack. Fiz um Process flow onde me conecto ao banco de dados e faço os imports de dados para a minha aplicação, o problema maior está sendo na parte da criação dos objetos a partir do banco. Caso vocês conheçam algum tutorial que ensine a como fazer este processo seria de grande valia.

Muito Obrigado.

FlexSim 22.0.0
sql
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Kavika F avatar image
1 Like"
Kavika F answered

Hey @Gabriel I6, if you've already imported your data from a database into a Global Table in the model, then you're almost there! All we need to do now is create the objects inside the rack.

You can read more about how racks work with this overview or with this code documentation on Storage.object.

Racks have dimensions like this:

1659725312910.png

Red numbers denote bays (columns), green numbers denote levels (rows), and blue numbers represent slots (smaller divisions within a bay). If your table has specific bays, levels, and slots, then you can assign those values to labels on an object and have the rack store it where it needs to be.

Here's an example Table:

1659727786918.png

And an example Date Time Source from Process Flow (PF):

1659727837506.png

If you click Edit Arrivals, then the right window will popup and you can fill out the values. Add the number of rows and labels you need. Under each label (i.e., Name, Bay, Level, Slot), you can have the value be from a Global Table. Choose "By Global Table Lookup" for the value:

1659727916130.png

And then you can fill out the right information:

1659727932108.png

"Table" will have the table name; "Row" will have rowNumber (it will match whatever row in the arrival table it is on); "Column" is the number or name of the column.

Once that's set up, you can add a "Create Object" activity in the PF connected to the Source.

1659728190884.png

Notice that under "Create In" that I have a reference to the Rack we made earlier. You can attach a rack by clicking on the dropper next to the option and then click on the rack. I also attached all the labels from the token (i.e., Bay, Level, and Slot) to the flowitem box being made in the rack. That way I can have the rack assign incoming items by their labels.

1659728294878.png

After it's all put together, you get this behavior:

finished-logic.gif

As I step through, each box is created at the bay, level, and slot it has assigned to it.


1659725312910.png (36.4 KiB)
1659727786918.png (12.9 KiB)
1659727837506.png (126.3 KiB)
1659727916130.png (122.6 KiB)
1659727932108.png (15.6 KiB)
1659728190884.png (71.9 KiB)
finished-logic.gif (2.3 MiB)
1659728356350.png (236.9 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.