sampo.generator.pipeline.extension#
Overview#
|
- |
- |
|
|
- |
- |
|
|
- |
|
Increases the number of unique resources in WorkGraph |
|
Increases the number of unique work names in WorkGraph |
Functions#
- sampo.generator.pipeline.extension._extend_str_fields(new_uniq_count: int, wg: sampo.schemas.graph.WorkGraph, rand: random.Random, uniq_finder_str: Callable[[sampo.schemas.graph.WorkGraph], list[str]], update_node: Callable[[sampo.schemas.graph.GraphNode, dict[str, list[str]], random.Random], None]) sampo.schemas.graph.WorkGraph#
- sampo.generator.pipeline.extension._get_uniq_resource_kinds(wg: sampo.schemas.graph.WorkGraph) list[str]#
- sampo.generator.pipeline.extension._update_resource_names(node: sampo.schemas.graph.GraphNode, name_to_suffixes: dict[str, list[str]], rand: random.Random)#
- sampo.generator.pipeline.extension._get_uniq_work_names(wg: sampo.schemas.graph.WorkGraph) list[str]#
- sampo.generator.pipeline.extension._update_work_name(node: sampo.schemas.graph.GraphNode, name_to_suffixes: dict[str, list[str]], rand: random.Random) None#
- sampo.generator.pipeline.extension.extend_resources(uniq_resources: int, wg: sampo.schemas.graph.WorkGraph, rand: random.Random) sampo.schemas.graph.WorkGraph#
Increases the number of unique resources in WorkGraph
- Parameters:
uniq_resources – the amount to which you need to increase
wg – original WorkGraph
rand – Number generator with a fixed seed, or None for no fixed seed
- Returns:
modified WorkGraph
- sampo.generator.pipeline.extension.extend_names(uniq_activities: int, wg: sampo.schemas.graph.WorkGraph, rand: random.Random) sampo.schemas.graph.WorkGraph#
Increases the number of unique work names in WorkGraph
- Parameters:
uniq_activities – the amount to which you need to increase
wg – original WorkGraph
rand – Number generator with a fixed seed, or None for no fixed seed
- Returns:
modified WorkGraph