Search in sources :

Example 1 with SparseRealVector

use of org.apache.commons.math3.linear.SparseRealVector in project ipss-plugin by InterPSS-Project.

the class ApacheLPSolver method build.

@Override
public void build(List<OpfConstraint> cstContainer) {
    new ActivePowerEqnConstraintCollector(this.getNetwork(), cstContainer).collectConstraint();
    new LineMwFlowConstraintCollector(this.getNetwork(), cstContainer).collectConstraint();
    new GenMwOutputConstraintCollector(this.getNetwork(), cstContainer).collectConstraint();
    new BusMinAngleConstraintCollector(this.getNetwork(), cstContainer, BusAngleLimit).collectConstraint();
    ApacheLpsolveSolverObjectiveFunctionCollector objBuilder = new ApacheLpsolveSolverObjectiveFunctionCollector(this.getNetwork());
    SparseRealVector objVec = objBuilder.processGenCostFunction();
    objFunc = new LinearObjectiveFunction(objVec, 0);
    // add the additional constraints to constraint container
    objBuilder.genCostFunctionRefinement(cstContainer);
    new ApacheLpsolveSolverInputBuilder(cstContainer, constraintCollection, numOfVar + numOfGen).buildInput();
}
Also used : LineMwFlowConstraintCollector(org.interpss.plugin.opf.constraint.dc.LineMwFlowConstraintCollector) BusMinAngleConstraintCollector(org.interpss.plugin.opf.constraint.dc.BusMinAngleConstraintCollector) ActivePowerEqnConstraintCollector(org.interpss.plugin.opf.constraint.dc.ActivePowerEqnConstraintCollector) ApacheLpsolveSolverObjectiveFunctionCollector(org.interpss.plugin.opf.objectiveFunction.ApacheLpsolveSolverObjectiveFunctionCollector) LinearObjectiveFunction(org.apache.commons.math3.optimization.linear.LinearObjectiveFunction) SparseRealVector(org.apache.commons.math3.linear.SparseRealVector) GenMwOutputConstraintCollector(org.interpss.plugin.opf.constraint.dc.GenMwOutputConstraintCollector)

Aggregations

SparseRealVector (org.apache.commons.math3.linear.SparseRealVector)1 LinearObjectiveFunction (org.apache.commons.math3.optimization.linear.LinearObjectiveFunction)1 ActivePowerEqnConstraintCollector (org.interpss.plugin.opf.constraint.dc.ActivePowerEqnConstraintCollector)1 BusMinAngleConstraintCollector (org.interpss.plugin.opf.constraint.dc.BusMinAngleConstraintCollector)1 GenMwOutputConstraintCollector (org.interpss.plugin.opf.constraint.dc.GenMwOutputConstraintCollector)1 LineMwFlowConstraintCollector (org.interpss.plugin.opf.constraint.dc.LineMwFlowConstraintCollector)1 ApacheLpsolveSolverObjectiveFunctionCollector (org.interpss.plugin.opf.objectiveFunction.ApacheLpsolveSolverObjectiveFunctionCollector)1