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) 1.05 kB
import type { OfficeBuilding } from './OfficeBuilding'; import type { Point } from './Point'; import { Seat } from './Seat'; export type LineType = { type: 'inner' | 'line'; coord: [number, number][]; }; export declare class OfficeFloor { building: OfficeBuilding; label: string; lines: LineType[]; seats: Seat[]; id: number; nextId: number; width: number; height: number; exits: [number, Point, OfficeFloor, Point][]; constructor(building: OfficeBuilding, label: string, startId: number, width?: number, height?: number); equals(floor: OfficeFloor): boolean; addExit(fromId: number, from: Point, toFloor: OfficeFloor, to: Point): OfficeFloor; getExitsTo(floor: OfficeFloor): [number, Point, OfficeFloor, Point][]; getLabel(includeBuilding?: boolean): string; getId(): number; addLine(line: LineType): this; addBox(x1: number, y1: number, x2: number, y2: number): this; getSeat(id: number): Seat | null; addSeats(c1: [number, number], c2: [number, number]): this; }