PMC Forums  

Go Back   PMC Forums > Simulation > Simulation Analysis
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Simulation Analysis simulation software (Arena, AutoMod, Enterprise Dynamics, ExtendSim, PlantSim, ProModel, SIMUL8, WITNESS), input and output analysis, experimental design, optimization, simulation model verification and validation

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-19-2011, 05:12 AM
Hirotaro Hirotaro is offline
Senior Member
 
Join Date: May 2011
Location: Europe
Posts: 37
Default Attribute assignment to the entity (Arena)

Consider that you are using 'Separate' in your model to create a copy (E2) of the original entity (E1). Afterwards E1 and E2 follow different paths (f.ex. they are going into two different submodels). At some point in your model, you want to change the value of the E1 attrubute (f.ex. aAttribute == 0 into aAttribute == 1) given that E2 had finished the process it has been directed to. The trick is that E1 can be at the different locations in the model so you cannot use MATCH block in all of them in a straight forward manner.

Is it possible to do this assignment? If yes, how?

I was considering using VBA block together with a pointer to the entity. The problem is that I don't know other method of finding a pointer to the given entity location, different that the ActiveEntity Method.

Any ideas?
Reply With Quote
  #2 (permalink)  
Old 05-19-2011, 10:16 AM
ewilliams ewilliams is offline
Moderator
 
Join Date: May 2007
Location: Detroit area, Michigan, U.S.A.
Posts: 218
Send a message via Skype™ to ewilliams
Default Attributes work

I would consider defining another attribute to be used solely for the purpose of matching. An entity can have as many attributes as needed.
__________________
E. Williams, PMC
Reply With Quote
  #3 (permalink)  
Old 05-23-2011, 03:34 AM
Hirotaro Hirotaro is offline
Senior Member
 
Join Date: May 2011
Location: Europe
Posts: 37
Default

I do not think I have got it. Can you please be more specific about the way you would use another attribute.
Reply With Quote
  #4 (permalink)  
Old 05-23-2011, 11:25 PM
pqxx pqxx is offline
Member
 
Join Date: May 2011
Location: china
Posts: 10
Send a message via MSN to pqxx
Default

did you ever try signal and hold model?
Reply With Quote
  #5 (permalink)  
Old 05-24-2011, 05:55 AM
Hirotaro Hirotaro is offline
Senior Member
 
Join Date: May 2011
Location: Europe
Posts: 37
Default

Signal and Hold would be perfect solution if one can be assured that E1 is already in a Hold module when E2 is sending a signal. It is not the case in the process I am modeling.

Last edited by Hirotaro; 06-10-2011 at 03:59 AM.
Reply With Quote
  #6 (permalink)  
Old 09-25-2011, 09:57 PM
qrst579 qrst579 is offline
Banned
 
Join Date: Sep 2011
Posts: 12
Talking Bella. Don't

existing," he [url=http://www.ugamegold.com]wow gold[/url] hissed. I was dumfounded and [url=http://www.wowgold361.com]buy wow gold[/url] inattentive as the warning language [url=http://www.goldinstore.com]buy wow gold[/url] came in Prince's voice [url=http://www.goldmvp.com]cheap wow gold[/url] again, when I wasn't straight scared. "Soundless [url=http://www.runescape.com]rs gold[/url] now, Bella. Don't .
Reply With Quote
  #7 (permalink)  
Old 11-16-2011, 12:22 PM
lthoa lthoa is offline
Member
 
Join Date: Jun 2011
Posts: 28
Default

[QUOTE=Hirotaro;8000]Consider that you are using 'Separate' in your model to create a copy (E2) of the original entity (E1). Afterwards E1 and E2 follow different paths (f.ex. they are going into two different submodels). At some point in your model, you want to change the value of the E1 attrubute (f.ex. aAttribute == 0 into aAttribute == 1) given that E2 had finished the process it has been directed to. The trick is that E1 can be at the different locations in the model so you cannot use MATCH block in all of them in a straight forward manner.

Is it possible to do this assignment? If yes, how?

I was considering using VBA block together with a pointer to the entity. The problem is that I don't know other method of finding a pointer to the given entity location, different that the ActiveEntity Method.

Any ideas?[/QUOTE]

Just run into this thread, I guess you already have solution for your problem. Anyway, my rough idea is that you create a variable e.g, Flag which is equal to 0 before E2 finish the process and 1 after that (i.e. Flag is set to 1 by E2 after it finishes). In every relevant Assign block that E1 run into, just add one assignment aAttribute = Flag. The idea is not nice nor scalable but I think it may solve your problem in particular if there's not too many Assign blocks for E1 in your problem.
Reply With Quote
  #8 (permalink)  
Old 11-16-2011, 01:53 PM
Hirotaro Hirotaro is offline
Senior Member
 
Join Date: May 2011
Location: Europe
Posts: 37
Default

Variables can be indeed very useful in modeling this situation. Nevertheless, having thousands of successive entities in your model requires a very big variable. Therefore I was interested in better solution.
Reply With Quote
  #9 (permalink)  
Old 11-16-2011, 04:58 PM
lthoa lthoa is offline
Member
 
Join Date: Jun 2011
Posts: 28
Default

For the problem of big number of entities you can use a 1D array variable says Flag(MaxSize). Then you have two attributes, aOwnIndex and aReferenceIndex. For the entities E1 and E2 in your example, the aOwnIndex of E1 is 1, of E2 is 2 and the aReferenceIndex of E1 is 2, of E2 is e.g 3. Then when the E2 finish, set the Flag(aOwnIndex) to 1 and in every Assign block for E1 (anyway you have to set the aAttribute somewhere) you set aAttribute = Flag(aReferenceIndex).

However there are still two big problems:

First we have to decide what is the MaxSize? Maybe a good candidate is the (estimated) maximum entities that can be in the system?

Second, how you index the entities, i.e. how you assign aOwnIndex and
aReferenceIndex to each entity? I'm not sure if we can come up with nice solution here. In your example, we can have aOwnIndex = NumberOfEntitiesCreatedSoFar module MaxSize and aReferenceIndex = (aOwnIndex + 1) module MaxSize (i.e, we use circular reference, remember to reset the Flag(aReferenceIndex) in order to reuse it, e.g before you dispose E1, set Flag(aReferenceIndex) to 0)

Anyway, it would be much better if we can avoid using variable and set the attribute in every Assign block.

Last edited by lthoa; 11-16-2011 at 05:07 PM.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Off
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:00 PM.



Content Relevant URLs by vBSEO 3.0.0