Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Issue with ExitforNextEnteringMU

Valued Contributor
Valued Contributor

Ok and the p is just basically an arbitrary variable?

Re: Issue with ExitforNextEnteringMU

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

yes, with the parameter p you can access the passing value (e.g. entrance number of the converter)

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Issue with ExitforNextEnteringMU

Valued Contributor
Valued Contributor
Ok I just noticed another issue with this new code. Your change worked to make it function. However, now entities are stopping at the entrance to the converter that this code is running on.

The code is set as the exit strategy to the converter. The first entity moves through the converter correctly, but the next entity gets blocked on the converter's predecessor.

Re: Issue with ExitforNextEnteringMU

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you need to use ?.exitForNextEnteringMU for selecting the exit for the converter

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Issue with ExitforNextEnteringMU

Valued Contributor
Valued Contributor
Well crap. I'm right back to where I started basically. Same error, slightly different code. Are there any other ways to define the exit behavior of a converter other than exitForNextEnteringMU without assigning a bunch of attributes to the MUs?

Re: Issue with ExitforNextEnteringMU

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

can you post your model?

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Issue with ExitforNextEnteringMU

Valued Contributor
Valued Contributor

Yeah it's a bit of a mess, but I'll post it. 

To get you aquainted. The problem is happening about a third of the way down the line at the Airboards. Most of my methods are housed in the information flow. AB_LT1 is junk, that is the old code that I had housed incase I needed it. AB_LT is the new code I'm working on, and Method1 is just something I have been using for testing.

 

My goal is to have LT8 divert entities to Airboard1 until it has two entities working, then push entities down to airboard 2 which also has a capacity of 2. I want LT9 to push the entities coming out of Airboard 1 to Line57 and LT10, but that isn't my problem right now. 

My problem right now is when the entities hit LT9 they throw that object error. I may not respond after this till tomorrow. It is almost the end of my work day. I appreciate your help if you don't hear from me today I'll be back tomorrow.

Highlighted

Re: Issue with ExitforNextEnteringMU

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

the control is also assigned as exit control in LT9, remove the method there and it works

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Issue with ExitforNextEnteringMU

Valued Contributor
Valued Contributor
Of course. I thought I had deleted that, but obviously not. I figured it was something stupid that I had missed like that. Thank you

Re: Issue with ExitforNextEnteringMU

Valued Contributor
Valued Contributor

Ok this section of my simulation once again doesn't like my code. I removed the method from the exit control so that it is only running as an exit strategy. This made the code work as you mentioned. However, I expanded the code to try to get it to do most of what I want it to do, and suddenly I am getting a familiar, but yet different error.

 

The error is occuring in the same method: AB_LT, line 3. The error is: "Wrong number of parameters in Class: 1 passed, 0 expected. Are you able to see what I have done wrong?