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 ·
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? 

Object current = ownerobject(c);
Object item = param(1);
int port = param(2);

if (current.stats.input.value %2 == 0){ // ************* PickOption Start ************* //
/***popup:SetCenterLoc*/
/***tag:name*//**Set Center Location*/
/***tag:selectedGroup*//**3*/
/***tag:selectedIcon*//**6*/
Object involved = /***tag:object*//**/item/**/;
double x = /***tag:nx*//**/4/**/;
double y = /***tag:ny*//**/-3/**/;
double z = /***tag:nz*//**/1/**/;
double xFactor = /***tag:xF*//**/0.50/**/;
double yFactor = /***tag:yF*//**/0.50/**/;
double zFactor = /***tag:zF*//**/0.00/**/;
/***tag:command*//**/setloc(involved, x, y, z, xFactor, yFactor, zFactor)/**/;
} // ******* PickOption End ******* //
else{ // ************* PickOption Start ************* //
/***popup:SetCenterLoc*/
/***tag:name*//**Set Center Location*/
/***tag:selectedGroup*//**3*/
/***tag:selectedIcon*//**6*/
Object involved = /***tag:object*//**/item/**/;
double x = /***tag:nx*//**/10/**/;
double y = /***tag:ny*//**/-3/**/;
double z = /***tag:nz*//**/1/**/;
double xFactor = /***tag:xF*//**/0.5/**/;
double yFactor = /***tag:yF*//**/0.5/**/;
double zFactor = /***tag:zF*//**/0/**/;
/***tag:command*//**/setloc(involved, x, y, z, xFactor, yFactor, zFactor)/**/;
} // ******* PickOption End ******* //
0 Likes 0 ·