Electricity generation is vital in developed countries to power the many mechanical and electrical devices that people require. Unfortunately electricity generation is costly. Although electricity can be generated easily but not normally stored. Electricity generation is also difficult to manage because exact demand is unknown from one instant to the next. A number of services are required to manage fluctuations in electricity demand, and to protect the system when frequency falls below acceptable levels. A current approach is called automatic under frequency load shedding. This article proposes new methods for optimising this approach in New Zealand's power system. The core ideas were developed during the 2015 Maths and Industry Study Group in Brisbane, Australia. The problem was motivated by Transpower Limited, a company that manages New Zealand's power system and transports bulk electricity from where it is generated to where it is needed. The approaches developed in this article can be used in electrical power systems anywhere in the world. References Arroyo J. M. and Galiana F. D. Energy and reserve pricing in security and network constrained electricity markets. IEEE Transactions on Power Systems, 20(2):C634–C643, 2005. Burdett R. and Kozan, E. Performance profiling for predictive train schedules. Journal of Rail Transport Planning and Management, 4:C98–C114, 2014. doi:10.1016/j.jrtpm.2014.11.002. Hiscock J., Hiscock N. and Kennedy A. Advanced voltage control for networks with distributed generation. 19th International Conference on Electricity Distribution. Vienna, 21–24 May, 2007. Just S. and Weber C. Pricing of reserves. Energy Economics, 30:C3198–C3221, 2008. El-Khattam W., Bhattacharya K., Hegazy Y. and Salama M. M. A. Optimal investment planning for distributed generation in a competitive electricity market. IEEE Transactions On Power Systems, 19(3). Kusano N. New trends in protection relays and substation automation systems in Japan. Transmission and Distribution Conference and Exhibition 2002: Asia Pacific. IEEE/PES, 1, 624–628. Lopes J. A., Hatziargyriou N., Mutale J., Djapic P. and Jenkins, N. Integrating distributed generation into electric power systems: A review of drivers, challenges and opportunities. Electric Power Systems Research, 77, 1189–1203. Thomson M. Automatic voltage-control relays and embedded generation. Power Engineering Journal, April, 71–76. Wong S. and Fuller D. J. Pricing energy and reserves using stochastic optimization in an alternative electricity market. IEEE Transactions on Power Systems, 22(2), 631–638. Transpower AUFLS Summary Card. WL 13309 https://www.systemoperator.co.nz/sites/.../AUFLS_Summary_Card.pdf Transpower Electricity reserve technical requirements schedule–-ERTWG https://www.systemoperator.co.nz/sites/default/files/bulk-upload/documents/ERTWG%20Trial%20Procurement%20Schedule%20Guide.pdf AIMMS AIMMS 3.13 - AIMMS Modeling Guide - Integer Programming Tricks. http://www.aimms.com