Module ml4opf.formulations.soc.model
Classes
class PerfectSOCModel (problem: SOCProblem)
-
Returns the ground truth, only works with test data.
Ancestors
Methods
def predict(self, pd: torch.Tensor, qd: torch.Tensor) ‑> dict[str, torch.Tensor]
-
Return the ground truth. Only works for
self.problem.test_data
.
Inherited members
class SOCModel
-
OPFModel
for SOCOPFAncestors
- OPFModel
- abc.ABC
Subclasses
Class variables
var problem : SOCProblem
var violation : SOCViolation
Methods
def predict(self, pd: torch.Tensor, qd: torch.Tensor) ‑> dict[str, torch.Tensor]
-
Predict the SOCOPF primal solution for a given set of loads.
Args
pd
:Tensor
- Active power demand per load.
qd
:Tensor
- Reactive power demand per load.
Returns
dict[str, Tensor]
-
Dictionary containing the predicted primal solution.
pg
: Active power generation per generator or per bus.qg
: Reactive power generation per generator or per bus.w
: Squared voltage magnitude per bus.wr
: Real part of the voltage phasor.wi
: Imaginary part of the voltage phasor.
Inherited members