## 3 Evaluate Options Sub-tool  
This stage identifies the best possible ANG utilisation option to achieve the goal and the specified target threshold for the RAFMF. A techno-economic evaluation is used to assess the different ANG utilisation options. This stage comprises the majority of technical and economic aspects. This stage is vital because it helps to ascertain the consequences of the various techniques picked and predict the feasibility of the ANG utilisation project of any oil and gas field for fruitful investment. The technical and economic models are connected to the tool to provide real-time accurate information. Furthermore, the transportation costs of the various processes are assessed and accounted for in the capital investment statement. Revenue and an income and return cost statement are evaluated to produce key economic indicators such as NPV, PBP, ROI, and so on. Figure 10 depicts a flowchart for evaluating options. Evaluate Option--How It Works  
This is the final sub-tool in the process. Here, several economic statements are calculated and tabulated according to the three gas flaring processes (GTM, GTW, and LNG) evaluated. It is necessary to interact with each process simulation in real time to acquire the most accurate data for analysis in the tool. The illustration in Figure 11 shows how the tool works together with the simulation in real time. The Evaluate Options user interface was divided into five groupings to reflect the different economic statements and control groups. The groupings are Capital Investment Statement, Operating and Maintenance Cost Statement, Income and Return Cost Statement, Sensitivity Chart section, and a Control section. Figure 8: Decision Phase flowchart. Figure 9: Reduce to Target Threshold flowchart. Evaluate Options Sub-Tool--The Backend  
The Evaluate Options backend connects to Aspen HYSYS simulations for each process. It then extracts the final output and calculates a number of economic statements. This is actualised on the backend by the steps outlined and expanded below:  
1. Connecting to Aspen HYSYS process simulations in real time. 2. Connecting to Aspen HYSYS from MATLAB. 3. Running the corresponding steady-state simulation depending on \(\mathrm{V_{F}}\) input. 4. Obtaining final output from the simulation. 5. Calculating and evaluating economic statements using values from the simulation. Connecting to Aspen HYSYS Process Simulations in Real Time  
To connect and interact with the process simulations, the Evaluate Options sub-tool must undergo an initial run. This is where the Microsoft Com interface is initialised and a connection to the process simulations is made. When the tool is run, the simulation process is triggered via the Microsoft Com interface to enable automation and interaction between the management tool program in MATLAB and the process simulation in Aspen HYSYS to provide the necessary/final outputs for evaluating the merits of each process. The illustration in Figure 11 shows the data flow diagram from the frontend to the backend and through the process simulations and finally back at the frontend. Initially, connecting MATLAB to Aspen HYSYS presented challenges, such as difficulty in developing and applying the ActiveX (a Microsoft software framework) code references (syntax) that supports the interface between MATLAB and Aspen HYSYS software, which was eventually overcome through inputting the proper syntax. Connecting to Aspen HYSYS via MATLAB ActiveX server, the code highlighted below illustrates the creation of an ActiveX object for each process. This is the first step to interacting with Aspen HYSYS from MATLAB. Here, an ActiveX Object for each process is created and then initialised. Running the Corresponding Steady-State Simulation Depending on VF Input  
The \(\mathrm{V_{F}}\) variable is evaluated, and if it falls within a certain value range, the corresponding steady-state simulation file on the disk is activated. This is performed for all processes, i.e., GTM, LNG, and GTW.