Skip to content

Flip the order of set_params() arguments for BatchSimulate #1203

@ntolley

Description

@ntolley

Currently, BatchSimulate and Optimizer require a set_params() function which accepts a Network object, and a dictionary called param_values which is used to update different parameter values in the network during batch simulation or optimization.

The BatchSimulate class expects the function to be:

def set_params(param_values, net):

Whereas the Optmizer class expects a different order of the arguments:

def set_params(net, param_values):

I propose changing the BatchSimulate class to expect set_params(net, param_values). I think this makes the most sense, and I believe was the original intention since the documentation incorrectly describes the argument in this way:

``set_params(net, params) -> None``

This will require changing the internals of BatchSimulate, as well as updating the tests and associated code tutorial

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions