• Keine Ergebnisse gefunden

Acceleration of Solving MINLPs by Symbolic Computation

4.3 Symbolic computation

4.3 Symbolic computation

As we discussed at the end of Section 4.2.2, to replace constraints ((2.1), (2.7), (4.1), (4.2)) by constraints ((4.3), (4.4), (4.5)), we need to know the function๐‘“๐‘—for every node๐‘—in a semi-passive network๐บ๐‘ . Consider CNS(๐บ๐‘ ) again. For every arc๐‘Žthere is a function๐‘”๐‘Žwith๐‘„๐‘Ž=๐‘”๐‘Ž(๐‘„๐‘ ), where๐‘”๐‘Žis continuous, decreasing, increasing or constant. The flow direction through arc๐‘Ž, which corresponds to the sign of๐‘„๐‘Ž, is said to be decided with inflow๐‘„๐‘ โˆˆ โ„ := [๐‘„1๐‘ , ๐‘„2๐‘ ]if ๐‘„๐‘Ž โ‰ค0or๐‘„๐‘Ž โ‰ฅ0for all๐‘„๐‘ โˆˆ โ„. Since one of๐‘”๐‘Ž(๐‘„1๐‘ )and๐‘”๐‘Ž(๐‘„2๐‘ )is the maximum and the other is the minimum of๐‘„๐‘Ž, the flow direction is decided if and only if

๐‘”๐‘Ž(๐‘„1๐‘ )ยท๐‘”๐‘Ž(๐‘„2๐‘ )โ‰ฅ0.

With this property we make the following definition.

Definition 4.5 (Flow direction decided domain)

A domainโ„ := [๐‘„1๐‘ , ๐‘„2๐‘ ]with two constants๐‘„1๐‘ , ๐‘„2๐‘  โˆˆRis said to be aflow direction decided domainif for every arc๐‘Žโˆˆ ๐’œ๐‘ it holds

๐‘”๐‘Ž(๐‘„1๐‘ )ยท๐‘”๐‘Ž(๐‘„2๐‘ )โ‰ฅ0.

Note that such a flow direction decided domain always exists. Because for any๐‘„0๐‘  โˆˆ R a given constant, there exists an๐œ€ > 0so that for every arc๐‘Ž, either๐‘„๐‘Ž = ๐‘”๐‘Ž(๐‘„๐‘ ) โ‰ค 0or

as constants or parameter and all๐‘„๐‘Ž,โ„Ž๐‘— as variables. Note that๐‘„๐‘กcan be eliminated since it depends only on value of๐‘„๐‘ .

Before we solve SPE๐‘†(๐บ๐‘ ), we look at the definitions and theorems concerning varieties and ideals. These are taken from the book of Cox et al. [CLO92].

Definition 4.6 (Ideal)

Let๐‘˜be a field. A subset๐ผ โŠ‚๐‘˜[๐‘ฅ1, ๐‘ฅ2, . . . , ๐‘ฅ๐‘›]of the polynomial ring๐‘˜[๐‘ฅ1, ๐‘ฅ2, . . . , ๐‘ฅ๐‘›]is an idealif it satisfies:

โ€ข 0โˆˆ๐ผ;

โ€ข if๐‘“, ๐‘”โˆˆ๐ผ, then๐‘“+๐‘”โˆˆ๐ผ;

โ€ข if๐‘“ โˆˆ๐ผandโ„ŽโˆˆR[๐‘ฅ1, ๐‘ฅ2, . . . , ๐‘ฅ๐‘›], thenโ„Ž๐‘“ โˆˆ๐ผ. Definition 4.7 (Affine variety and polynomial ideal)

Let๐‘˜be a field and๐‘“1, ๐‘“2, . . . , ๐‘“๐‘ be polynomials in๐‘˜[๐‘ฅ1, ๐‘ฅ2, . . . , ๐‘ฅ๐‘›].Then we set V(๐‘“1, ๐‘“2, . . . , ๐‘“๐‘ ) ={(๐‘Ž1, . . . , ๐‘Ž๐‘›)โˆˆ๐‘˜๐‘›:๐‘“๐‘–(๐‘Ž1, . . . , ๐‘Ž๐‘›) = 0for all1โ‰ค๐‘–โ‰ค๐‘ }.

