Resource dependencies & substitutes
Evaluate bookings that depend on more than one resource and discover allowed replacement choices. A machine may need an operator; a primary room may have a configured substitute when capacity is unavailable.
Loading interactive demo…
What you configure
- profiles.dependencies
- List required companion resources and consumed units.
- profiles.substituteIds
- Define the replacements your application permits.
- evaluateBooking / findSubstitutes
- Evaluate the proposed interval, units, and requirements.
Essential integration
This assumes the shared Quick start already provides premiumLicense and, for UI views, premiumCalendarOptions. Only the feature-specific setup is shown.
import { AdvancedResourcePlanner } from '@wts-calendar/core/advanced-resource-planning';
const planner = new AdvancedResourcePlanner({
license: premiumLicense,
timeZone: 'UTC',
resources: [
{ id: 'design', title: 'Design studio', capacity: 2 },
{ id: 'engineering', title: 'Engineering', capacity: 4 },
],
events: [
{
id: 'review',
title: 'Design review',
resourceId: 'design',
start: '2026-09-07T09:00:00Z',
end: '2026-09-07T10:30:00Z',
},
],
profiles: [
{
resourceId: 'design',
dependencies: [{ resourceId: 'engineering', units: 1 }],
substituteIds: ['engineering'],
},
],
});
const request = {
resourceId: 'design',
start: '2026-09-07T09:30:00Z',
end: '2026-09-07T10:00:00Z',
units: 2,
};
export const decision = planner.evaluateBooking(request);
export const alternatives = planner.findSubstitutes(request);
console.log(decision.allowed, decision.issues, alternatives);Behavior and lifecycle
- Availability, shifts, requirements, dependencies, and capacity are evaluated together.
- Allowed substitutes are ranked by projected utilization and then stable resource ID.
Limits and responsibilities
- Finding a substitute does not automatically modify calendar events or reserve resources.
- Coordinate final multi-resource reservations through your application's authoritative transaction logic.
Premium
Enable this capability
- Optional module
- @wts-calendar/core/advanced-resource-planning
- Local capability ID
- advanced-resource-planning · enabled by package-wide Premium
Use the request form to describe your project and deployment origins. Pricing and terms are confirmed privately. A WTS license is separate from provider credentials; do not send passwords or production access tokens.
The live example uses a browser-visible deployment key restricted to this package and approved origins. It does not collect license keys or visitor credentials.