question

Tamilselvan avatar image
0 Likes"
Tamilselvan asked Jason Lightfoot edited

Task Executer as Fixed resource

Is it possible to change the Task Executer as a fixed resource without changing its property


Thanks in Advance

FlexSim 23.1.1
changing the class
· 5
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·
No, many properties of an object are inherited from its class. Changing the class will also change those properties.

Might I ask what you are trying to achieve, so we can maybe propose a different solution?

0 Likes 0 ·
Tamilselvan avatar image Tamilselvan Felix Möhlmann commented ·
I need to Convert the BasicTE(Task Executer) to a Fixed resource, i actually changed the visual of the Task Executer but i need to change the class also, Property should be changed becuase i am using load and unload time.


0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Tamilselvan commented ·
I still don't understand why you want to use a converted Task Executer.

An additional time at the start and end of a process could easily be implemented by using a Multiprocessor.

0 Likes 0 ·
Show more comments

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

It sounds like you should be controlling the receiving and releasing in the object process flow of a BasicFR.

You could extend the processing time of an object using delayeventsofobject() but know that this delays all events - not just process finish (so if you had message or open input events scheduled, they'd also get delayed).


For those finding this post and wishing to swap one object with another you may find the copyattributes() function useful along with the more commonly used createcopy() - where the later has the option to replace the object which will preserve any pointers to it elsewhere in the model. Some attributes my not transfer successfully where the properties are incompatible.

Connections you may want to move yourself since then you can preserve the ranks at both ends of the connections (another reason to use pointer labels for references to other objects) - the same for Groups and process flow memberships. Here's a rough example for two objects 'old' and 'new':

connections(new).subnodes.clear();
while(connections(old).subnodes.length)
    connections(old).first.up=connections(new);
if (old.attrs["Groups"]){
    new.attrs.assert("Groups");
    while(old.attrs["Groups"].subnodes.length)
        old.attrs["Groups"].first.up=new.attrs["Groups"];
}
while(stored(old).subnodes.length)
    stored(old).first.up=stored(new);



5 |100000

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