We callV(๐‘“1, ๐‘“2, . . . , ๐‘“๐‘ )theaffine varietydefined by๐‘“1, ๐‘“2, . . . , ๐‘“๐‘ . Further we set

โŸจ๐‘“1, . . . , ๐‘“๐‘ โŸฉ= {๏ธƒ ๐‘ 

โˆ‘๏ธ

๐‘ก=1

โ„Ž๐‘ก๐‘“๐‘ก:โ„Ž1, . . . , โ„Ž๐‘  โˆˆ๐‘˜[๐‘ฅ1, ๐‘ฅ2, . . . , ๐‘ฅ๐‘›] }๏ธƒ

.

Note that๐ผ :=โŸจ๐‘“1, . . . , ๐‘“๐‘ โŸฉis an ideal, a proof can be found in the book of Cox et al. [CLO92].

We denote alsoV(๐ผ) =V(๐‘“1, ๐‘“2, . . . , ๐‘“๐‘ )as the affine variety defined by๐‘“1, ๐‘“2, . . . , ๐‘“๐‘ . From that book we have also the following theorem.

Theorem 4.8 (Elimination and Extension Theory)

Let๐ผ be a polynomial ideal with๐ผ = โŸจ๐‘“1, . . . , ๐‘“๐‘ โŸฉ โŠ‚ C[๐‘ฅ1, ๐‘ฅ2, . . . , ๐‘ฅ๐‘›]where V(๐ผ) is not an empty set. Assume there exists๐‘๐‘–(๐‘ฅ๐‘–) โˆˆC[๐‘ฅ๐‘–]such that๐‘๐‘–(๐‘ฅ๐‘–) โˆˆ ๐ผ for one๐‘– โˆˆ {1, . . . , ๐‘›}. It follows then

โ€ข if๐‘ฅยฏ๐‘–โˆˆCwith๐‘๐‘–(ยฏ๐‘ฅ๐‘–) = 0, then there exists(๐‘ฅ1, ๐‘ฅ2, . . . , ๐‘ฅ๐‘›)โˆˆV(๐ผ)such that๐‘ฅ๐‘– = ยฏ๐‘ฅ๐‘–;

โ€ข for any(๐‘ฅ1, ๐‘ฅ2, . . . , ๐‘ฅ๐‘›)โˆˆV(๐ผ), it holds๐‘๐‘–(๐‘ฅ๐‘–) = 0.

Furthermore,V(๐ผ)is a finite set if and only if there exists๐‘๐‘–(๐‘ฅ๐‘–)โˆˆC[๐‘ฅ๐‘–]with๐‘๐‘–(๐‘ฅ๐‘–)โˆˆ๐ผ for any ๐‘–โˆˆ {1, . . . , ๐‘›}.

Note that Theorem 4.8 may not be true if we replaceCbyR, sinceRis not algebraically closed, e.g., the polynomial๐‘ฅ2+ 1โˆˆR[๐‘ฅ]has no root inRbut has a root inC. However, the ideal๐ผcan be selected so that all๐‘“๐‘– โˆˆR[๐‘ฅ1, ๐‘ฅ2, . . . , ๐‘ฅ๐‘›]โŠ‚C[๐‘ฅ1, ๐‘ฅ2, . . . , ๐‘ฅ๐‘›].

Consider the system of polynomial equations SPE๐‘†(๐บ๐‘ )with a given flow direction decided domainโ„ again. Let๐‘“ห™1,๐‘“ห™2, . . . ,๐‘“ห™๐‘ be all polynomials in SPE๐‘†(๐บ๐‘ )which generate an ideal ๐ผ =โŸจ๐‘“ห™1, . . . ,๐‘“ห™๐‘ โŸฉ. The set๐‘‰(๐ผ)is not an empty set since for parameter๐‘„๐‘ โˆˆ โ„the corresponding CNS(๐บ๐‘ )has a solution which is also of solution of SPE๐‘†(๐บ๐‘ ). According to Theorem 4.4, for any fixed given๐‘„๐‘ the polynomial system SPE๐‘†(๐บ๐‘ )has a unique solution. We handle๐‘„๐‘ as symbolic parameter but not a parameter. Then Theorem 4.8 implies that the corresponding set

