## 3 Methodology
### Constraints Knowledge Base  
The Decreto Aiuti n. 50/2022 ([[https://www.gazzettautificiale.it/eli/id/2022/05/17/22G00059/sg](https://www.gazzettautificiale.it/eli/id/2022/05/17/22G00059/sg)]([https://www.gazzettautificiale.it/eli/id/2022/05/17/22G00059/sg](https://www.gazzettautificiale.it/eli/id/2022/05/17/22G00059/sg)), accessed on 10 November 2024) introduced the rules for calculating the percentage of intervention achieved. When assessing the WPS of 30%, the overall intervention must be considered, including works carried out on the dwelling that does not fall within the scope of the Superbonus 110%, such as design costs, certifications, and other professional fees. The term \"total intervention\" is intended to define all expenses arising from the general economic framework of the intervention, including the technical costs relating to the services performed in connection with the works carried out on the building.  
The following are the six constraints designed:  
* Constraint 1. A specific agent (Director of Work) verifies compliance with the original schedule plan. Starting from a monthly forecast, the agent will be able to estimate the maturity of the WPS based on the previously mentioned criterion about the distribution of WPS. This translates into the fact that the possible states of the agents (workflow agent; see Section 5.4) are the following: \[x_{i}=\{Open,Anticipation,Sal1,Sal2,Eow,Archived\},\] or in brief \(x_{i}=\{Op,Ant,S1,S2,Eow,Arc\}\). We can, at this point, formalise the following expressions for each value of the state variable: \[x_{i}(0)\Longleftarrow Op\land\
eg Ant\land\
eg S1\land\
eg S2\land\
eg Eow \land\
eg Arc\] \[x_{i}(1)\Longleftarrow Op\land Ant\land\
eg S1\land\
eg S2\land\
eg Eow \land\
eg Arc\] \[\ldots\] \[x_{i}(5)\Longleftarrow Op\land\
eg Ant\land\
eg S1\land\
eg S2\land\
eg Eow \wedge Arc\] The Knowledge Base (KB) constraint can be, at this point, defined as follows: \[true\Longleftarrow x_{i}(0)\lor x_{i}(1)\lor x_{i}(2)\lor x_{i}(3)\lor x_{i}(4) \lor x_{i}(5)\]
* Constraint 2. Ensure token demand in Operator DAO aligns with Investor DAO forecasts. Based on previous WPSs, it is necessary to check financial expenditures and future needs at the closing of the WPS and thus verify that the expected demand for tokens in the Operator DAO (\(dao_{o}\)) does not exceed that forecast in the Investor DAO (\(dao_{i}\)). So if \(d_{t}\) is the demand for the token and \(f_{t}\) is the forecast need for a token at time \(t\), we must have: \[d_{t}\leq f_{t-1}\]
* Constraint 3. Do not spend more than allocated. Electronic invoices will be the source of the flow of economic transactions; they allow a transparent view of all expenditures in the WPS, so all payments performed (\(p_{s}\)) by the workflow agent must not exceed the payments received (\(p_{r}\)) as anticipation for that state. Both must be made by traceable means. If \(w_{t}\) is the state of the workflow agent at time \(t\), \[p_{s}(w_{t})\leq p_{r}(w_{t-1})\]
* Constraint 4. The homeowner may have at most two concessions per building unit to be refurbished. This translates in the condition that each client (\(c_{i}\)) may not have more than 2 workflow agents (\(w\)) opened: \[|w(c_{i})|\leq 2\]
* Constraint 5. Each project \(i\) must be certified by both technical and financial asseveration \(a\) raised by chartered engineers \(eng\) and accountants \(acc\) to grant the fairness of the expenses to the interventions listed in the WPS. Thus, if engineer \(j\) and accountant \(k\) are hired to asseverate project \(i\): \[true\Longleftarrow a(eng_{j})_{i}\land a(acc_{k})_{i}\]
* Constraint 6. The General Contractor (GC) may have more than one construction site assigned. The maximum limit is determined by the tax credit that may be handled or the value set in the Attestation Organisation Certification (AOC) he has in place (e.g.,1 million euros works for private buildings renovation category). So if the GC has \(j\) works of value \(w_{j}\) each:  
\[\sum w(GC_{i})_{j}\leq AOC(GC_{i})\]