View Javadoc
1   /*
2    * Licensed to the Hipparchus project under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The Hipparchus project licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      https://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.hipparchus.optim.nonlinear.vector.constrained;
18  
19  import org.hipparchus.linear.RealVector;
20  
21  /** Internal Solution for ADMM QP Optimizer.
22   * @since 3.1
23   */
24  public class ADMMQPSolution extends LagrangeSolution {
25  
26      /** V-tilde auxiliary variable. */
27      private final RealVector v;
28  
29      /** Z auxiliary variable. */
30      private final RealVector z;
31  
32      /** Simple constructor.
33       * @param x solution
34       * @param lambda Lagrange multipliers
35       * @param value objective function value
36       */
37      public ADMMQPSolution(RealVector x, RealVector lambda, Double value) {
38          super(x, lambda, value);
39          this.v = null;
40          this.z = null;
41      }
42  
43      /** Simple constructor.
44       * @param x solution
45       * @param v V-tilde auxiliary variable
46       */
47      public ADMMQPSolution(RealVector x, RealVector v) {
48          super(x, null, 0.0);
49          this.v = v;
50          this.z = null;
51      }
52  
53      /** Simple constructor.
54       * @param x solution
55       * @param v V-tilde auxiliary variable
56       * @param y Lagrange multipliers
57       * @param z Z auxiliary variable
58       */
59      public ADMMQPSolution(final RealVector x, final RealVector v, final RealVector y, final RealVector z) {
60          super(x, y, 0.0);
61          this.v = v;
62          this.z = z;
63      }
64  
65      /** Simple constructor.
66       * @param x solution
67       * @param v V-tilde auxiliary variable
68       * @param y Lagrange multipliers
69       * @param z Z auxiliary variable
70       * @param value objective function value
71       */
72      public ADMMQPSolution(final RealVector x, final RealVector v, final RealVector y, final RealVector z, double value) {
73          super(x, y, value);
74          this.v = v;
75          this.z = z;
76      }
77  
78      /**
79       * Returns V tilde auxiliary Variable
80       *
81       * @return V tilde auxiliary Variable
82       */
83      public RealVector getV() {
84          return this.v;
85      }
86  
87      /**
88       * Returns Z auxiliary Variable
89       *
90       * @return Z auxiliary Variable
91       */
92      public RealVector getZ() {
93          return this.z;
94      }
95  
96  }