4.3 Symbolic computation

๐‘‰(๐ผ)is finite while๐ผ is generated by all polynomials in SPE๐‘†(๐บ๐‘ )Then for every variableโ„Ž๐‘— or๐‘„๐‘Ž, polynomials of the form๐‘๐‘—(โ„Ž๐‘—)or๐‘๐‘Ž(๐‘„๐‘Ž)can be found by computing the Grรถbner bases with appropriately chosen monomial orderings [Laz83]. There are several software packages, e.g., Maple [Map] and Singular [DGPS12] which can compute Grรถbner bases and can check whether the affine variety of a given polynomial system is a finite set. Examples of applications using Maple can be found in [MG94; GDS94; Zac96; RlRmL14; GKZ90].

On the one hand, all of๐‘๐‘—(โ„Ž๐‘—)and๐‘๐‘Ž(๐‘„๐‘Ž)can be regarded as univariate functions which contain symbolic parameter๐‘„๐‘ , every root of๐‘๐‘—(โ„Ž๐‘—)and๐‘๐‘Ž(๐‘„๐‘Ž)is a function that maps๐‘„๐‘ 

toโ„Ž๐‘— or to๐‘„๐‘Ž. On the other hand, for any fixed๐‘„๐‘ โˆˆ โ„, the unique solution for CNS(๐บ๐‘ )in Theorem 4.4 is a solution for SPE๐‘†(๐บ๐‘ )as well. It implies thatโ„Ž๐‘— =๐‘“๐‘—(๐‘„๐‘ )is a root for๐‘๐‘—(โ„Ž๐‘—) for all๐‘„๐‘ โˆˆ โ„ and for all nodes๐‘—. Similarly,๐‘„๐‘Ž=๐‘”๐‘Ž(๐‘„๐‘ )is a root for๐‘๐‘Ž(๐‘„๐‘Ž)for all๐‘„๐‘ โˆˆ โ„ and for all arcs๐‘Ž. According to Abel-Ruffini theorem [Sko11], there is no algebraic solution to the general univariate polynomial equations of degree five or higher with arbitrary coefficients.

It is clear that the roots for a general univariate polynomial can be found if and only if the degree is no more than4. Assume that the degree of๐‘๐‘—(โ„Ž๐‘—)is๐‘‘๐‘— โ‰ค4(in our instance we have ๐‘‘๐‘— = 4), then all๐‘‘๐‘— roots๐‘Ÿ1, ๐‘Ÿ2, . . . , ๐‘Ÿ๐‘‘๐‘— can be found by using Maple or Singular. Note that every๐‘Ÿ๐‘–can be regarded as a function that maps๐‘„๐‘ toโ„Ž๐‘— if all other parameters are given as constants. With any fixed๐‘„ยฏ๐‘  โˆˆ โ„, the unique solution of CNS(๐บ๐‘ )can be found by using any NLP solver, e.g. SCIP.

Let๐‘Ÿ1, . . . , ๐‘Ÿ๐‘‘๐‘—be the๐‘‘๐‘—roots of polynomial๐‘๐‘—(โ„Ž๐‘—). Since any๐‘Ÿ๐‘—can be regarded as univariate function of ๐‘„๐‘ , Theorem 4.4 and Theorem 4.8 imply together that there exists exactly one

ยฏ๐‘— โˆˆ {1, . . . , ๐‘‘๐‘—}such that๐‘“๐‘—(๐‘„๐‘ ) =๐‘Ÿยฏ๐‘—(๐‘„๐‘ )in domainโ„.

since๐‘Ÿยฏ๐‘— is the unique candidate. We call the solution with๐‘„๐‘ = ยฏ๐‘„๐‘ adistinction solution. Simi-larly, all other functions๐‘“๐‘—and๐‘„๐‘Žin domainโ„can be found if the degree of the corresponding polynomial is no more than4and a distinction solution can be found.

Let[๐‘„min๐‘  , ๐‘„max๐‘  ]be the domain of๐‘„๐‘ . Recall that all constraints ((2.1), (2.7), (4.1), (4.2)) related to ๐บ๐‘  in the entire MINLP can be replaced by constraints ((4.3), (4.4), (4.5)), where only functions ๐‘“๐‘— appear in these new constraints. We design algorithm 4.1 to compute ๐‘“๐‘—

symbolically for an arbitrarily selected node๐‘—. In this algorithm, in the first part, we split the original domain[๐‘„min๐‘  , ๐‘„max๐‘  ]to a set of sub-domains such that in every sub-domain is a flow direction decided domain. After that, we compute๐‘“๐‘— in every sub-domain separately. The correctness of the theorem is proved.

Theorem 4.9 (Correctness of Algorithm 4.1)

Algorithm 4.1 finds๐‘“๐‘— as defined in Theorem 4.4 if the algorithm terminates with โ€œsuccessโ€.

Algorithm 4.1:Symbolic computation to get๐‘“๐‘—

Input: A semi-passive subnetwork๐บ๐‘ , domain[๐‘„min๐‘  , ๐‘„max๐‘  ]for๐‘„๐‘ and node๐‘— Output: Function๐‘“๐‘—related to Theorem 4.4 for๐‘„๐‘ โˆˆ[๐‘„min๐‘  , ๐‘„max๐‘  ]

1 Initialize๐’ฎ :={[๐‘„min๐‘  , ๐‘„max๐‘  ]};

2 Get the solution of CNS(๐บ๐‘ )with๐‘„๐‘  =๐‘„min๐‘  and๐‘„๐‘ =๐‘„max๐‘  using an NLP solver. Let๐‘„ยด๐‘Ž and๐‘„`๐‘Žbe the value of๐‘„๐‘Žfor every arc๐‘Žin the solution with๐‘„๐‘  =๐‘„min๐‘  and๐‘„๐‘ =๐‘„max๐‘  , respectively.

3 for๐‘Žโˆˆ ๐’œ๐‘ do

4 if๐‘„ยด๐‘Žยท๐‘„`๐‘Ž<0then

5 Solve CNS(๐บ๐‘ )with additional constraint๐‘„๐‘Ž= 0, let๐‘„ยฏ๐‘ be the value of๐‘„๐‘ in the unique solution;

6 Get the intervalโ„๐‘Žโˆˆ ๐’ฎ which is[๐‘„1, ๐‘„2)(or[๐‘„1, ๐‘„2]) and contains๐‘„ยฏ๐‘ ;

7 if๐‘„ยฏ๐‘ โˆˆ(๐‘„1, ๐‘„2)then

8 Replaceโ„๐‘Žby[๐‘„1,๐‘„ยฏ๐‘ )and[ ยฏ๐‘„๐‘ , ๐‘„2)(or[ ยฏ๐‘„๐‘ , ๐‘„2]) in๐’ฎ;

9 end

10 end

11 end

12 foreveryโ„๐‘– โˆˆ ๐’ฎ do

13 Get sign assignment๐‘†according to (4.6) for๐‘„๐‘ โˆˆ โ„๐‘–, construct the corresponding SPE๐‘†(๐บ๐‘ );

14 Get๐‘๐‘—(โ„Ž๐‘—)by computing Grรถbner bases ;

15 if๐‘๐‘—(โ„Ž๐‘—)doesnotexistthen

16 Reportโ€œnot a finite setโ€andstop

17 end

18 Let๐‘‘๐‘—be the degree ;

19 if๐‘‘๐‘— >4then

20 Reportโ€œdegree too highโ€andstop

21 end

22 Compute roots๐‘Ÿ1, . . . , ๐‘Ÿ๐‘‘๐‘—;

23 whiletruedo

24 Choose a๐‘„ยฏ๐‘ โˆˆ โ„๐‘–(randomly) and compute the solution of CNS(๐บ๐‘ )with๐‘„๐‘ = ยฏ๐‘„๐‘ ;

25 ifthe solution is a distinction solutionthen

26 Getยฏ๐‘—and set๐‘“๐‘—(๐‘„๐‘ )|๐‘„๐‘ โˆˆโ„๐‘– :=๐‘Ÿยฏ๐‘—(๐‘„๐‘ );

27 break

28 end

29 end

30 end

31 Report โ€œsuccessโ€ and return๐‘“๐‘—