Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engine gets stuck in FRESH Status when new episode is started / NoSuchFieldError #18

Closed
rlistle opened this issue May 15, 2022 · 5 comments

Comments

@rlistle
Copy link

rlistle commented May 15, 2022

Hello,
i´m currently trying to develop a warehouse simulation model with reinforcement learning via Alpyne.
I´ve created a simple BaseAlpyneEnv class and a training method with PPO like in the rlpolicy_train.py from the StockManagmentGame example.
During the learning the PPO algorithm resets the model run at the end of an episode by sending the configuration to the model. But instead of starting the next run properly and get into RUNNING state again, the server gets stuck in the wait_for_completion method as the server constantly returns the FRESH state after the configuration was send. The log file looks as following:

StuckInFRESHStatus

I found a post on stack overflow where someone identified the ressource block from the process modeling library as the cause of this issue. I removed the ressource block in my simulation and the reset works like it should.

So i tried to replace this legacy block with the corresponding block from the material handling library (transport fleet). Following from this i also had to replace the rack system with storage system. With that i wasn't even able to start the first episode as i got the following NoSuchFieldError:

NoSuchFieldError

So for some reason the import of the RackPlacement enum is missing in Alpyne, as the simulation works well in AnyLogic.

Is this issue known or is there any workaround so that i can use the ressource block or the storage system as intended?
Any help would be appreciated as i´d like to use Alpyne for my university research :)

Best regards
Rebecca

@t-wolfeadam
Copy link
Owner

Are you able to send the link from SO? Because it's very weird that resource pools would cause that (it's also definitely not a legacy block, though maybe you're thinking of the storage element from the PML).

Regarding the RACK_PLACEMENT_STAND_ALONE error, that may be due to Alpyne not being updated for the latest version of AnyLogic. As a workaround, navigate to where the library files are located for the alpyne server (site-packages\alpyne\resources\alpyne_lib) and replace com.anylogic.engine.jar with the file from your AnyLogic installation (AnyLogic 8.7 <EDITION>\plugins\com.anylogic.engine_8.7.12.202205231048\com.anylogic.engine.jar)

@rlistle
Copy link
Author

rlistle commented May 26, 2022

Sorry, what you mean by "SO"?

Thanks for that hint, now I'm able to use the new storage block, but unfortunately i'm also getting the fresh error now with that setup, doesnt matter if i'm using it in combination with the ressource or the transporter fleet block...

@t-wolfeadam
Copy link
Owner

Sorry, what you mean by "SO"?

StackOverflow

unfortunately i'm also getting the fresh error now with that setup, doesnt matter if i'm using it in combination with the ressource or the transporter fleet block...

If you post the error, I can see if it's related. You can also try SO (🙂) or Support too

@fewoli2794
Copy link

fewoli2794 commented Sep 22, 2022

Hello. Thanks for the great library but I am facing the same problem. From time to time, when the reset function is called, the model goes into the "FRESH" state and does not go to another state.
I don't have resource blocks. There is only a system dynamics model. I can't say what could be causing the error.
Tried to use AnyLogic 8.7.12 and 8.8.0 no change.
As mentioned above, I tried to replace the files com.anylogic.engine.jar and com.anylogic.rl.data.jar. The error has not gone away.
The error can occur on any time, both when creating a model and during run. And also for any number of processes SubprocVecEnv from 1 to 24.

@t-wolfeadam
Copy link
Owner

Closing as this is likely resolved in v1.0.0. Feel free to create a new issue if it remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants