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.

30 lines (29 loc) 1.25 kB
import type { OfficeBuilding } from '$lib/office/OfficeBuilding'; import type { Reservation } from '$lib/office/reservations/Reservation'; import type { Seat } from '$lib/office/Seat'; import type { Person } from '$lib/people/Person'; import type { Team } from '$lib/people/Team'; import { SeatingStats } from './SeatingStats'; declare class SeatedPerson { person: Person; seatReservation: Reservation; constructor(person: Person, seatReservation: Reservation); } export declare class SeatingSimulation { building: OfficeBuilding; people: Person[]; remainingSeats: Map<number, Seat>; seatedPeople: Map<number, SeatedPerson>; unSeatedPeople: Person[]; detailedStats: boolean; constructor(building: OfficeBuilding, people: Person[], detailedStats?: boolean); seatAll(): void; getSeatedByTeams(): Map<Team, SeatedPerson[]>; calculateFitness(): SeatingStats; seat(): Generator<any, void, unknown>; seatPerson(person: Person): boolean; filterAvailable(reservations: Reservation[]): Reservation[]; filterUnavailable(reservations: Reservation[]): Reservation[]; nearestDistanceToOneOf(targetReservations: Reservation[], availableReservations: Reservation[]): Reservation; } export {};