{'fraction_non_alphanumeric': 0.02586560322015579, 'fraction_numerical': 0.006969550147217771, 'mean_word_length': 5.234200743494424, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Python Interactive Cost Control System for Major Contractors

In this study a computerised management system was developed to aid major contractors in improving cost control performance in construction projects. The system was developed by synthesising all construction cost-related functions into a comprehensive framework, taking into account both cost overrun factors and mitigating measures. These factors and measures were based on the findings of previous studies by the authors, in which 10 cost factors were specified as the most potentially controllable by contractors of an observed 59 influential factors identified in construction projects in Iraq. The system was then developed using Python programming language to incorporate the material, labour, and equipment costs of each construction activity. The system was then compared to in real life implementations in seven types of construction projects undertaken by the State Company for Project Execution of the Ministry of Transport, a major contracting company in Iraq, with the results showing that the system can be successfully utilised by major contractors for cost control during construction.


1.
Introduction Construction cost control is a pivotal issue in the construction industry, which must begin at the initial stages of the project life cycle, as conceptual planning is carried out, and continue until the final stage of works and commissioning is complete. It is a vital task for project managers, who must also monitor the actual cost of works taking place. Even where predicted costs are derived from a detailed project cost analysis, the actual costs may deviate from the planned ones due to many factors, and this requires project managers to take appropriate actions to adjust the project (Khaled and Aswed, 2017) [1]. Cost control requires efficient completion of the project within budget while preserving the quality of the final product (Ojedokun, et al., 2012) [2], which in turn requires early detection of any variations in material, labour, and equipment costs and for managers to take actions to manage the situation using the best available techniques (Veronika et al., 2006) [3]. Cost control can be achieved by selecting the right people for the job, and providing them with the right equipment and tools to do the right work with the right quality of materials in the right quantities, from the right sources, at the right time, at the right price (Dharwadker, 1985) [4]. Based on this, cost control in construction projects requires the application of suitable methods and techniques to encompass the entire range of cost issues (Sun et al., 2017) [5].

Aim and Objectives
The aim of this study was to develop a computerised system to improve the performance of contractors in terms of the cost control of construction projects using a modern programming language. Three objectives were set to achieve this aim: • To synthesise all construction cost-related functions into a comprehensive framework, taking into account cost overrun factors and mitigating measures. • To utilise the framework to build an interactive computer system using Python.
• To test the system against real life cases.

Justification
Most construction projects in Iraq face cost problems due to cost overruns, yet despite the availability of various control techniques and project control software, Iraqi construction firms do not make serious use of these (Al-Asadi et al., 2018) [6]. This study thus attempts to provide an easy interactive system for cost control at the execution phase of construction projects to be utilised as an efficient tool for resource cost control, thus affording improvements in construction project execution.

Methodology
In this research, the outcomes of previous studies by the authors were utilised to develop a framework for a cost control system. These were based on the most potentially controllable cost overrun causes and the associated mitigating measures as identified based on a field investigation and questionnaire survey (Ali et al., 2020 [7]; Ali et al. 2019 [8]). The literature on modern programming languages used in the field of construction project management was then carefully studied, with Python found to be most suitable language in which to develop the system. Cost-related factors and mitigating measures were thus built into computational models of systems developed by synthesising all cost-related operations within relevant construction projects.

2.
Literature Review Otim et al. (2012) [4] conducted a questionnaire survey to investigate the cost control techniques used in Uganda, identifying the factors that affected cost control during the design and construction stages. Seven cost control issues were investigated: work programs, inspection, budgets, meetings, documentation, monitoring, and evaluation of performance, with the conclusion being that the problem was actually not the issues themselves but rather a lack of knowledge and poor application and management. Li (2009) [9] identified the prevailing methods used for cost control in the Chinese construction industry, studying the influences of relevant issues in construction cost control such as bidding, contract management, construction management, material management, and settlement issues. A procedure was introduced to apply cost control at all stages by putting forward measures as needed. Jamaludin (2012) [10], conducted a study of cost control practices and procedures among contractors in Malaysia. The study formulated prevailing practices into different cost control strategies, noting that 80% of contractors used corrective cost control strategies, 12% of them used corrective strategies as well as preventive cost control strategies, and only 8% used only preventive cost control strategies. Elbeltagi (2014) [11], introduced the use of BIM in construction projects to support decision making, monitoring, and control of major deviations. This approach was subjected to evaluation by experts concerning simplicity, applicability in cost monitoring and control, and capability with regard to pinpointing areas in need of immediate corrective actions. Marrero et al. (2014) [12] developed a model for scheduling and cost control in dwelling construction using Spread Sheet. The model facilitated production monitoring by providing regular information about work progress and actual costs incurred. The monitoring processes also covered detailed information on all project items in order to facilitate decision making. The cost control issues highlighted in the literature review include poor application and management, delays linking causes with measures, and a lack of preventive strategies, in addition to an ignorance of IOP Publishing doi:10.1088/1757-899X/1067/1/012083 3 supportive tools such as computerised systems using BIM, Python, or even Spread Sheet, which can provide guidance for developing a the proposed system.

3.
Python Programming Language According to the literature, Python is "A general-purpose, high-level programming language with remarkable power and very clear, accessible and user-friendly syntax whose design philosophy emphasizes code readability", making it more attractive than other programming languages that could be used for this task such as C++, Java, Perl, and Lisp (Millman and Aivazis, 2011) [13]. Moreover, Python can be used as an extension language for existing applications that require a programmable interface, which has led to it being adopted as the preferred language for modelling complex engineering phenomena based on scientific methods (Pérez, Granger, and Hunter, 2011) [14]. Python is also now widely used as a scripting language for engineering software and is embedded in a number of packages such as Finite Element, Abacus and ArcGIS. It is also utilised in several civil engineering applications, including water resource, sanitary, geotechnical, highway engineering, and construction management (Butler, 2011) [15].

4.
Developing the System As a first step towards designing the system, the cost-related functions in any construction project must be identified. The main framework for this, as shown in Figure 1, covers cost-related functions in both owner-related and contractor-related phases. The latter must be taken into consideration in developing the proposed system if it is to aid contractors in cost control during the execution phase. The traditional practice related to ownership includes preparing the BOQ and cost estimating, however, which is out of the scope of the system. In terms of the contractor phase, the first function is tender pricing. The price breakdown structure and analysis of all project items must be fed into the system, as the system needs to compare actual incurred costs with planned ones in order to keep these within limits. When an offer is accepted and the contract signed, updating of the database should thus also be continuously carried out until the project is finished. Market price fluctuation must also be considered, and any delay in getting access to the site and starting mobilisation should be noted. The system then covers all project activities from inception, to preliminary acceptance certificate (PAC), until the final acceptance certificate (FAC), and all technical, financial and administrative information is saved in the database. The system can thus also aid in documenting and saving all related information both for the sake of the project in hand and for pricing future projects.

Materials Cost Control
In developing the system, emphasis was placed on material cost control due to the excessive variety of construction materials and huge potential for wastage. Material cost management requires many functions that must be performed correctly and integrally in order to properly control material costs. These functions include quantities take off, pricing, purchasing, supplying, storage, handling, and usage. The control level for each activity depends on the cost breakdown structure of all project materials and their allocation to cost centres. Figure 2 shows the flow of material-related functions. The process of supplying material thus starts when the site manager submits a requisition showing the quantities and specifications of each requested item in addition to its current market cost. When the requisition is uploaded to the system, this is checked to ensure that the ordered materials are of the prescribed quantity, specification, and cost for each item. Where this is the case, the system immediately checks whether the materials are available in the storehouses, based on the inventory information which should be continuously updated in the system database. If the materials are available, these are supplied to the project. When insufficient quantities are available, the available materials will be supplied to the project and the rest ordered for purchase. If market prices have escalated, the case will be dealt with as an incompatibility, and a verification process initiated to identify the reasons behind the variations. A list of measures and solutions will then be devised for the specific case, and a decision can be made by an authorised entity to approve changes in quantities and/or specifications or to agree to the new prices. If changes are not approved, feedback is directed to the site manager to request an alternative requisition. Where changes are approved, the materials are purchased and supplied to the project, and the actual cost of material purchasing and supply is fed into the system.

Labour Cost Control
Further special attention has been paid to labour costs, which can be difficult to control due to their relationship with productivity and skills. Labour productivity standards from the Iraqi Unified Index for Standards are added to the system to aid as a guide. Figure 3 shows the flow of labour-related functions, with the site manager requisitioning appropriate labour that is then recruited to complete the specified work.  When the site manager requisition is uploaded to the system showing the required gang size, skills, and fees, the system immediately checks this to make sure that the order meets the prescribed requirements. In case of any incompatibility, a verification process is initiated to identify the reasons behind such variations. A list of measures and solutions is then devised that may include changes to construction methods, changes to design, or hiring non-local labourers. When the authorised entity approves any changes, the case is dealt with as a case of compatibility, and the labour is recruited. After the work is done, the actual cost, time, and quality is uploaded to the system, which provides further options based on the type of variance (cost, time, or quality). Once no unauthorised variance exists, payment is authorised. Where a quality variance exists, the work is either conditionally accepted or refused. If the work is refused, it requires repair or rework again. All these options are dealt with in the system. When labour cost or time variances exist, five reasons are available in the system: excessive quantities, unusual conditions, low productivity, force majeure, and quality variance. When any of these options are approved by the authorised entity, payment is made, and this is fed into the system.

Equipment Cost Control
Special attention has also been paid to the cost of equipment, as this is affected by productivity and arrangements. Productivity standards from the Iraqi Unified Guideline for Standards act as a guide to the system. Figure 4 shows the flow of equipment-related functions from site manager requisition through items being delivered and work completed. The manager request should include the required equipment type, size, number, and cost. When the site manager requisition is uploaded to the system, it is checked to ensure that the order meets the prescribed requirements. In cases of incompatibility, a verification process is initiated to identify the reasons behind variations. The list of measures and solutions includes changes in construction method, changes in design, and non-local equipment. When the authorised entity approves any changes, the case is dealt with as a case of compatibility, and the equipment is delivered. After the work is done, the actual cost, time and performance is uploaded to the system, and the system will provide options based on the type of variance (cost, time, or performance). If no variance exists, payment is made. Where a performance variance exists, five alternative measures are available in the system: change of equipment, change of operator, urgent maintenance, overtime, and the addition of supportive equipment. When any of these options are approved by the authorized entity, payment is also made, and the actual figures fed to the system. Figure 5 shows the six key interfaces: start-up, main menu, create new project, Login, BOQ management, and BOQ view. The BOQ Management interface enables the user to import a BOQ Excel sheet detailing the cost break down and activity durations. This interface contains several options associated with the basic information of the project including displaying a PDF of the Terms and Conditions and an Excel sheet of the stock in the storehouse. The BOQ Viewer interface enables the user to examine material, labour, and equipment details.

Start-up Main menu
Create new project Login BOQ management BOQ view

Material Management Interfaces
There are twelve interfaces for material management: type of request (also used for labour and equipment cost management), material requests, material details, approved requests, quantity justification, price justification, add comments, hold-on request, request acceptance, request rejection, material request status, and invoice form. There are also options to make a new request, to delete a request before submission, to review and prepare an invoice for printing, and to return to the previous interface. The approval interface is opened once the system finishes checking the requirements, while the justification interface opens when the system detects an increase in quantities and/or prices. The acceptance interface allows the authorised entity to accept or reject any requisitions.

Labour Management Interfaces
There are eight interfaces for labour management: labour request, labour details, labour approval, labour justification, add comments, hold-on request, request acceptance, and request rejection. The labour request interface offers three options: to make a new request, to delete a request, and to return to the previous interface. Here again, approval interface opens once the system finishes checking the requirements, while the justification interface opens when the system detects discrepancies. The site manager should then choose the proper alternative to address this from changing method, changing the design, or demanding non-local labour.
There are another twelve interfaces for labour management: performed work, actual labour work performed, actual labour work details, actual labour work approved, actual labour work justification, add comments, hold-on request, review options, actual labour rework details, actual labour rework approved, labour work bill, and database update. The feedback interface provides options to add the actual performed work information, to delete an entry before submission, to prepare a bill for printing, and to return to the previous interface. The acceptance interface opens after the system finishes checking the work performed; where no variances are detected, the system approves the work so that payment can be made according to the payment bill presented by the system. Otherwise, four types of cost variations are possible in the system: excessive quantity, unusual conditions, low productivity, and force majeure. Quality variance is embedded in the excessive quantity option. The justification interface opens when the system detects one of these variations, and many possible causes and measures have been included. The site manager should thus specify the type of variation and choose the proper action. In addition, an interface for additional comments is available for further details or justifications.

Equipment Management Interfaces
The equipment management interfaces are similar to the labour management interfaces except that they use equipment-related data and processes. They include equipment request, request details, approval, justification, and acceptance, and offer the same options to make a new request, to delete the request, or to return back to the previous interface. The approved equipment request interface starts after the system finishes checking fees and workmanship based on equipment size, work quantities, duration, and cost. Where no discrepancy is detected, the system automatically approves the request and the equipment is acquired. The equipment justification interface starts when the system detects variation, with similar interfaces for performed work including requests, acceptance, justification, and review work. Again, four options are available: to submit the actual information, to delete the entry, to prepare a bill for payment, and to return back to previous interface. The 'accept or reject requests' interface starts when the system finishes checking the work performance. When no variances are detected, the system automatically approves the work so that payment can be made according to the payment bill presented by the system. Otherwise, four types of cost variations are included in the system: Excessive quantity, unusual conditions, low productivity, and force majeure. Quality variance is again embedded in the option of excessive quantity. The justification interface starts when the system detects one of these variations, and the site manager should specify the type of variation from the multiple options available and choose the proper solution. The system can detect four types of variations: equipment size, work quantities, duration, and cost. The site manager should choose from the alternatives which include changing the construction method or design or demanding non-local equipment.

Discussion
In cases of incompatibility in material costs, a verification process is initiated to identify the reasons behind such variations. A list of measures and solutions is then devised for each individual case. The verification process includes the following: • A quantity check, to identify the reasons for requesting quantities higher than the BOQ, whether this is high wastage, excessive change orders, or estimation errors. • A specifications check: to identify the reasons for requesting material types different than those in the BOQ. This could happen when the initial specifications are exaggerated, or specific material types are not currently locally available and thus require import or substitution • A price check, to identify the reasons for requesting materials with higher prices, which could be a result of market price escalation or errors in the initial pricing of materials. When labour cost or time variances exist, five reasons are available in the system as follows: • Excessive quantities: this requires the issuance of a change order.
• Unusual conditions: this case requires a claim.
• Low productivity: this should be taken into consideration when noting uncompleted works and executing similar items later with increased gang size, gang replacement, or overtime. • Force majeure: this should be dealt with according to the contract conditions.
• Quality variance: this should occur only as a result of repairing or redoing defected works, as mentioned under quality variance above. When equipment cost or time variances exist, alternative measures are available in the system based on the following reasons: • Low productivity: this case should be taken into consideration when noting uncompleted works and executing similar items in the future as it requires changing equipment, changing operator, calling for urgent maintenance, working overtime, and/or adding support equipment. • Excessive quantities: this case requires a change order.
• Unusual conditions: this case requires a claim.
• Force majeure: this case should be dealt with according to the contract conditions. When any of the aforementioned options are approved by the authorised entity, payment can be made and fed into the system. The Review work interface is thus available to the authorised entity to allow review of the work performed to permit acceptance or rejection. This interface offers three options: to review performed labour, to review equipment, and to return back to the previous interface. The system presents each payment bill as soon as the relevant request is accepted, then automatically updates the relevant information in the database.

7.
Testing the System In order to assess the applicability of the developed system, it was applied to seven different types of construction projects at the State Company for Project Implementation in the Ministry of Transport (a major contracting company in Iraq), as listed in Table 1. A collective direct interview was then conducted with 30 professional engineers with different levels of experience working on such construction projects and in the Head Office of the company. An analysis of the questionnaire results showed that 25 respondents hold BScs, 4 hold MScs, and 1 holds a PhD degree. The group had 23 civil, 2 architectural, 2 mechanical, and 3 electrical engineers. With regard to respondents' experience, 6 have more than 25 years' experience, 8 have 21 to 25 years, 8 have 16 to 20 years, 4 have 11 to 15 years, 3 have 6 to 10 years and 1 has less than 6 years of experience. Of the respondents, 4 were head-office engineers, 9 were project managers, 10 were site engineers, 3 were planning and control engineers, and 2 were design engineers. The session began with a review of the computerised system and ended with respondents completing a questionnaire form designed to collect their judgments. The respondents were asked 10 questions on performance of the system, with ratings requested on a Likert-style scale of 1 to 5. The results of the performance evaluation by the respondents are listed in Table 2, and these support the applicability of the system. The reliability and validity of the questionnaire results were also tested using SPSS (V.22) to calculate the Cronbach's alpha, and the reliability and validity test results are shown in Table 3. Rehabilitation of "Karbala Hall" in Baghdad Airport. Baghdad 2 The Building of the Directorate of Land Transport. Baghdad 3 The New Transport Garage in "Al-Nahidha". Baghdad 4 Rehabilitation of "Al-Shalchia" Trains Maintenance Workshop. Baghdad 5 Rehabilitation of "Um-Qasser" Ports Entrances. Basra 6 Rehabilitation of "Musiyeb-Karbala" Railway Line. Babylon 7 The Modern Gas Station in "Al-Husseineyah". Diyala

Conclusions
Based on the test application of the developed system, the system can perform the following functions: • To organise and document all requisitions for all types of resources (materials, labour, and equipment). • To check conformance of resource quantities, specifications, timing, and prices with planned values, taking into account the information built-in to the database concerning governmental codes. • To compare actual costs with estimated ones and to thus specify cost variations.
• To calculate any remaining costs and/or quantities required for each item to project completion.
• To offer alternative solutions if the cost, quantity, time and/or specifications of any item varies from the planned values. • To control and monitor the costs of each item at any given point of time and to control and monitor inventory changes, in addition to evaluating work performance against set standards.

9.
Recommendations Based on the aforementioned conclusions, several recommendations are offered to the stakeholders in the Iraqi construction industry in an attempt to minimise cost overruns: • Contractors are recommended to adopt a cost management system using modern computerised methods to support singular, clear and sustainable strategies in order to ensure effective cost control. • Any adopted system should focus on labour and equipment productivity, S/C and suppliers' performance, site constraints, competence of project managers, and resource planning and control. • Contractors should ensure continuous training of staff in modern sophisticated planning and control software and techniques. • When planning for new jobs, contractors should be punctilious about adding details concerning the required skills, materials, and equipment. Intensive monitoring and documentation throughout construction is also needed.