Carbon-Farm-Network / app-carbon-farm-network

GNU Affero General Public License v3.0
1 stars 0 forks source link

Plan from recipe not getting agents > test recipe #108

Closed fosterlynn closed 5 months ago

fosterlynn commented 5 months ago

When the plan is initially created in memory from the recipes, some agents are there, some are not. (The screen shots below are from different tests. The first test didn't have the service offers,the second one did.) This used to work, so something has gotten lost with the many refactors that have been done, understandably.

What it generally should be doing. For each commitment, look for an agent with the same role as the receiver_role, if a match is found, use that. Same for the provider_role. If more than one match is found, either pick one, or leave it blank (dev choice). (Then check for an exchange recipe that includes the commitment, if there is one, check for an offer. If there is an offer, calc cost and use that agent as provider. If there is more than one, either pick one and use it, or don't calculate the cost or use the agent, dev choice. That part seems to be working. I'm not sure the original order of the logic, it could work different ways.)

Also, as can be seen in the second screen shot, the agent receiver on the satisfy requests commitments was lost. In this case, there weren't requests, so these were created using the add button. I don't know what happens if they are created from requests.

Screenshot from 2024-05-09 11-34-04

Screenshot from 2024-05-10 10-01-35

fosterlynn commented 5 months ago

Update from testing after the performance work.

All the agents are coming in correctly on plan from recipe, except none of the first column (pickup from farm). All the costs are coming in correctly too, except that same column. The Satisfy Requests commitments have the correct agents now (using the requests this time).

Screenshot from 2024-05-17 17-22-17 Screenshot from 2024-05-17 17-16-01

fosterlynn commented 5 months ago

I'm going to close this, there is only one agent that didn't come in on my last test, the spinning agent. It's possible the recipe is wrong. I'll re-open it if it doesn't work for Laura with real data, and the recipe is right.

fosterlynn commented 5 months ago

Re-opening, assigned to me, I think I fixed this is the recipe, but am opening so I remember to test it after the recipe is recompiled in.

fosterlynn commented 5 months ago

I'm not sure if this is fixed by my data change or not, but I'm closing in either case, eventually, we'll have recipes completed in the app, and it is easy to fix that piece of data in the plan.