Skip to content

[Refactor] Update node IDs from local to global #48

Open
@Pabloo22

Description

@Pabloo22

The JobShopGraph is moving from global node IDs to type-based ones (see #31).

Node

  • Change Node class type hint from int to a tuple of node type as a string and the local ID (tuple[str, int]).
  • Update documentation to reflect this change

JobShopGraph

Update node ID handling:

  • Refactor _next_node_id to be a dictionary pointing each node type to its next node id (dict[str, int])
  • Update add_node method to reflect this new behaviour.
  • Do the same with removed_nodes attribute and remove_node method
  • Update documentation to reflect this change

Checks

  • Refactor old tests in the graph module to account for this new behaviour. Tests related to the SingleJobShopGraphEnv may not pass, but that will be addressed in a separate issue. Also, ensure that the visualisation functions plot_disjunctive_graph and plot_resource_task_graph don't break.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions