UNPKG

officekit

Version:

A toolkit to represent and visualize office spaces. It also provides functionality to simulate usage of offices, and calculate a score given a fitness function. It also have functionatlity for automatic allocation of offices using a genetic algorithm.

29 lines (28 loc) 988 B
import type { OfficeBuilding } from '$lib/office/OfficeBuilding'; import type { Seat } from '$lib/office/Seat'; import type { People } from '$lib/people/People'; import type { Team } from '$lib/people/Team'; import type { Teams } from '$lib/people/Teams'; export declare class Genome { building: OfficeBuilding; people: People; teams: Teams; id: string; teamStarterSeats: Seat[]; teamPermutation: Team[]; constructor(building: OfficeBuilding, people: People, teams: Teams); clone(): Genome; getArrray(): { team: Team; seat: Seat; }[]; randomize(): void; mutate(temperature?: number): void; private mutateTeamPermutation; crossover(other: Genome, mutateProbability?: number, temperature?: number): Genome; spread(): void; getId(): string; debug(): void; createReservations(allocations: Map<string, number>): void; static generate(building: OfficeBuilding, people: People, teams: Teams): Genome; }