question

Afonso Silva avatar image
0 Likes"
Afonso Silva asked Afonso Silva commented

How can I have 2 flowitems on the same processor but in different locations?

I want to have 2 flowtimens on the same processor at the same time but each one at the far end of the processor. I dont want to animate them, only to have them in different positions.

FlexSim 24.0.2
processorflowitemposition
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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Afonso Silva commented

Properties pane Processor: deactivate option Animate Items

Set maximum content to two.

On Entry event create an attribute of 2 states a location for each item. [Trigger or Process Flow].

Condition structure statements if or switch structures

For increasing statistical values you can use an modulus operator of two %2. It is an interger division returning an integer rest like current.stats.input.value where current is a reference to your processor.

If you want, you can use static values of item rank.

A location is a permanent value and stays until it is written anew.

Locations can you set by components of x, y, z or in whole as a Vec3 Class property created by Vec3 constructor.

· 2
5 |100000

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

Afonso Silva avatar image Afonso Silva commented ·

Thank you! It helped a lot!

0 Likes 0 ·
Afonso Silva avatar image Afonso Silva commented ·
  1. Currently I have this code. How can I make it in way that the next flow item goes to the available location instead of going always to the "else" location?
  2.  
  3. Object current = ownerobject(c);
  4. Object item = param(1);
  5. int port = param(2);
  6.  
  7. if (current.stats.input.value %2 == 0){ // ************* PickOption Start ************* //
  8. /***popup:SetCenterLoc*/
  9. /***tag:name*//**Set Center Location*/
  10. /***tag:selectedGroup*//**3*/
  11. /***tag:selectedIcon*//**6*/
  12. Object involved = /***tag:object*//**/item/**/;
  13. double x = /***tag:nx*//**/4/**/;
  14. double y = /***tag:ny*//**/-3/**/;
  15. double z = /***tag:nz*//**/1/**/;
  16. double xFactor = /***tag:xF*//**/0.50/**/;
  17. double yFactor = /***tag:yF*//**/0.50/**/;
  18. double zFactor = /***tag:zF*//**/0.00/**/;
  19. /***tag:command*//**/setloc(involved, x, y, z, xFactor, yFactor, zFactor)/**/;
  20. } // ******* PickOption End ******* //
  21. else{ // ************* PickOption Start ************* //
  22. /***popup:SetCenterLoc*/
  23. /***tag:name*//**Set Center Location*/
  24. /***tag:selectedGroup*//**3*/
  25. /***tag:selectedIcon*//**6*/
  26. Object involved = /***tag:object*//**/item/**/;
  27. double x = /***tag:nx*//**/10/**/;
  28. double y = /***tag:ny*//**/-3/**/;
  29. double z = /***tag:nz*//**/1/**/;
  30. double xFactor = /***tag:xF*//**/0.5/**/;
  31. double yFactor = /***tag:yF*//**/0.5/**/;
  32. double zFactor = /***tag:zF*//**/0/**/;
  33. /***tag:command*//**/setloc(involved, x, y, z, xFactor, yFactor, zFactor)/**/;
  34. } // ******* PickOption End ******* //
0 Likes 0 ·