question

Mohamed Eldakroury avatar image
0 Likes"
Mohamed Eldakroury asked Logan Gold commented

Enable/disable control points in different scenarios

Hello,

What is the best way to enable/disable, or create and remove control points using parameters?

My objective is to create multiple scenarios of my layout, each scenario have a couple of extra control points on the same AGV network. This enables me to compare scenarios side by side.


FlexSim 24.2.0
agvcontrolpointexperimeter
· 1
5 |100000

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

Hi @Mohamed Eldakroury, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Mohamed Eldakroury commented

You can create and remove control points according to table definitions using:

 Table.query("INSERT INTO Objects() (<propertynames>)  SELECT <propertynames> FROM $1", table)  

as described here where you replace <propertynames> with those needed for Control Points. To see what properties those are, just open a Properties table from the Properties panel for a control point or look at the list of properties in the documentation.

1724951644312.png

Similarly you can also remove them with a similar sql clause : "DELETE FROM Objects() WHERE...."

The place to do this is probably best within the OnSet of a Parameter (since that fires before the model is reset). The parameter could allow you to switch between tables defining the control points you want to use.

There could be complications if, for example, your dynamically added/removed control points are connected to stations/agvs - you may need to account for that in your code.

If you just need to relocate control points then you can use the UPDATE sql clause and you can create your scenarios by moving them manually and then recording the properties tables that you then switch to via the parameters.


1724951644312.png (12.6 KiB)
· 1
5 |100000

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

Mohamed Eldakroury avatar image Mohamed Eldakroury commented ·
Thank you, I will read the documentation and give it a shot.
1 Like 1 ·