pddl-workspace
Version:
57 lines (56 loc) • 3.02 kB
TypeScript
import { DocumentPositionResolver } from "../DocumentPositionResolver";
import { Action, DomainInfo, DurativeAction } from "../DomainInfo";
import { Compilation } from "../Compilations";
import { Variable } from "../language";
import { BaseSyntaxInjector } from "./SyntaxInjector";
/** Injects auto-generated code triggered by the :job-scheduling requirement/ontology. */
export declare class JobSchedulingSyntaxInjector extends BaseSyntaxInjector {
static readonly AVAILABLE = "available";
static readonly RESOURCE = "resource";
static readonly LOCATION = "location";
private static readonly IS_AVAILABLE_PREDICATE_NAME;
private static readonly IS_AVAILABLE_PREDICATE;
private static readonly LOCATED_AT_PREDICATE_NAME;
/** (located_at ?r - resource ?l - location) */
private static readonly LOCATED_AT_PREDICATE;
private static readonly BUSY_PREDICATE_NAME;
/** (busy ?r - resource) */
private static readonly BUSY_PREDICATE;
private static readonly CONTAINS_PREDICATE_NAME;
/** (contains ?parent ?child - location) */
private static readonly CONTAINS_PREDICATE;
private static readonly JOB_STARTED_SUFFIX;
private static readonly JOB_DONE_SUFFIX;
static readonly JOB_DURATION_SUFFIX = "_job_duration";
private static readonly TRAVEL_TIME;
/** (travel_time ?r - resource ?from ?to - location) */
private static readonly TRAVEL_TIME_FUNCTION;
static readonly TIME_STEPS_PER_DAY = "time_steps_per_day";
static readonly TIME_STEP_IN_DAYS = "time_step_in_days";
/** (time_steps_per_day) ; number of time steps per day */
private static readonly TIME_STEPS_PER_DAY_FUNCTION;
/** (time_step_in_days) ; time step length in [day] unit */
private static readonly TIME_STEP_IN_DAYS_FUNCTION;
private static readonly JOB_SCHEDULING;
/** PDDL Requirements that are implied by the :job-scheduling and therefore should be inserted in its place */
private static readonly JOB_SCHEDULING_IMPLIED_REQS;
process(domainInfo: DomainInfo, positionResolver: DocumentPositionResolver): void;
private replaceRequirement;
private injectPredicatesAndFunctions;
private injectVariables;
private injectTypes;
compileJob(job: DurativeAction, locationTypes: Set<string>, resourceTypes: Set<string>, positionResolver: DocumentPositionResolver): JobDecoration;
injectMoveAction(domainInfo: DomainInfo, positionResolver: DocumentPositionResolver): void;
private createHoverTitle;
}
declare class JobDecoration {
readonly injections: Compilation[];
readonly generatedPredicates: Variable[];
readonly generatedFunctions: Variable[];
add(injection: Compilation): void;
createDurationVariable(action: Action, resourceTypes: Set<string>): Variable;
createActionFunction(action: Action, suffix: string, resourceTypes: Set<string>): Variable;
createActionPredicate(action: Action, suffix: string, resourceTypes: Set<string>): Variable;
private createActionVariable;
}
export {};