Sanjaay Gowda T S
PetroChina Company Limited practice

ORIGINAL COMPANY-CONTEXT PRACTICE

Detect conflicting pipeline transfer windows

Software engineeringHardConcept

Original practice scenario: A hypothetical logistics planner schedules transfers through shared pipeline segments. Transfers occupy multiple consecutive segments and require separation between incompatible products. Design conflict detection.

Written for independent practice using company context; this is not a verified question from a company interview.

A REASONED APPROACH

Model answer.

Define occupancy intervals and compatibility constraints explicitly. A transfer cannot be validated by checking only its start time or the first segment it uses.

Work through it

  1. Represent the planned route, segment-specific entry and exit times, product class and required separation, using a consistent boundary convention and time basis.
  2. Check interval overlap against existing reservations on every affected segment, applying additional separation rules where product transitions require them.
  3. Reserve the complete feasible route consistently, returning the conflicting segment and rule when a concurrent booking or later adjustment invalidates the plan.

Tradeoffs to discuss

  • Conservative buffers simplify conflict control but reduce throughput; tighter schedules require stronger timing evidence and recovery options.

Common pitfalls

  • An interval ending exactly when another begins is valid only under the chosen separation rule.
  • This scheduling exercise does not establish hydraulic feasibility or authorize real pipeline operation.

KEEP PRACTISING

Related questions.

Keep learning beyond the interview.

Explore the Learning Hub