A method for wastewater treatment that comprises receiving influent readings from sensors located along influent stream(s) of a wastewater treatment unit, effluent readings from sensors located along effluent stream(s) of the wastewater treatment unit, a feedback flow variable calculated according to a state of a feedback flow channel between an effluent output and an influent input, analyzing the influent readings and the effluent readings to extract an influent flow variable, a total nitrogen at effluent variable and a total phosphorus at effluent variable, and calculating control instructions to control the wastewater treatment unit by assigning a combination of a cost variable reflecting a treatment cost for treating the influent stream(s), a time period, the influent flow variable, the total nitrogen at effluent variable, the total phosphorus at effluent variable, and the feedback flow variable in a state space of the wastewater treatment unit.
Please help me write a proper abstract based on the patent claims. CLAIM: 1. A method for wastewater treatment, comprising: receiving influent readings from a plurality of influent sensors located along at least one influent stream of a wastewater treatment unit; analyzing said influent readings to extract an influent flow variable values; receiving effluent readings from a plurality of effluent sensors located along at least one effluent stream of said wastewater treatment unit; analyzing said effluent readings to extract a total nitrogen at effluent variable value and a total phosphorus at effluent variable value; receiving a feedback flow variable value calculated according to a condition of a feedback flow channel between an effluent output and an influent input; and calculating control instructions to control said wastewater treatment unit by estimating a state in a state space of said wastewater treatment unit according to a combination of a cost variable value reflecting a treatment cost for treating said at least one influent stream, a time period, said influent flow variable value, said total nitrogen at effluent variable value, said total phosphorus at effluent variable value, and said feedback flow variable value. 2. The method of claim 1, wherein said state space is defined according to a Markov decision process (MDP) framework. 3. The method of claim 1, wherein said state space is defined according to a constrained Markov decision process (CMDP) framework. 4. The method of claim 3, wherein said constrained Markov decision process framework is generated by calculating transition probability matrices by estimation a probability of transitioning from each state of said wastewater treatment unit to another state. 5. The method of claim 4, wherein said estimation is performed by an analysis historical reading of sensors and historical operation data of a plurality of wastewater treatment units. 6. The method of claim 4, wherein said calculating control instructions to control said wastewater treatment unit comprises calculating a policy for said wastewater treatment unit by said transition probability matrices and a set of constraints. 7. The method of claim 1, wherein said calculating control instructions to control said wastewater treatment unit is set for minimizing a total cost of a treatment process while complying with received regulatory requirements. 8. The method of claim 1, wherein said cost variable is a total cost variable summarizing at least some members of the following group: an electricity cost, a sludge disposal cost, and chemical costs. 9. The method of claim 1, wherein said control instructions are calculated while taking into account total nitrogen at effluent constraint and total phosphorus at effluent constraint. 10. The method of claim 1, wherein said influent readings and said effluent readings are received from a supervisory control and data acquisition (SCADA) system of said wastewater treatment unit and said control instructions are sent to said SCADA system. 11. The method of claim 1, wherein said calculating is performed using a CPLEX solver. 12. The method of claim 1, wherein said control instructions comprises an internal recycle (IR) pump rate change instructions. 13. The method of claim 1, wherein said control instructions comprises a flow pump rate instructions. 14. The method of claim 1, wherein said control instructions comprises instructions to adapt dissolved oxygen level in a reactor of said wastewater treatment unit. 15. A non transitory computer readable medium comprising computer executable instructions adapted to perform the method of claim 1. 16. A system for wastewater treatment, comprising: an interface for receiving: influent readings from a plurality of sensors located along at least one influent stream of a wastewater treatment unit, effluent readings from a plurality of sensors located along at least one effluent stream of said wastewater treatment unit, and a feedback flow channel variable value calculated according to a state of a feedback flow channel between an effluent output and an influent input a memory storing a code; a processor adapted to execute the following code instructions in said code: code instructions for analyzing said influent readings to estimate an influent flow variable value, code instructions for analyzing said effluent readings to estimate a total nitrogen at effluent variable value and a total phosphorus at effluent variable value, and code instructions for calculating control instructions to control said wastewater treatment unit by estimating a state in a state space of said wastewater treatment unit according to a combination of a cost variable value reflecting a treatment cost for treating said at least one influent stream, a time period value, said influent flow variable value, said total nitrogen at effluent variable value, said total phosphorus at effluent variable value, and said feedback flow variable value. 17. The system of claim 16, wherein said state space is defined according to a constrained Markov decision process (CMDP) framework. 18. The system of claim 16, wherein said influent readings and said effluent readings are received from a supervisory control and data acquisition (SCADA) system of said wastewater treatment unit and said control instructions are sent to said SCADA system. 19. The system of claim 16, wherein said cost variable is a total cost variable summarizing at least some members of the following group: an electricity cost, a sludge disposal cost, and chemical costs. 20. A computer program product for wastewater treatment, the computer program product comprising a non transitory computer readable storage medium having program instructions embodied therewith, the program instructions executable by at least one processor of at least one server to cause the server to: receive at said at least one server influent readings from a plurality of sensors located along at least one influent stream of a wastewater treatment unit; analyze at said at least one server said influent readings to extract an influent flow variable values; receive at said at least one server effluent readings from a plurality of sensors located along at least one effluent stream of said wastewater treatment unit; analyze at said at least one server said effluent readings to extract a total nitrogen at effluent variable value and a total phosphorus at effluent variable value; receive at said at least one server a feedback flow variable value calculated according to a condition of a feedback flow channel between an effluent output and an influent input; and calculate at said at least one server control instructions to control said wastewater treatment unit by estimating a state in a state space of said wastewater treatment unit according to a combination of a cost variable value reflecting a treatment cost for treating said at least one influent stream, a time period, said influent flow variable value, said total nitrogen at effluent variable value, said total phosphorus at effluent variable value, and said feedback flow variable value.