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

Shared parameter names fail #521

Open
rusu24edward opened this issue May 21, 2024 · 0 comments
Open

Shared parameter names fail #521

rusu24edward opened this issue May 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@rusu24edward
Copy link
Collaborator

If two components require a parameter of the same name but different type/format, then we cannot use both of them in the same simulation.

class UrbanOptsSim(SmartGridWorldSimulation):
    """
    def __init__(
            self,
            reward_scheme=None,
            **kwargs):
        super().__init__(**kwargs)

        # Done components
        self.target_overlap_done = TargetAgentOverlapDone(
            **kwargs
        )
        self.target_encoding_done = TargetEncodingInactiveDone(
            **kwargs
        )

sim = AllStepManager(
    UrbanOptsSim.build_sim_from_file(
        ...
        target_mapping={ # TODO: Both done types require the target_mapping parameter...
            attacker: 'target' for attacker in attackers
        }
    )
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

1 participant