Skip to content

refactor(agents): unify producers into region-agnostic role (#31)#32

Open
Hackatro wants to merge 1 commit into
mainfrom
31-unify-farmer-trader-into-region-agnostic-capability-supersets-roles-without-regions
Open

refactor(agents): unify producers into region-agnostic role (#31)#32
Hackatro wants to merge 1 commit into
mainfrom
31-unify-farmer-trader-into-region-agnostic-capability-supersets-roles-without-regions

Conversation

@Hackatro

@Hackatro Hackatro commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Collapse _step_bra/_step_usa/_step_arg into one _step_producer. Replace ROLE_BRA/ARG/USA with ROLE_PRODUCER. USA drops its hardcoded surplus_factor and nominal pricing. It is now a plain capacity elastic producer. Trader keys volume by PDL origin instead of the region role, with bra/arg/usa_volume kept as compat view for the current CSV schema + transport (removed in #19)

Collapse _step_bra/_step_usa/_step_arg into one _step_producer.
Replace ROLE_BRA/ARG/USA with ROLE_PRODUCER. USA drops its hardcoded surplus_factor and nominal pricing. It is now a plain capacity elastic producer.
Trader keys volume by PDL origin instead of the region role, with bra/arg/usa_volume kept as compat view for the current CSV schema + transport (removed in #19)

from .base import SupplyChainAgent
from .farmer import Farmer, ROLE_BRA,ROLE_ARG, ROLE_USA, ROLE_EU
from .farmer import Farmer, ROLE_PRODUCER, ROLE_EU

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need the EU role?


# compatibility view for the current CSV schema + transport routing
# branch 19 removes these three attrs when it refactors transport routing and the output schema off per-region volumes.
self.bra_volume = volume_by_origin.get("brazil_farms", 0.0)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still location based things in the agent implementation

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

Successfully merging this pull request may close these issues.

Unify Farmer & Trader into region-agnostic capability supersets (roles without regions)

2 participants