optiwindnet.MILP.pyomoΒΆ
Module ContentsΒΆ
- optiwindnet.MILP.pyomo.make_min_length_model(A: networkx.Graph, capacity: int, *, topology: optiwindnet.MILP._core.Topology = Topology.BRANCHED, feeder_route: optiwindnet.MILP._core.FeederRoute = FeederRoute.SEGMENTED, feeder_limit: optiwindnet.MILP._core.FeederLimit = FeederLimit.UNLIMITED, balanced: bool = False, max_feeders: int = 0) tuple[pyomo.environ.ConcreteModel, optiwindnet.MILP._core.ModelMetadata][source]ΒΆ
Make discrete optimization model over link set A.
Build ILP Pyomo model for the collector system length minimization.
- Parameters:
A β graph with the available edges to choose from
capacity β maximum link flow capacity
topology β one of Topology.{BRANCHED, RADIAL}
feeder_route β FeederRoute.SEGMENTED -> feeder routes may be detoured around subtrees; FeederRoute.STRAIGHT -> feeder routes must be straight, direct lines
feeder_limit β one of FeederLimit.{MINIMUM, UNLIMITED, SPECIFIED, MIN_PLUS1, MIN_PLUS2, MIN_PLUS3}
max_feeders β only used if feeder_limit is FeederLimit.SPECIFIED
- optiwindnet.MILP.pyomo.warmup_model(model: pyomo.environ.ConcreteModel, metadata: optiwindnet.MILP._core.ModelMetadata, S: networkx.Graph) pyomo.environ.ConcreteModel[source]ΒΆ
Set initial solution into model.
Changes model and metadata in-place.
- Parameters:
model β pyomo model to apply the solution to.
metadata β indices to the modelβs variables.
S β solution topology
- Returns:
The same model instance that was provided, now with a solution.
- Raises:
OWNWarmupFailed β if some link in S is not available in model.