1. A device comprising:at least one processor configured to:

receive a plurality of voltage values, wherein voltage values in the plurality of voltage values correspond to respective voltage nodes in a plurality of voltage nodes in a first portion of a power system;

determine, for each respective voltage node:

a respective value of a first voltage-constraint coefficient, based on a respective previous value of the first voltage-constraint coefficient, a minimum voltage value, and a respective voltage value in the plurality of voltage values that corresponds to the respective voltage node; and

a respective value of a second voltage-constraint coefficient based on a respective previous value of the second voltage-constraint coefficient, a maximum voltage value, and the respective voltage value;

receive a power value corresponding to a connection point of the first portion of the power system with a second portion of the power system;

determine for the connection point:

a value of a first power-constraint coefficient, based on a previous value of the first power-constraint coefficient, a power setpoint for the connection point, and the power value; and

a value of a second power-constraint coefficient based on a previous value of the second voltage-constraint coefficient, the power setpoint for the connection point, and the power value; and

cause at least one energy resource in a plurality of energy resources that are connected to the first portion of the power system to modify an output power of the at least one energy resource based on the respective value of the first voltage-constraint coefficient for each respective voltage node, the respective value of the second voltage-constraint coefficient for each respective voltage node, the value of the first power-constraint coefficient for the connection point, and the value of the second power-constraint coefficient for the connection point wherein:

determining the respective value of the first voltage-constraint coefficient comprises:

determining, based on the respective previous value of the first voltage-constraint coefficient, the minimum voltage value, and the respective voltage value in the plurality of voltage values that corresponds to the respective voltage node, a respective first voltage coefficient offset value;

scaling the respective first voltage coefficient offset value by a step size to determine a respective scaled first voltage coefficient offset value;

responsive to determining that a respective first sum of the respective previous value of the first voltage-constraint coefficient and the respective scaled first voltage coefficient offset value is greater than zero, setting the respective value of the first voltage-constraint coefficient to be the respective first sum; and

responsive to determining that the respective first sum is less than or equal to zero, setting the respective value of the first voltage-constraint coefficient to be zero,

determining the respective value of the second voltage-constraint coefficient comprises:

determining, based on the respective previous value of the second voltage-constraint coefficient, the maximum voltage value, and the respective voltage value in the plurality of voltage values that corresponds to the respective voltage node, a respective second voltage coefficient offset value;

scaling the respective second voltage coefficient offset value by the step size to determine a respective scaled second voltage coefficient offset value;

responsive to determining that a respective second sum of the respective previous value of the second voltage-constraint coefficient and the respective scaled second voltage coefficient offset value is greater than zero, setting the respective value of the second voltage-constraint coefficient to be the respective second sum; and

responsive to determining that the respective second sum is less than or equal to zero, setting the respective value of the second voltage-constraint coefficient to be zero,

determining the value of the first power-constraint coefficient comprises:

determining, based on the previous value of the first power-constraint coefficient, the power setpoint for the connection point, an accuracy value, and the power value, a first power coefficient offset value;

scaling the first power coefficient offset value by the step size to determine a scaled first power coefficient offset value;

responsive to determining that a third sum of the previous value of the first power-constraint coefficient and the scaled first power coefficient offset value is greater than zero, setting the value of the first power-constraint coefficient to be the third sum; and

responsive to determining that the third sum is less than or equal to zero, setting the value of the first power-constraint coefficient to be zero, and

determining the value of the second power-constraint coefficient comprises:

determining, based on the previous value of the second power-constraint coefficient, the power setpoint for the connection point, the accuracy value, and the power value, a second power coefficient offset value;

scaling the second power coefficient offset value by the step size to determine a scaled second power coefficient offset value;

responsive to determining that a fourth sum of the previous value of the second power-constraint coefficient and the scaled second power coefficient offset value is greater than zero, setting the value of the second power-constraint coefficient to be the fourth sum; and

responsive to determining that the fourth sum is less than or equal to zero, setting the value of the second power-constraint coefficient to be zero.