Skip to content

Commit

Permalink
Consistency of functions
Browse files Browse the repository at this point in the history
  • Loading branch information
huulbaek committed Dec 6, 2023
1 parent f3eb7ec commit 1999f0a
Show file tree
Hide file tree
Showing 52 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion src/calculations/spaces/common area/auditorium.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class Auditorium extends MainSpace {
* Calculates the area of the auditorum. 0 if there is no canteen.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToAuditorium) {
return this.spaceConstants.areaPerRole / this.spaceConstants.personsPerType * this.variables.seatsInAuditorium
}
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/common area/canteen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class Canteen extends MainSpace {
* Calculates the area of the canteen. 0 if there is no canteen.
* @returns
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToCanteen) {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor() + this.addedPeakArea()
}
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/common area/cleaning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class CommonCleaning extends MainSpace {
* Calculates the area of common cleaning.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor()
}
}
2 changes: 1 addition & 1 deletion src/calculations/spaces/common area/course.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class Course extends MainSpace {
* Calculates the area of course room. 0 if there is no need.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToCourseSpace) {
return this.dimensionedAttendance() * this.spaceConstants.areaPerRole / this.spaceConstants.personsPerType
}
Expand Down
4 changes: 2 additions & 2 deletions src/calculations/spaces/common area/exerciseroom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ export default class CommonExerciseRoom extends MainSpace {
/**
* Area per person excluding corridor
*/
areaPerPersonExcludingCorridor = (): number => {
areaPerPersonExcludingCorridor (): number {
return this.spaceConstants.areaPerRole / this.spaceConstants.personsPerType * this.spaceConstants.unitsPerPerson!
}

/**
* Calculates the area of the work toilet
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToExercise) {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor()
}
Expand Down
4 changes: 2 additions & 2 deletions src/calculations/spaces/common area/hwc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ export default class CommonHwc extends MainSpace {
/**
* Area per person excluding corridor
*/
areaPerPersonExcludingCorridor = (): number => {
areaPerPersonExcludingCorridor (): number {
return this.spaceConstants.areaPerRole / this.spaceConstants.personsPerType * this.spaceConstants.unitsPerPerson!
}

/**
* Calculates the area of the common HWC
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor()
}
}
2 changes: 1 addition & 1 deletion src/calculations/spaces/common area/kitchen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class Kitchen extends MainSpace {
* Calculates the area of the kitchen based on the number of employees and the area per role. It is 0 if there is no canteen.
* @returns {number} The area of the kitchen
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToCanteen) {
return this.spaceConstants.areaPerRole * this.variables.numberOfEmployees
}
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/common area/lobby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class Lobby extends MainSpace {
* Calculates the lobby area. 0 if there is no need.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToAuditorium || this.variables.accessToCourseSpace) {
// Get the area of the auditorium and the course space
const auditorium = new Auditorium(this.variables, this.config, this.customSpaceConstants, this.customConstants)
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/common area/reception.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class CommonReception extends MainSpace {
* Calculates the area of common area reception.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor()
}
}
2 changes: 1 addition & 1 deletion src/calculations/spaces/common area/special.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class CommonSpecial extends MainSpace {
* Calculates the area of the special rooms.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return this.variables.specialAreaCommon
}
}
2 changes: 1 addition & 1 deletion src/calculations/spaces/common area/stockarchive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class CommonStockArchive extends MainSpace {
* Calculates the area of stock/archive.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor()
}
}
4 changes: 2 additions & 2 deletions src/calculations/spaces/common area/toilet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ export default class CommonToilet extends MainSpace {
/**
* Area per person excluding corridor
*/
areaPerPersonExcludingCorridor = (): number => {
areaPerPersonExcludingCorridor (): number {
return this.spaceConstants.areaPerRole / this.spaceConstants.personsPerType * this.spaceConstants.unitsPerPerson!
}

/**
* Calculates the area of the work toilet
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor()
}
}
2 changes: 1 addition & 1 deletion src/calculations/spaces/common area/waitingzone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class CommonWaitingZone extends MainSpace {
* Calculates the area of common waiting zone.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor()
}
}
2 changes: 1 addition & 1 deletion src/calculations/spaces/common area/wardrobe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class CommonWardrobe extends MainSpace {
* Calculates the area of the common wardrobe
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor()
}
}
4 changes: 2 additions & 2 deletions src/calculations/spaces/shared area/dockin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class SharedDockin extends MainSpace {
* This method computes the share of this workspace type
* @returns {number}
*/
sharePerWorkspaceType = (): number => {
sharePerWorkspaceType (): number {
if (this.variables.accessToCoworking) {
return this.variables.dockinShare * this.variables.coworkingShare
}
Expand All @@ -16,7 +16,7 @@ export default class SharedDockin extends MainSpace {
* Calculates the area of shared dockin. 0 if there is no desire.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToCoworking) {
return this.personsPerType() * this.areaPerPersonExcludingCorridor() + this.addedPeakArea()
}
Expand Down
4 changes: 2 additions & 2 deletions src/calculations/spaces/shared area/hwc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ export default class SharedHwc extends MainSpace {
/**
* Area per person excluding corridor
*/
areaPerPersonExcludingCorridor = (): number => {
areaPerPersonExcludingCorridor (): number {
return this.spaceConstants.areaPerRole / this.spaceConstants.personsPerType * this.spaceConstants.unitsPerPerson!
}

/**
* Calculates the area of the shared hwc.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToCoworking) {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor() * this.variables.coworkingShare
}
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/shared area/lounge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class SharedLounge extends MainSpace {
* Calculates the area of shared dockin. 0 if there is no desire.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
// SUM((AJ4*AR24*AQ24)+(AB24*AQ24))
if (this.variables.accessToCoworking) {
return (this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor() * this.sharePerWorkspaceType()) + (this.addedPeakArea() * this.sharePerWorkspaceType())
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/shared area/meetingroom_large.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class SharedLargeMeetingroom extends MainSpace {
* Calculates the area of the meeting room.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToCoworking) {
const workDockin = new WorkDockin(this.variables, this.config, this.customSpaceConstants, this.customConstants)
const cellOffice = new CellOffice(this.variables, this.config, this.customSpaceConstants, this.customConstants)
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/shared area/meetingroom_medium.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class SharedMediumMeetingroom extends MainSpace {
* Calculates the area of the meeting room.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToCoworking) {
const workDockin = new WorkDockin(this.variables, this.config, this.customSpaceConstants, this.customConstants)
const cellOffice = new CellOffice(this.variables, this.config, this.customSpaceConstants, this.customConstants)
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/shared area/meetingroom_small.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class SharedSmallMeetingroom extends MainSpace {
* Calculates the area of the meeting room.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToCoworking) {
const workDockin = new WorkDockin(this.variables, this.config, this.customSpaceConstants, this.customConstants)
const cellOffice = new CellOffice(this.variables, this.config, this.customSpaceConstants, this.customConstants)
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/shared area/multiroom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class SharedMultiroom extends MainSpace {
* Calculates the area of shared multiroom.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToCoworking) {
//=SUM((AP4:AP10)*AR26*AQ26)+(AB26)
const workDockin = new WorkDockin(this.variables, this.config, this.customSpaceConstants, this.customConstants)
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/shared area/personalstorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class SharedPersonalStorage extends MainSpace {
* Calculates the area of the personal storage
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToCoworking) {
return this.calculateEmployeesPerWorkplaceTypeUnadjusted() * this.sharePerWorkspaceType() * this.areaPerPersonExcludingCorridor()
}
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/shared area/projectroom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class SharedProjectroom extends MainSpace {
* Calculates the area of the shred project room.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToReception) {
return this.calculateEmployeesPerWorkplaceTypeUnadjusted() * this.areaPerPersonExcludingCorridor()
}
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/shared area/reception.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class SharedReception extends MainSpace {
* Calculates the area of shared reception. 0 if there is no desire.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToReception) {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor() * this.variables.coworkingShare
}
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/shared area/special.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class SharedSpecial extends MainSpace {
* Calculates the area of the special rooms.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return this.variables.specialAreaShared
}
}
4 changes: 2 additions & 2 deletions src/calculations/spaces/shared area/toilet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ export default class SharedToilet extends MainSpace {
/**
* Area per person excluding corridor
*/
areaPerPersonExcludingCorridor = (): number => {
areaPerPersonExcludingCorridor (): number {
return this.spaceConstants.areaPerRole / this.spaceConstants.personsPerType * this.spaceConstants.unitsPerPerson!
}

/**
* Calculates the area of the shared toilet.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToCoworking) {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor() * this.variables.coworkingShare
}
Expand Down
4 changes: 2 additions & 2 deletions src/calculations/spaces/shared area/touchdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class SharedTouchdown extends MainSpace {
* This method computes the share of this workspace type
* @returns {number}
*/
sharePerWorkspaceType = (): number => {
sharePerWorkspaceType (): number {
if (this.variables.accessToCoworking) {
return this.variables.touchdownShare * this.variables.coworkingShare
}
Expand All @@ -16,7 +16,7 @@ export default class SharedTouchdown extends MainSpace {
* Calculates the area of shared touchdown. 0 if there is no desire.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToCoworking) {
return this.personsPerType() * this.areaPerPersonExcludingCorridor() + this.addedPeakArea()
}
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/shared area/waitingzone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class SharedWaitingZone extends MainSpace {
* Calculates the area of shared wating zone in reception. 0 if there is no desire.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToReception) {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor() * this.variables.coworkingShare
}
Expand Down
2 changes: 1 addition & 1 deletion src/calculations/spaces/shared area/wardrobe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class SharedWardrobe extends MainSpace {
* Calculates the area of the wardrobe
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
if (this.variables.accessToCoworking) {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor() * this.variables.coworkingShare
}
Expand Down
4 changes: 2 additions & 2 deletions src/calculations/spaces/work related area/celloffice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class CellOffice extends MainSpace {
* This method computes the share of this workspace type
* @returns {number}
*/
sharePerWorkspaceType = (): number => {
sharePerWorkspaceType (): number {
if (this.variables.accessToCellOffice) {
return this.variables.cellOfficeShare
}
Expand All @@ -16,7 +16,7 @@ export default class CellOffice extends MainSpace {
* Calculates the area of the cell.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor() * this.sharePerWorkspaceType()
}
}
2 changes: 1 addition & 1 deletion src/calculations/spaces/work related area/cleaning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class Cleaning extends MainSpace {
* Calculates the area of cleaning
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor()
}
}
4 changes: 2 additions & 2 deletions src/calculations/spaces/work related area/coffeestation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ export default class CoffeeStation extends MainSpace {
/**
* Area per person excluding corridor
*/
areaPerPersonExcludingCorridor = (): number => {
areaPerPersonExcludingCorridor (): number {
return this.spaceConstants.areaPerRole / this.spaceConstants.personsPerType * this.spaceConstants.unitsPerPerson!
}

/**
* Calculates the area of the coffee station.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor() + this.addedPeakArea()
}
}
2 changes: 1 addition & 1 deletion src/calculations/spaces/work related area/copyarchive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class CopyArchive extends MainSpace {
* Calculates the area of the copy/archive
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor()
}
}
4 changes: 2 additions & 2 deletions src/calculations/spaces/work related area/dockin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class WorkDockin extends MainSpace {
* This method computes the share of this workspace type
* @returns {number}
*/
sharePerWorkspaceType = (): number => {
sharePerWorkspaceType (): number {
// We need the shared dock in share for the calculation of the work dock in share
const sharedDockin = new SharedDockin(this.variables, this.config, this.customSpaceConstants, this.customConstants)
return this.variables.dockinShare - sharedDockin.sharePerWorkspaceType()
Expand All @@ -16,7 +16,7 @@ export default class WorkDockin extends MainSpace {
* Calculates the area of touchdown. 0 if there is no need.
* @returns {number}
*/
calculateAreaExclCompensation = (): number => {
calculateAreaExclCompensation (): number {
return (this.dimensionedAttendance() * this.areaPerPersonExcludingCorridor()*this.sharePerWorkspaceType())+(this.addedPeakArea()*this.sharePerWorkspaceType())
}
}
Loading

0 comments on commit 1999f0a

Please sign in to comment.