Change the queue property with code

Change the queue property with code

wang_z2
Not applicable
161 Views
4 Replies
Message 1 of 5

Change the queue property with code

wang_z2
Not applicable

hi !

In my simple model,I want change the queue property with code in user command.

I want trigger the user command in suitable time to make the queue changed.

Now, I want change the "Output",set "send to port" as "Push to TaskList"

Due to the large number of queues, it will save a lot of time if I can set the queue in batches with code.

I looked at the structure of “Output”, trying to find a breakthrough, I found the corresponding code written in the location of the instruction, but I don't know how to implement this function in the “User Command”.

17847-15523571781.jpg17848-222.jpg

Can you give me a example code?You can write in this simple model.code-to-change-the-queue-property.fsm

0 Likes
Accepted solutions (1)
162 Views
4 Replies
Replies (4)
Message 2 of 5

joerg_vogel_HsH
Mentor
Mentor

@Wang Z2, are you still building your model? Or do you want to change a running model dynamically? Case 1: There is another approach to accomplish your task without source code. You can copy attributes, variables and triggers from a highlighted object to several selected objects by a tool. Case 2: is different!

0 Likes
Message 3 of 5

_1138272015
Not applicable

@Wang Z2 ,13-1-17849-code-to-change-the-queue-property.fsmI attach a sample model, Hope this works for you.

Message 4 of 5

wang_z2
Not applicable

I'm still building my model,I'll try your way.Thanks

by the way

I am building a parametrically driven model. That is: input parameters to generate the required model. Now, the entity and the simple A-key 、S-key connection between the entity has been completed. I started to change the entity properties and let the model run at the logical level。

For a simple example, let's say I am working on a model that can automatically generate an AS/RS system. I only need to enter the shelf size in the GUI interface, click on the button to generate the entity, and click another button to trigger user command and implement the logical layer connection.(like:change the queue or others' properties)

May I ask if this idea is feasible? Since I don't know C++, I can't program in C++. At present, I can only think of this method.

Because China’s learning resources are limited, and my English is not very good, it’s a little hard to learn Flexsim,thank you for your continued response and help, and I have gained a lot.

0 Likes
Message 5 of 5

joshua_s
Not applicable
Accepted solution

@Wang Z2

That idea is not only feasible, but is used by many of our users. The only problem is that it does require some code to implement which is based off of C++ and functions built into FlexSim, but doesn't require alot of code depending on what you are doing.

You can begin by creating a dashboard and trying out these options.

18051-pic1.png

Then you can link them to global variables or have them run scripts with press or toggle events. You have to toggle the edit mode button on the side to get them to run after you have built them.

Here is an example model, You can change the values in the table, then hit the Rebuild button and the model will adjust to the values in the table. The code is rather complex if you haven't coded before, but it's just there to show you what it is capable of.

scalable-agv-rack-system-2.fsm

0 Likes