Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private RigStatus analisysCXDX(TallySondeo tally, StatusWell currentStatus, ConfigWell configWell, Rig rig, Well well) {
- logger.debug("analisysCXDX");
- this.referencePointA = this.validateReferencePoint(this.referencePointA, rig, well);
- this.referencePointB = this.validateReferencePoint(this.referencePointB, rig, well);
- if (!this.referencePointA.equals(NULL_VALUE_REFERENCE) &&
- !this.referencePointB.equals(NULL_VALUE_REFERENCE)) {
- Double delta = (this.referencePointB - this.referencePointA) / 100;
- this.referencePointA = NULL_VALUE_REFERENCE;
- this.referencePointB = NULL_VALUE_REFERENCE;
- CXDXEvent event = new CXDXEvent(this.source);
- currentStatus.setDrillStringLength(currentStatus.getDrillStringLength() + this.delta);
- event.addLogLine("set setDrillStringLength, delta = " + this.delta);
- LOGGER.debug("set setDrillStringLength, delta = " + this.delta);
- AtomicBoolean tallyFitted = new AtomicBoolean(Boolean.FALSE);
- this.commandsHandler.getFitDrillStringTally(null, tallyFitted).execute(); // SE ACOMODA EL TALLY
- this.commandsHandler.getReloadDrillStringTally().execute(); // RECARGA DEL TALLY (Se calculan lengths y esas cosas por los cambios que se pudieran haber producido en el fit)
- this.commandsHandler.getSettingActiveElementWell(clientID, tally, currentStatus).execute(); // VE DE SETEAR LA BARRA ACTIVA
- event.addLogLine("tallyFitted " + tallyFitted.get());
- if (!tally.empty() && !tallyFitted.get()) { // Si aun habiendo realizado el fitTally aun no se ha llegado a completar el drillString (system)
- //this.addNewPipe(tally, delta, rig, configWell);
- commandsHandler.getAddNewPipe(null, delta, tally, rig, configWell).execute(); // AGREGA UNA NUEVA BARRA
- commandsHandler.getReloadDrillStringTally().execute(); // RECARGA DEL TALLY (Se calculan length y esas cosas por los cambios que se pudieran haber producido en el agregado)
- }
- if (delta > 0) { // ES UN CONEXION
- event.addLogLine("CONNECTION");
- currentStatus.setLastDeltaCx(delta);
- modelData.getQueueRigStatus().setAll(RigStatus.CONNECTION);
- currentStatus.setRigStatus(RigStatus.CONNECTION);
- } else { // ES UN DESCONEXION
- event.addLogLine("DISCONNECTION");
- currentStatus.setLastDeltaDx(delta);
- modelData.getQueueRigStatus().setAll(RigStatus.DISCONNECTION);
- currentStatus.setRigStatus(RigStatus.DISCONNECTION);
- }
- event.addLogLine("getAutomaticFixDepth = " + configWell.getAutomaticFixDepth());
- if (configWell.getAutomaticFixDepth()) {
- /*
- * AUTO FIX, luego de haber realizado el acomodar Tally, si la diferencia entre el drillStringLenght del tally
- * ya acomodado y el SistemDrillStringLenght están en valor absoluto dentro de una tolerancia preestablecida
- * (valores similar al enfoque inicial) si la marca AutoFix esta habilitada, procedemos a corregir el
- * SystemDrillString para que se ajuste al tally.
- */
- event.addLogLine("currentStatus.getDrillStringLength() = " + currentStatus.getDrillStringLength());
- event.addLogLine("modelData.getWell().tallySondeo().getTotal().getTotalLenghtDrillString() = " + modelData.getWell().tallySondeo().getTotal().getTotalLenghtDrillString());
- event.addLogLine("hookHeigthErrorTolerance = " + hookHeigthErrorTolerance);
- if (Math.abs(currentStatus.getDrillStringLength() - modelData.getWell().tallySondeo().getTotal().getTotalLenghtDrillString()) < hookHeigthErrorTolerance) {
- event.addLogLine("Setting currentStatus.drillStringLength = " + modelData.getWell().tallySondeo().getTotal().getTotalLenghtDrillString());
- currentStatus.setDrillStringLength(modelData.getWell().tallySondeo().getTotal().getTotalLenghtDrillString());
- }
- }
- this.sendEvent(event);
- commandsHandler.getRecalculateSectionsWell().execute();
- clientsHandler.sendBroadcast(CommonConstants.MANDATORY_UPDATE);
- }
- return currentStatus.getRigStatus();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement