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();
}
Aggregations