-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDrillingRareEvents.js
62 lines (57 loc) · 2.55 KB
/
DrillingRareEvents.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* @License Starts
*
* Copyright © 2015 - present. MongoExpUser
*
* License: MIT - See: https://github.com/MongoExpUser/Shale-Reservoir-DNN-and-Drilling-Rare-Events-Graph/blob/master/README.md
*
* @License Ends
*
*
* Ecotert's DrillingRareEvents .js (released as open-source under MIT License) implements:
*
* Drilling Rare Events or Anomalies (vibration, kick and stuckpipe) detection and prevention with graph-based method.
*
* It inherits/extends the BaseAIML for its implementation.
*
*/
const BaseAIML = require('./BaseAIML.js').BaseAIML;
class DrillingRareEvents extends BaseAIML
{
constructor(pyFile, pyScriptPath, pyVersionPath, pyMode, modelingOption, fileOption, gpuOption, inputFromCSVFileX,
inputFromCSVFileY, mongDBCollectionName, mongDBSpecifiedDataX, mongDBSpecifiedDataY)
{
super(modelingOption, fileOption, gpuOption, inputFromCSVFileX, inputFromCSVFileY, mongDBCollectionName, mongDBSpecifiedDataX, mongDBSpecifiedDataY);
this.pyFile = pyFile;
this.pyScriptPath = pyScriptPath;
this.pyVersionPath = pyVersionPath;
this.pyMode = pyMode;
}
drillingRareEvents()
{
// call AIML python script (this.pyFile) via Python-Shell
// pyFile (py_file_AIML.py) implements drilling rare events detection and prevention using graph method
var pyFile = this.pyFile;
var pyScriptPath = this.pyScriptPath;
var pyVersionPath = this.pyVersionPath;
var pyMode = this.pyMode;
var cpml = new CallPthonMLCodes();
var CallPthonMLCodes = require('./CallPthonMLCodes.js').CallPthonMLCodes;
var cpml = new CallPthonMLCodes();
cpml.callPythonMLScriptFromNodeJS(pyFile, pyScriptPath, pyVersionPath, pyMode);
}
testDrillingRareEvents()
{
// call AIML python script (this.pyFile) via Python-Shell
// pyFile (test_py_file_AIML.py) implements testing of drillingRareEvents() method
var pyFile = this.pyFile;
var pyFile = this.pyFile;
var pyScriptPath = this.pyScriptPath;
var pyVersionPath = this.pyVersionPath;
var pyMode = this.pyMode;
var cpml = new CallPthonMLCodes();
var CallPthonMLCodes = require('./CallPthonMLCodes.js').CallPthonMLCodes;
var cpml = new CallPthonMLCodes();
cpml.callPythonMLScriptFromNodeJS(pyFile, pyScriptPath, pyVersionPath, pyMode);
}
}
module.exports = {DrillingRareEvents};