PMC Forums  

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

Manufacturing Simulation job shop, flow shop, and assembly line simulation, plus resource utilization, manufacuting efficiency, queuing analysis, implementing kanban

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-03-2011, 10:00 AM
lthoa lthoa is offline
Member
 
Join Date: Jun 2011
Posts: 28
Question Handling If-Then-Else in Hold block

Hi,

I'm using Arena for my project. I have a Hold block of type "Scan for condition". The condition depend on case by case and therefore I would need a If-Then-Else. Any idea on how to do that in the Hold block?

Last edited by lthoa; 08-03-2011 at 10:38 AM. Reason: Clarification
Reply With Quote
  #2 (permalink)  
Old 08-04-2011, 02:32 PM
ewilliams ewilliams is offline
Moderator
 
Join Date: May 2007
Location: Detroit area, Michigan, U.S.A.
Posts: 216
Send a message via Skype™ to ewilliams
Default Hold Block Complex Condition

Within reason, complex conditions can be entered in a Hold block of type Scan for Condition. For example, suppose the entity can proceed if and only if at least one of the following is true: Q1 has fewer than 5 entities in it, or Q2 has fewer than 6 entities in it. The condition would look like: "NQ(Q1) < 5 || NQ(Q2) < 6". To build that, I right-clicked on the gray condition bar and selected Build Expression. To get the "or," I clicked the little "or" box, and that's how the two vertical bars got into the expression. By judicious use of AND, OR, and parentheses, you can build a complex condition.
__________________
E. Williams, PMC
Reply With Quote
  #3 (permalink)  
Old 08-05-2011, 11:13 AM
lthoa lthoa is offline
Member
 
Join Date: Jun 2011
Posts: 28
Default

[QUOTE=ewilliams;8101]Within reason, complex conditions can be entered in a Hold block of type Scan for Condition. For example, suppose the entity can proceed if and only if at least one of the following is true: Q1 has fewer than 5 entities in it, or Q2 has fewer than 6 entities in it. The condition would look like: "NQ(Q1) < 5 || NQ(Q2) < 6". To build that, I right-clicked on the gray condition bar and selected Build Expression. To get the "or," I clicked the little "or" box, and that's how the two vertical bars got into the expression. By judicious use of AND, OR, and parentheses, you can build a complex condition.[/QUOTE]

Thank you for your great help. Arena designer should have put this function somewhere more visible to users.
Reply With Quote
  #4 (permalink)  
Old 08-08-2011, 07:49 AM
Hirotaro Hirotaro is offline
Senior Member
 
Join Date: May 2011
Location: Europe
Posts: 37
Default

Be aware that the condition you have specified in the Hold module will be evaluated only for the first entity in the queue (depending on the queue ranking rule).

This makes a big difference if the condition you have specified is entity-dependant (e.g. uses entity attribute).

Last edited by Hirotaro; 08-17-2011 at 06:59 AM.
Reply With Quote
  #5 (permalink)  
Old 08-15-2011, 02:21 PM
lthoa lthoa is offline
Member
 
Join Date: Jun 2011
Posts: 28
Default

[QUOTE=Hirotaro;8104]Be aware that the condition you have specified in the Hold module will be evaluated only for the first entity in the queue (depending on the queue ranking rule).

This makes a big difference if the condition you specified is entity-dependant (e.g. uses entity attribute).[/QUOTE]

That is unfortunately my case, I do need to use some entity attributes. I wonder how Arena evaluates other entities rather than the first one in the queue.
Reply With Quote
  #6 (permalink)  
Old 08-17-2011, 07:06 AM
Hirotaro Hirotaro is offline
Senior Member
 
Join Date: May 2011
Location: Europe
Posts: 37
Default

One option might be to use the queue ranking in the queue that precedes the scan block or the queue associated with the HOLD module. By specifying queue ranking with use of an expression (include entity attributes) you can place the suitable entities at the beginning of the queue.
Reply With Quote
Reply

Tags
condition, hold block, if-then-else

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 11:10 AM.



Content Relevant URLs by vBSEO 3.0.0