Class WellScheduler
java.lang.Object
neqsim.process.util.fielddevelopment.WellScheduler
- All Implemented Interfaces:
Serializable
Schedules well interventions, workovers, and tracks well availability.
This class provides comprehensive well scheduling capabilities including:
- Well status and availability tracking
- Intervention and workover scheduling
- Production impact analysis
- Schedule optimization to minimize deferred production
- Rig/vessel constraint handling
- Gantt chart generation for visualization
Well Status Model
Each well can be in one of several states that affect its contribution to total production:
WellScheduler.WellStatus.PRODUCING- Well is online and producingWellScheduler.WellStatus.SHUT_IN- Well is temporarily shut inWellScheduler.WellStatus.WORKOVER- Well is undergoing interventionWellScheduler.WellStatus.WAITING_ON_WEATHER- Operations delayed by weatherWellScheduler.WellStatus.DRILLING- New well being drilledWellScheduler.WellStatus.PLUGGED- Well permanently abandoned
Intervention Planning
Interventions are scheduled activities that temporarily take a well offline but may improve its performance afterward. The scheduler calculates:
- Deferred production during intervention
- Expected production gain after intervention
- Net present value of the intervention
- Optimal timing considering rig availability
Integration with Facility Model
When a ProcessSystem is provided, the scheduler accounts for facility
bottlenecks. This
ensures that:
- Production is capped at facility capacity even when well potential exceeds it
- Interventions on non-bottleneck wells may not increase total production
- Optimal scheduling prioritizes interventions that relieve constraints
Example Usage
WellScheduler scheduler = new WellScheduler(reservoir, facility);
// Add wells with their current potential
scheduler.addWell("Well-A", 5000.0, "Sm3/day");
scheduler.addWell("Well-B", 4000.0, "Sm3/day");
scheduler.addWell("Well-C", 3000.0, "Sm3/day");
// Schedule interventions
scheduler
.scheduleIntervention(Intervention.builder("Well-A").type(InterventionType.COILED_TUBING)
.startDate(LocalDate.of(2024, 6, 15)).durationDays(5).expectedGain(0.15) // 15%
// improvement
.cost(500000, "USD").build());
// Optimize the schedule
ScheduleResult result = scheduler.optimizeSchedule(LocalDate.of(2024, 1, 1), LocalDate.of(2024, 12, 31), 1); // max 1
// concurrent
// intervention
System.out.println("Total deferred: " + result.getTotalDeferredProduction());
System.out.println("Total gain: " + result.getTotalProductionGain());
System.out.println(result.toGanttMarkdown());
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classScheduled intervention record.static enumTypes of well interventions.static final classSchedule optimization result.static final classWell record for availability and production tracking.static enumWell operational status. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final doubleDays per year for calculations.private StringDefault rate unit for wells.private final ProcessSystemSurface facility process system (may be null).private final SimpleReservoirReservoir model (may be null).private static final longSerialization version UID.private final Map<String, WellScheduler.WellRecord> Map of well names to well records. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a well scheduler without reservoir or facility models.WellScheduler(SimpleReservoir reservoir, ProcessSystem facility) Creates a well scheduler with reservoir and facility models. -
Method Summary
Modifier and TypeMethodDescriptionAdds a well with initial production potential.doublecalculateSystemAvailability(LocalDate startDate, LocalDate endDate) Calculates system-wide availability over a period.private longcountConcurrentOnDate(List<WellScheduler.Intervention> interventions, LocalDate date) Counts concurrent interventions on a specific date.Gets all scheduled interventions across all wells.Gets all well records.Gets the facility process system.Gets the reservoir model.doublegetTotalPotentialOn(LocalDate date) Gets the total well potential on a specific date.Gets a well record by name.optimizeSchedule(LocalDate startDate, LocalDate endDate, int maxConcurrentInterventions) Optimizes the intervention schedule to minimize deferred production.voidscheduleIntervention(WellScheduler.Intervention intervention) Schedules an intervention for a well.voidsetDefaultRateUnit(String rateUnit) Sets the default rate unit for new wells.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
DAYS_PER_YEAR
private static final double DAYS_PER_YEARDays per year for calculations.- See Also:
-
reservoir
Reservoir model (may be null). -
facility
Surface facility process system (may be null). -
wells
Map of well names to well records. -
defaultRateUnit
Default rate unit for wells.
-
-
Constructor Details
-
WellScheduler
public WellScheduler()Creates a well scheduler without reservoir or facility models. -
WellScheduler
Creates a well scheduler with reservoir and facility models.- Parameters:
reservoir- reservoir model for production trackingfacility- surface facility for bottleneck analysis
-
-
Method Details
-
addWell
Adds a well with initial production potential.- Parameters:
name- well name (unique identifier)initialPotential- unconstrained production raterateUnit- rate unit (e.g., "Sm3/day")- Returns:
- the created well record
-
getWell
Gets a well record by name.- Parameters:
name- well name- Returns:
- well record, or null if not found
-
getAllWells
Gets all well records.- Returns:
- unmodifiable collection of well records
-
scheduleIntervention
Schedules an intervention for a well.- Parameters:
intervention- intervention to schedule- Throws:
IllegalArgumentException- if well doesn't exist
-
getAllInterventions
Gets all scheduled interventions across all wells.- Returns:
- list of all interventions sorted by date
-
optimizeSchedule
public WellScheduler.ScheduleResult optimizeSchedule(LocalDate startDate, LocalDate endDate, int maxConcurrentInterventions) Optimizes the intervention schedule to minimize deferred production.The optimization considers:
- Intervention priority and dependencies
- Rig/vessel availability (maxConcurrentInterventions)
- Production potential of each well
- Facility constraints (if facility is provided)
- Parameters:
startDate- start of scheduling periodendDate- end of scheduling periodmaxConcurrentInterventions- maximum number of simultaneous interventions- Returns:
- optimized schedule result
-
countConcurrentOnDate
Counts concurrent interventions on a specific date. -
calculateSystemAvailability
-
getTotalPotentialOn
Gets the total well potential on a specific date.- Parameters:
date- date to check- Returns:
- sum of potentials for all producing wells
-
getReservoir
Gets the reservoir model.- Returns:
- reservoir, or null if not configured
-
getFacility
Gets the facility process system.- Returns:
- facility, or null if not configured
-
setDefaultRateUnit
Sets the default rate unit for new wells.- Parameters:
rateUnit- rate unit string
-