sampo.generator.base#

Overview#

Classes#

SimpleSynthetic

Designed to simplify the use of the synthetic data generator.

Classes#

class sampo.generator.base.SimpleSynthetic(rand: int | random.Random | None = None)#

Designed to simplify the use of the synthetic data generator.

small_work_graph(cluster_name: str | None = 'C1') sampo.schemas.graph.WorkGraph#

Creates a small graph of works consisting of 30-50 vertices;

Parameters:

cluster_name – str - the first cluster name

Returns:

work_graph: WorkGraph - work graph where count of vertex between 30 and 50

work_graph(mode: sampo.generator.pipeline.types.SyntheticGraphType | None = SyntheticGraphType.GENERAL, cluster_counts: int | None = 0, bottom_border: int | None = 0, top_border: int | None = 0) sampo.schemas.graph.WorkGraph#
Invokes a graph of the given type if at least one positive value of

cluster_counts, bottom_border or top_border is given;

Parameters:
  • mode – str - ‘general’ or ‘sequence’ or ‘parallel - the type of the returned graph

  • cluster_counts – Optional[int] - Number of clusters for the graph

  • bottom_border – Optional[int] - bottom border for number of works for the graph

  • top_border – Optional[int] - top border for number of works for the graph

Returns:

work_graph: WorkGraph - the desired work graph

contractor(pack_worker_count: float)#

Generates a contractor by pack_worker_count and from sampo.generator.environment.contractor.get_contractor with default optional parameters

Parameters:

pack_worker_count – The number of resource sets

Returns:

the contractor

advanced_work_graph(works_count_top_border: int, uniq_works: int, uniq_resources: int)#

Invokes a graph of the given type for given works_count_top_border, expands the number of unique resources and job titles, if possible

Parameters:
  • uniq_resources – Number of unique resources

  • uniq_works – Number of unique work names

  • works_count_top_border – Optional[int] - top border for number of works for the graph

Returns:

the desired work graph