Model Soft Constraints using Penalty Prices

This example is valid for AC(O)PF scenarios.

1. Create a penalty price event

Once the network and scenario files are loaded into the SAInt project environment, a constraint of a network object can be relaxed using a penalty price event. A PRC suffix in a scenario event extension identifies the penalty price events. Similar to other properties, this event overwrites the default penalty price value.

The prioritization of the soft constraint is based on the value of the penalty price. If the penalty price is lower than the marginal production cost, the constraint will be violated since paying the penalty is cheaper than producing. Additionally, constraints with a higher penalty have priority over constraints with a lower penalty. In this example, the PSET and PSETPRC events are created for the electric demand object, as shown in Figure 1. The PSET event has an assigned profile (PRF_DEMAND), while the PSETPRC event has a value of 200 [$/MWh], the penalty for not serving the demand’s set point.

model soft constraints 00
Figure 1. EEVT CITY demand PSET and PSETPRC events.
Click here to view examples of penalty price events for electric objects.
Table 1. Examples of penalty price events for electric objects.
Network Object Scenario Events Description

Branches (EBR)

PMAXPRC / PMINPRC

Penalty for violating max or min active power in forward branch direction.

Branches (EBR)

PMAXREVPRC

Penalty for violating max active power in reverse branch direction.

Externals (EXT)

PMAXPRC / PMINPRC

Penalty for violating max or min active power of the externals.

Externals (EXT)

PSETPRC

Penalty for not meeting (curtailing) active power set point.

Hydro Generators (HGEN)

PDMAXPRC / PDMINPRC

Penalty for violating max or min demand rate for pumping (charging rate).

Hydro Generators (HGEN)

PGMAXPRC / PGMINPRC

Penalty for violating max or min generation rate for turbination (discharging rate).

Hydro Plant (HYDP)

PUMPMAXPRC/ PUMPMINPRC

Penalty for violating the total pumped flow through a hydro plant.

Hydro Plant (HYDP)

TURBMAXPRC / TURBMINPRC

Penalty for violating max or min total turbinated flow through hydro plant.

Hydro Plant (HYDP)

SPILLPRCDEF

Penalty for spilled flow.

Hydro Plant (HYDP)

SPILLMAXPRC / SPILLMINPRC

Penalty for violating max or min total spilled flow.

Hydro Plant (HYDP)

VOLMAXPRC / VOLMINPRC

Penalty for violating max or min reservior volume.

Hydro Plant (HYDP)

VOLSETPRC

Penalty for curtailing reservoir volume set point.

Storage (ESTR)

PDMAXPRC / PDMINPRC

Penalty for violating max or min charging rate.

Storage (ESTR)

PGMAXPRC / PGMINPRC

Penalty for violating max or min discharging rate.

2. Compare the penalty price and marginal cost

After executing the scenario optimization, the results can be analyzed using the table functions in the Command Window. Figure 2 compares the demand penalty price and the marginal cost of the "COAL" generator. During the optimization, since the generator’s marginal cost is lower than the penalty price for not serving the demand, the generator is dispatched to meet the PSET of the demand.

Click here to view the table command used in the Command Window.

table('EDEM.CITY.PSET;header=SetPoint [MW]','EDEM.CITY.P;header=Power [MW];title= Penalty Price Vs. Marginal Cost','EDEM.CITY.PNS;header=PowerNotServed [MW]','EDEM.CITY.PSETPRC;header=PenaltyPrice [$/MWh]','FGEN.COAL.TOTCOSTRATE/FGEN.COAL.P;header = MarginalCost [$/MWh]', '01/01/22 01:00','03/01/22 00:00')

model soft constraints 01
Figure 2. Demand properties and COAL generator marginal cost.

3. Adjust the PSET constraint to a soft constraint

Based on the results shown in Figure 2, the PSET constraint can be relaxed by lowering the penalty price. Edit the value of the PSETPRC event to 72 [$/MWh]. As a result, the PSET is changed to a soft constraint and is violated if the marginal cost of the generator is higher than the new penalty price, as shown in Figure 3.

Click here to view the plot command used in the Command Window.

nplot('EDEM.CITY.P;lightskyblue;[120,0,6];stackcolumn;legend=Power;title=City Demand','EDEM.CITY.PNS;stackcolumn;dodgerblue;legend=PowerNotServed','EDEM.CITY.PSET;navy;dash;5;stepline;[120,0,6];legend=SetPoint', '01/01/22 01:00','03/01/22 00:00')

model soft constraints 02
Figure 3. Plot CITY demand active power with a soft PSET constraint.
The optimization equation is to minimize the operational cost of the overall system. Therefore the prioritization level of the system’s constraints can be adjusted by changing the penalty price, allowing for sensitivity analysis of different systems' limitations and assumptions.