Nested conditionals

23 views
Skip to first unread message

dave...@gmail.com

unread,
Jul 21, 2026, 2:09:32 PM (3 days ago) Jul 21
to JaamSim Users Discussion Group
Having some trouble figuring out how to do a nested conditional. Essentially, I want Queue7 to fill up before I switch the branch to #2. Fill up Queue8, then switch the branch to fill Queue9, then back to 1. 

Here is my existing conditional. It fills Queue7, moves to Queue8, but then doesn't fill Queue9. Any ideas?

'[Queue7].QueueLength == 2 ? 2 : ([Queue8].QueueLength == 2 ? 3 : ([Queue9].QueueLength == 2 ? 1 : 1))'


Cristiano Silva

unread,
Jul 21, 2026, 2:32:33 PM (3 days ago) Jul 21
to dave...@gmail.com, JaamSim Users Discussion Group
It might be interesting to use the expressionthreshold.

Atenciosamente,
Cristiano Luís Turbino de França e Silva
==============================
                      GNU / Linux
    ,                ,       /       .-.
   /                  \     /      (e e)
  ((__-^^-,-^^-__))   /     _.`V'._
    `-_---' `---_-'      /    //~~W~~\\
  <__|o ` 'o|__>   /    //,           ,\\
        \   `  /       /    // |            | \\
         ):  :(      /      \) |            | (/
        :o_o:    /           \           /
          "-"    /              `w -  w'


--
You received this message because you are subscribed to the Google Groups "JaamSim Users Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jaamsim-user...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/jaamsim-users/3145767d-0b59-4d3a-8f01-cff23d927b0fn%40googlegroups.com.

dave...@gmail.com

unread,
Jul 21, 2026, 2:46:10 PM (3 days ago) Jul 21
to JaamSim Users Discussion Group
Tell me more Cristiano. I need 3 different states for the gate. Once the first queue fills up, switch to the second gate, etc. Not sure how to do that with expressionthreshold

Cristiano Silva

unread,
Jul 21, 2026, 2:54:12 PM (3 days ago) Jul 21
to dave...@gmail.com, JaamSim Users Discussion Group
Please watch my video if you can; it has English subtitles. I will try to send you a template later. Thank you very much.

https://www.youtube.com/watch?v=-oXFKgRJFUs&list=PLRvwRusArl39IYHrsQRj89onSVvFeWIIP&index=5

Atenciosamente,
Cristiano Luís Turbino de França e Silva
==============================
                      GNU / Linux
    ,                ,       /       .-.
   /                  \     /      (e e)
  ((__-^^-,-^^-__))   /     _.`V'._
    `-_---' `---_-'      /    //~~W~~\\
  <__|o ` 'o|__>   /    //,           ,\\
        \   `  /       /    // |            | \\
         ):  :(      /      \) |            | (/
        :o_o:    /           \           /
          "-"    /              `w -  w'

Klaus Holstein

unread,
Jul 21, 2026, 3:24:22 PM (3 days ago) Jul 21
to jaamsi...@googlegroups.com
Hello,

You do not need the brackets.
Just delete them.
Best Regards,
Klaus
Mit freundlichen Grüßen,
Klaus Holstein

Cristiano Silva

unread,
Jul 22, 2026, 7:14:20 AM (2 days ago) Jul 22
to dave...@gmail.com, JaamSim Users Discussion Group
Please send me the attached template, if possible. Thank you.

Atenciosamente,
Cristiano Luís Turbino de França e Silva
==============================
                      GNU / Linux
    ,                ,       /       .-.
   /                  \     /      (e e)
  ((__-^^-,-^^-__))   /     _.`V'._
    `-_---' `---_-'      /    //~~W~~\\
  <__|o ` 'o|__>   /    //,           ,\\
        \   `  /       /    // |            | \\
         ):  :(      /      \) |            | (/
        :o_o:    /           \           /
          "-"    /              `w -  w'

On Tue, Jul 21, 2026 at 3:46 PM dave...@gmail.com <dave...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages