Inquiry: Is the Non-Decreasing Behavior of inventory_input in SCML Simulation Design Intentional? #175
Replies: 2 comments 3 replies
-
|
Dear Sakaguchi-sanThank you for raising this issue. We will go back and check the logic and return to you with the explanation (most likely the inventory is controlled by two factors). Please wait a little.Best regardsyasserSent from my iPhoneOn May 23, 2025, at 0:49, Sota-Sakaguchi ***@***.***> wrote:
Dear @yasserfarouk
My name is Sota Sakaguchi, joining SCML(std) 2025.
Hi, thank you so much for maintaining this project — I really appreciate all your work.
I’m currently trying to better understand how inventory_input is updated in the simulation, and I came across a part of the code in world.py (line 1871) that made me a bit confused.
It seems that the line:
remaining_in = max(0, self._input_quantity[aid] - producible) self._inventory_input[aid] += remaining_in
only adds any unused portion of input_quantity to inventory_input, but never subtracts from it. So if an agent consumes from its inventory in order to produce (i.e., input_quantity < producible), this consumption isn’t reflected in the inventory — it never decreases.
As a result, inventory_input appears to always either increase or remain the same over time, which might explain why the input inventory graph keeps increasing even when production occurs.
I might be misunderstanding the logic here — if so, I’m really sorry for the confusion. But I just wanted to ask if this is the intended behavior, or whether the consumption from inventory should also be accounted for in this part.
Thanks again for your time and for reading this!
Best Regards,
Sota Sakaguchi
Nagoya Institute of Technology University
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Sota-Sakaguchi
-
|
We checked the logic. It is intentional but the names may be confusing. self._input_quantity[contract.annotation["buyer"]] += bought
This is why Does this make sense? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear @yasserfarouk
My name is Sota Sakaguchi, joining SCML(std) 2025.
Hi, thank you so much for maintaining this project — I really appreciate all your work.
I’m currently trying to better understand how inventory_input is updated in the simulation, and I came across a part of the code in world.py (line 1871) that made me a bit confused.
It seems that the line:
remaining_in = max(0, self._input_quantity[aid] - producible) self._inventory_input[aid] += remaining_inonly adds any unused portion of input_quantity to inventory_input, but never subtracts from it. So if an agent consumes from its inventory in order to produce (i.e., input_quantity < producible), this consumption isn’t reflected in the inventory — it never decreases.
As a result, inventory_input appears to always either increase or remain the same over time, which might explain why the input inventory graph keeps increasing even when production occurs.
I might be misunderstanding the logic here — if so, I’m really sorry for the confusion. But I just wanted to ask if this is the intended behavior, or whether the consumption from inventory should also be accounted for in this part.
Thanks again for your time and for reading this!
Best Regards,
Sota Sakaguchi
Nagoya Institute of Technology University
Beta Was this translation helpful? Give feedback.
All reactions