Closed ramarea closed 3 years ago
Upon further investigation, the replenishinventory function in the agent class does not get visited.
hmmm!
I have just checked and this function never gets visited AT ALL, not just the conditional statement within. Going back to inventory check to see if it ever gets visited. This gets visited!! Now is the conditional that calls on replinishinv ever called?
NO! It is never called. That is useful. Is there an issue with the test condition?
The test condition works fine, but the inventory never falls below the SQ_S. Let me blow out the demand rate and see if that depletes the inventory quickly enough.
NOT HELPING. MAYBE I SHOULD FIX THE PROCESSORDERS function because that way I can get order moving through the network.
This is hilarious! So I have been failing to process orders because I required my order quantity to exceed my inventory level, hence why it was not working. lol. let's hope things will work now.
The issue with the order quantity was me trying to parse the order as an int.
We are still only getting orders of 0. Let me look into that.
The order quantity issue has been fixed and it works in the A4 matrix which is the most connected of them all...and therefore should work in all the other adj_mat.
Currently the order quantity passed into the order constructor is not parseable as an int, so instead I get the error value. This is not the case for orders sent to agents Ri.
Agents Ri get their order quantity from the environment, so outside the simulation.
The issue is when they are passed from within.
Possible fix: Go to the agent class and check the type of the object being passed into order quantity.