1. A method for controlling an electrical system, the method comprising the acts of: determining a first characteristic value of the electrical system; for the first characteristic value, determining a suitable first group of optimizing variables; determining a first group of command variables suitable for the first group of optimizing variables; for the first group of command variables, determining a first group of current boundary values; for each boundary value of the first group of current boundary values, predicting a first group of predicted boundary values; assigning a probability to each predicted boundary value of the first group of predicted boundary values to obtain a first group of predicted, probability-related boundary values; prioritizing all boundary values of the first group of current boundary values and of the first group of predicted, probability-related boundary values in order to obtain prioritized boundary values; using the prioritized boundary values, calculating at least one control value; and controlling the electrical system using the at least one calculated control value.