humoto
constraints.h
Go to the documentation of this file.
1 /**
2  @file
3  @author Alexander Sherikov
4  @copyright 2014-2017 INRIA. Licensed under the Apache License, Version 2.0.
5  (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
6 
7  @brief
8 */
9 
10 #pragma once
11 
12 /**
13  * @ingroup _INTERNAL_
14  * @defgroup ConstraintsImplementation Constraints
15  */
16 
17 
18 namespace humoto
19 {
20  namespace constraints
21  {
22 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyTwoSidedInequalityToALMixin < CopyAnyToALUMixin < ViolationsComputationLUMixin < ActiveSetDeterminationLUMixin < BodyAMixin< BoundsLUMixin <t_Base> > > > > >
23  /**
24  * @brief Constraints 'lb <= A*x <= ub'.
25  *
26  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
27  */
28  template <class t_Base>
30  {
31  protected:
32  /**
33  * @brief Protected destructor: prevent destruction of the child
34  * classes through a base pointer.
35  */
38 
39 
40  public:
41  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
42  using HUMOTO_PARENT_CLASS_SHORTHAND::getA;
43  using HUMOTO_PARENT_CLASS_SHORTHAND::getLowerBounds;
44  using HUMOTO_PARENT_CLASS_SHORTHAND::getUpperBounds;
45 
46 
47 
48  /// @copydoc humoto::constraints::ConstraintsBase::getType
50  {
51  return (ConstraintType::ALU);
52  }
53 
54 
55  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
56  void checkConsistency() const
57  {
58  HUMOTO_ASSERT( (getA().rows() == getLowerBounds().rows())
59  && (getA().rows() == getUpperBounds().rows()),
60  "Size of A does not match sizes of the bounds.");
61 
62  HUMOTO_ASSERT( (getA().cols() > 0) && (static_cast<std::size_t>(getA().cols()) == getNumberOfVariables()),
63  "Incorrect number of columns in A.");
64  }
65  };
66 #undef HUMOTO_PARENT_CLASS_SHORTHAND
67 
68 
69 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyLowerInequalityToALMixin < CopyAnyToALUMixin < ViolationsComputationLMixin < ActiveSetDeterminationLMixin < BodyAMixin< BoundsLMixin <t_Base> > > > > >
70  /**
71  * @brief Constraints 'lb <= A*x'.
72  *
73  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
74  */
75  template <class t_Base>
77  {
78  protected:
79  /**
80  * @brief Protected destructor: prevent destruction of the child
81  * classes through a base pointer.
82  */
85 
86 
87  public:
88  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
89  using HUMOTO_PARENT_CLASS_SHORTHAND::getA;
90  using HUMOTO_PARENT_CLASS_SHORTHAND::getLowerBounds;
91 
92 
93 
94  /// @copydoc humoto::constraints::ConstraintsBase::getType
96  {
97  return (ConstraintType::AL);
98  }
99 
100 
101  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
102  void checkConsistency() const
103  {
104  HUMOTO_ASSERT( (getA().rows() == getLowerBounds().rows()),
105  "Size of A does not match sizes of the bounds.");
106 
107  HUMOTO_ASSERT( (getA().cols() > 0) && (static_cast<std::size_t>(getA().cols()) == getNumberOfVariables()),
108  "Incorrect number of columns in A.");
109  }
110  };
111 #undef HUMOTO_PARENT_CLASS_SHORTHAND
112 
113 
114 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyUpperInequalityToALMixin < CopyAnyToALUMixin < ViolationsComputationUMixin < ActiveSetDeterminationUMixin < BodyAMixin< BoundsUMixin <t_Base> > > > > >
115  /**
116  * @brief Constraints 'A*x <= ub'.
117  *
118  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
119  */
120  template <class t_Base>
122  {
123  protected:
124  /**
125  * @brief Protected destructor: prevent destruction of the child
126  * classes through a base pointer.
127  */
130 
131 
132  public:
133  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
134  using HUMOTO_PARENT_CLASS_SHORTHAND::getA;
135  using HUMOTO_PARENT_CLASS_SHORTHAND::getUpperBounds;
136 
137 
138  /// @copydoc humoto::constraints::ConstraintsBase::getType
140  {
141  return (ConstraintType::AU);
142  }
143 
144 
145  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
146  void checkConsistency() const
147  {
148  HUMOTO_ASSERT( getA().rows() == getUpperBounds().rows(),
149  "Size of A does not match sizes of the bounds.");
150 
151  HUMOTO_ASSERT( (getA().cols() > 0) && (static_cast<std::size_t>(getA().cols()) == getNumberOfVariables()),
152  "Incorrect number of columns in A.");
153  }
154  };
155 #undef HUMOTO_PARENT_CLASS_SHORTHAND
156 
157 
158 
159 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyAnyToALUMixin < CopyEqualityToABMixin < ViolationsComputationBMixin < ActiveSetDeterminationBMixin < BodyAMixin< BoundsBMixin <t_Base> > > > > >
160  /**
161  * @brief Constraints 'A*x = b'.
162  *
163  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
164  */
165  template <class t_Base>
167  {
168  protected:
169  /**
170  * @brief Protected destructor: prevent destruction of the child
171  * classes through a base pointer.
172  */
175 
176 
177  public:
178  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
179  using HUMOTO_PARENT_CLASS_SHORTHAND::getA;
180  using HUMOTO_PARENT_CLASS_SHORTHAND::getB;
181 
182 
183 
184  /// @copydoc humoto::constraints::ConstraintsBase::getType
186  {
187  return (ConstraintType::AB);
188  }
189 
190 
191  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
192  void checkConsistency() const
193  {
194  HUMOTO_ASSERT( (getA().rows() == getB().rows()),
195  "Size of A does not match size of b.");
196 
197  HUMOTO_ASSERT( (getA().cols() > 0) && (static_cast<std::size_t>(getA().cols()) == getNumberOfVariables()),
198  "Incorrect number of columns in A.");
199  }
200 
201 
202  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
203  void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
204  {
206  g.noalias() = getA().transpose()*getB();
207  }
208 
209 
210  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
211  void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
212  {
214  g.noalias() += getA().transpose()*getB();
215  }
216  };
217 #undef HUMOTO_PARENT_CLASS_SHORTHAND
218 
219 
220 
221 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyAnyToALUMixin < CopyEqualityToABMixin < ViolationsComputationB0Mixin < ActiveSetDeterminationBMixin < BodyAMixin< BoundsB0Mixin <t_Base> > > > > >
222  /**
223  * @brief Constraints 'A*x = 0'.
224  *
225  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
226  */
227  template <class t_Base>
229  {
230  protected:
231  /**
232  * @brief Protected destructor: prevent destruction of the child
233  * classes through a base pointer.
234  */
237 
238 
239  public:
240  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
241  using HUMOTO_PARENT_CLASS_SHORTHAND::getA;
242 
243 
244 
245  /// @copydoc humoto::constraints::ConstraintsBase::getType
247  {
248  return (ConstraintType::AB0);
249  }
250 
251 
252  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
253  void checkConsistency() const
254  {
255  HUMOTO_ASSERT( (getA().cols() > 0) && (static_cast<std::size_t>(getA().cols()) == getNumberOfVariables()),
256  "Incorrect number of columns in A.");
257  }
258 
259 
260  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
261  void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
262  {
264  HUMOTO_PARENT_CLASS_SHORTHAND::getATb(g);
265  }
266 
267 
268  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
269  void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
270  {
272  HUMOTO_PARENT_CLASS_SHORTHAND::addATb(g);
273  }
274  };
275 #undef HUMOTO_PARENT_CLASS_SHORTHAND
276 
277 
278  // ======================================================================================
279  // ======================================================================================
280  // ======================================================================================
281 
282 
283 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyTwoSidedInequalityToALMixin < CopyAnyToALUMixin < ViolationsComputationLUMixin < ActiveSetDeterminationLUMixin < BodyASMixin< BoundsLUMixin <t_Base> > > > > >
284  /**
285  * @brief Constraints 'lb <= A*S*x <= ub'.
286  *
287  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
288  */
289  template <class t_Base>
291  {
292  protected:
293  /**
294  * @brief Protected destructor: prevent destruction of the child
295  * classes through a base pointer.
296  */
299 
300 
301  public:
302  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
303  using HUMOTO_PARENT_CLASS_SHORTHAND::getA;
304  using HUMOTO_PARENT_CLASS_SHORTHAND::getOffset;
305  using HUMOTO_PARENT_CLASS_SHORTHAND::getLowerBounds;
306  using HUMOTO_PARENT_CLASS_SHORTHAND::getUpperBounds;
307 
308 
309 
310  /// @copydoc humoto::constraints::ConstraintsBase::getType
312  {
313  return (ConstraintType::ASLU);
314  }
315 
316 
317  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
318  void checkConsistency() const
319  {
320  HUMOTO_ASSERT( (getA().rows() == getLowerBounds().rows())
321  && (getA().rows() == getUpperBounds().rows()),
322  "Size of A does not match sizes of the bounds.");
323 
324  HUMOTO_ASSERT( (getA().cols() > 0)
325  && (static_cast<std::size_t>(getA().cols() + getOffset()) <= getNumberOfVariables()),
326  "Incorrect number of columns in A.");
327  }
328  };
329 #undef HUMOTO_PARENT_CLASS_SHORTHAND
330 
331 
332 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyLowerInequalityToALMixin < CopyAnyToALUMixin < ViolationsComputationLMixin <ActiveSetDeterminationLMixin < BodyASMixin< BoundsLMixin <t_Base> > > > > >
333  /**
334  * @brief Constraints 'lb <= A*S*x'.
335  *
336  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
337  */
338  template <class t_Base>
340  {
341  protected:
342  /**
343  * @brief Protected destructor: prevent destruction of the child
344  * classes through a base pointer.
345  */
348 
349 
350  public:
351  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
352  using HUMOTO_PARENT_CLASS_SHORTHAND::getA;
353  using HUMOTO_PARENT_CLASS_SHORTHAND::getOffset;
354  using HUMOTO_PARENT_CLASS_SHORTHAND::getLowerBounds;
355 
356 
357 
358  /// @copydoc humoto::constraints::ConstraintsBase::getType
360  {
361  return (ConstraintType::ASL);
362  }
363 
364 
365  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
366  void checkConsistency() const
367  {
368  HUMOTO_ASSERT( (getA().rows() == getLowerBounds().rows()),
369  "Size of A does not match sizes of the bounds.");
370 
371  HUMOTO_ASSERT( (getA().cols() > 0)
372  && (static_cast<std::size_t>(getA().cols() + getOffset()) <= getNumberOfVariables()),
373  "Incorrect number of columns in A.");
374  }
375  };
376 #undef HUMOTO_PARENT_CLASS_SHORTHAND
377 
378 
379 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyUpperInequalityToALMixin < CopyAnyToALUMixin < ViolationsComputationUMixin < ActiveSetDeterminationUMixin < BodyASMixin< BoundsUMixin <t_Base> > > > > >
380  /**
381  * @brief Constraints 'A*S*x <= ub'.
382  *
383  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
384  */
385  template <class t_Base>
387  {
388  protected:
389  /**
390  * @brief Protected destructor: prevent destruction of the child
391  * classes through a base pointer.
392  */
395 
396 
397  public:
398  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
399  using HUMOTO_PARENT_CLASS_SHORTHAND::getOffset;
400  using HUMOTO_PARENT_CLASS_SHORTHAND::getA;
401  using HUMOTO_PARENT_CLASS_SHORTHAND::getUpperBounds;
402 
403 
404  /// @copydoc humoto::constraints::ConstraintsBase::getType
406  {
407  return (ConstraintType::ASU);
408  }
409 
410 
411  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
412  void checkConsistency() const
413  {
414  HUMOTO_ASSERT( getA().rows() == getUpperBounds().rows(),
415  "Size of A does not match sizes of the bounds.");
416 
417  HUMOTO_ASSERT( (getA().cols() > 0)
418  && (static_cast<std::size_t>(getA().cols() + getOffset()) <= getNumberOfVariables()),
419  "Incorrect number of columns in A.");
420  }
421  };
422 #undef HUMOTO_PARENT_CLASS_SHORTHAND
423 
424 
425 
426 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyAnyToALUMixin < CopyEqualityToABMixin < ViolationsComputationBMixin < ActiveSetDeterminationBMixin < BodyASMixin< BoundsBMixin <t_Base> > > > > >
427  /**
428  * @brief Constraints 'A*S*x = b'.
429  *
430  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
431  */
432  template <class t_Base>
434  {
435  protected:
436  /**
437  * @brief Protected destructor: prevent destruction of the child
438  * classes through a base pointer.
439  */
442 
443 
444  public:
445  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
446  using HUMOTO_PARENT_CLASS_SHORTHAND::getOffset;
447  using HUMOTO_PARENT_CLASS_SHORTHAND::getA;
448  using HUMOTO_PARENT_CLASS_SHORTHAND::getB;
449 
450 
451 
452  /// @copydoc humoto::constraints::ConstraintsBase::getType
454  {
455  return (ConstraintType::ASB);
456  }
457 
458 
459  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
460  void checkConsistency() const
461  {
462  HUMOTO_ASSERT( (getA().rows() == getB().rows()),
463  "Size of A does not match size of b.");
464 
465  HUMOTO_ASSERT( (getA().cols() > 0)
466  && (static_cast<std::size_t>(getA().cols() + getOffset()) <= getNumberOfVariables()),
467  "Incorrect number of columns in A.");
468  }
469 
470 
471  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
472  void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
473  {
475 
476  g.resize(getNumberOfVariables());
477  std::ptrdiff_t right_space_size = getNumberOfVariables() - getOffset() - getA().cols();
478  g << Eigen::VectorXd::Zero(getOffset()),
479  getA().transpose()*getB(),
480  Eigen::VectorXd::Zero(right_space_size);
481  }
482 
483 
484  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
485  void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
486  {
488 
489  g.segment(getOffset(), getA().cols()).noalias() += getA().transpose()*getB();
490  }
491  };
492 #undef HUMOTO_PARENT_CLASS_SHORTHAND
493 
494 
495 
496 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyAnyToALUMixin < CopyEqualityToABMixin < ViolationsComputationB0Mixin < ActiveSetDeterminationBMixin < BodyASMixin< BoundsB0Mixin <t_Base> > > > > >
497  /**
498  * @brief Constraints 'A*S*x = 0'.
499  *
500  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
501  */
502  template <class t_Base>
504  {
505  protected:
506  /**
507  * @brief Protected destructor: prevent destruction of the child
508  * classes through a base pointer.
509  */
512 
513 
514  public:
515  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
516  using HUMOTO_PARENT_CLASS_SHORTHAND::getOffset;
517  using HUMOTO_PARENT_CLASS_SHORTHAND::getA;
518 
519 
520 
521  /// @copydoc humoto::constraints::ConstraintsBase::getType
523  {
524  return (ConstraintType::ASB0);
525  }
526 
527 
528  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
529  void checkConsistency() const
530  {
531  HUMOTO_ASSERT( (getA().cols() > 0)
532  && (static_cast<std::size_t>(getA().cols() + getOffset()) <= getNumberOfVariables()),
533  "Incorrect number of columns in A.");
534  }
535 
536 
537  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
538  void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
539  {
541  HUMOTO_PARENT_CLASS_SHORTHAND::getATb(g);
542  }
543 
544 
545  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
546  void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
547  {
549  HUMOTO_PARENT_CLASS_SHORTHAND::addATb(g);
550  }
551  };
552 #undef HUMOTO_PARENT_CLASS_SHORTHAND
553 
554 
555  // ======================================================================================
556  // ======================================================================================
557  // ======================================================================================
558 
559 
560 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyTwoSidedInequalityToALMixin < CopyAnyToALUMixin < ViolationsComputationLUMixin < ActiveSetDeterminationLUMixin < BodyGIMixin< BoundsLUMixin <t_Base> > > > > >
561  /**
562  * @brief Constraints 'lb <= G * x[I] <= ub'.
563  *
564  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
565  */
566  template <class t_Base>
568  {
569  protected:
570  /**
571  * @brief Protected destructor: prevent destruction of the child
572  * classes through a base pointer.
573  */
576 
577 
578  public:
579  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
580  using HUMOTO_PARENT_CLASS_SHORTHAND::getIndices;
581  using HUMOTO_PARENT_CLASS_SHORTHAND::getIGains;
582  using HUMOTO_PARENT_CLASS_SHORTHAND::getLowerBounds;
583  using HUMOTO_PARENT_CLASS_SHORTHAND::getUpperBounds;
584 
585 
586 
587  /// @copydoc humoto::constraints::ConstraintsBase::getType
589  {
590  return (ConstraintType::GILU);
591  }
592 
593 
594  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
595  void checkConsistency() const
596  {
597  HUMOTO_ASSERT( (getIndices().rows() == getLowerBounds().rows())
598  && (getIndices().rows() == getUpperBounds().rows()),
599  "Size of I does not match sizes of the bounds.");
600 
601  HUMOTO_ASSERT( (getIndices().rows() == getIGains().rows()),
602  "Size of the vector of gains must match the number of constraints.");
603  }
604  };
605 #undef HUMOTO_PARENT_CLASS_SHORTHAND
606 
607 
608 
609 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyLowerInequalityToALMixin < CopyAnyToALUMixin < ViolationsComputationLMixin < ActiveSetDeterminationLMixin < BodyGIMixin< BoundsLMixin <t_Base> > > > > >
610  /**
611  * @brief Constraints 'lb <= G * x[I]'.
612  *
613  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
614  */
615  template <class t_Base>
617  {
618  protected:
619  /**
620  * @brief Protected destructor: prevent destruction of the child
621  * classes through a base pointer.
622  */
625 
626 
627  public:
628  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
629  using HUMOTO_PARENT_CLASS_SHORTHAND::getIndices;
630  using HUMOTO_PARENT_CLASS_SHORTHAND::getIGains;
631  using HUMOTO_PARENT_CLASS_SHORTHAND::getLowerBounds;
632 
633 
634 
635  /// @copydoc humoto::constraints::ConstraintsBase::getType
637  {
638  return (ConstraintType::GIL);
639  }
640 
641 
642  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
643  void checkConsistency() const
644  {
645  HUMOTO_ASSERT( getIndices().rows() == getLowerBounds().rows(),
646  "Size of I does not match sizes of the bounds.");
647 
648  HUMOTO_ASSERT( (getIndices().rows() == getIGains().rows()),
649  "Size of the vector of gains must match the number of constraints.");
650  }
651  };
652 #undef HUMOTO_PARENT_CLASS_SHORTHAND
653 
654 
655 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyUpperInequalityToALMixin < CopyAnyToALUMixin < ViolationsComputationUMixin < ActiveSetDeterminationUMixin < BodyGIMixin< BoundsUMixin <t_Base> > > > > >
656  /**
657  * @brief Constraints 'G * x[I] <= ub'.
658  *
659  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
660  */
661  template <class t_Base>
663  {
664  protected:
665  /**
666  * @brief Protected destructor: prevent destruction of the child
667  * classes through a base pointer.
668  */
671 
672 
673  public:
674  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
675  using HUMOTO_PARENT_CLASS_SHORTHAND::getIndices;
676  using HUMOTO_PARENT_CLASS_SHORTHAND::getIGains;
677  using HUMOTO_PARENT_CLASS_SHORTHAND::getUpperBounds;
678 
679 
680 
681  /// @copydoc humoto::constraints::ConstraintsBase::getType
683  {
684  return (ConstraintType::GIU);
685  }
686 
687 
688  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
689  void checkConsistency() const
690  {
691  HUMOTO_ASSERT( getIndices().rows() == getUpperBounds().rows(),
692  "Size of I does not match sizes of the bounds.");
693 
694  HUMOTO_ASSERT( (getIndices().rows() == getIGains().rows()),
695  "Size of the vector of gains must match the number of constraints.");
696  }
697  };
698 #undef HUMOTO_PARENT_CLASS_SHORTHAND
699 
700 
701 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyAnyToALUMixin < CopyEqualityToABMixin < ViolationsComputationBMixin < ActiveSetDeterminationBMixin < BodyGIMixin< BoundsBMixin <t_Base> > > > > >
702  /**
703  * @brief Constraints 'G*x[I] = b'.
704  *
705  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
706  */
707  template <class t_Base>
709  {
710  protected:
711  /**
712  * @brief Protected destructor: prevent destruction of the child
713  * classes through a base pointer.
714  */
717 
718 
719  /// @copydoc humoto::constraints::BoundsB0Mixin::getATb
720  void addATb(Eigen::VectorXd &g) const
721  {
722  for (EigenIndex i = 0; i < getIndices().rows(); ++i)
723  {
724  g[getIndices()[i]] += getIGains()[i] * getB()[i];
725  }
726  }
727 
728 
729  public:
730  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
731  using HUMOTO_PARENT_CLASS_SHORTHAND::getIndices;
732  using HUMOTO_PARENT_CLASS_SHORTHAND::getIGains;
733  using HUMOTO_PARENT_CLASS_SHORTHAND::getB;
734 
735 
736 
737  /// @copydoc humoto::constraints::ConstraintsBase::getType
739  {
740  return (ConstraintType::GIB);
741  }
742 
743 
744  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
745  void checkConsistency() const
746  {
747  HUMOTO_ASSERT( (getIndices().rows() == getB().rows()),
748  "Size of I does not match size of b.");
749 
750  HUMOTO_ASSERT( (getIndices().rows() == getIGains().rows()),
751  "Size of the vector of gains must match the number of constraints.");
752  }
753 
754 
755  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
756  void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
757  {
759  g.setZero(getNumberOfVariables());
760  addATb(g);
761  }
762 
763 
764  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
765  void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
766  {
768  addATb(g);
769  }
770  };
771 #undef HUMOTO_PARENT_CLASS_SHORTHAND
772 
773 
774 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyAnyToALUMixin < CopyEqualityToABMixin < ViolationsComputationB0Mixin < ActiveSetDeterminationBMixin < BodyGIMixin< BoundsB0Mixin <t_Base> > > > > >
775  /**
776  * @brief Constraints 'G*x[I] = 0'.
777  *
778  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
779  */
780  template <class t_Base>
782  {
783  protected:
784  /**
785  * @brief Protected destructor: prevent destruction of the child
786  * classes through a base pointer.
787  */
790 
791 
792  public:
793  using HUMOTO_PARENT_CLASS_SHORTHAND::getIndices;
794  using HUMOTO_PARENT_CLASS_SHORTHAND::getIGains;
795 
796 
797 
798  /// @copydoc humoto::constraints::ConstraintsBase::getType
800  {
801  return (ConstraintType::GIB0);
802  }
803 
804 
805  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
806  void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
807  {
809  HUMOTO_PARENT_CLASS_SHORTHAND::getATb(g);
810  }
811 
812 
813  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
814  void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
815  {
817  HUMOTO_PARENT_CLASS_SHORTHAND::addATb(g);
818  }
819 
820 
821  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
822  void checkConsistency() const
823  {
824  HUMOTO_ASSERT( (getIndices().rows() == getIGains().rows()),
825  "Size of the vector of gains must match the number of constraints.");
826  }
827  };
828 #undef HUMOTO_PARENT_CLASS_SHORTHAND
829 
830 
831  // ======================================================================================
832  // ======================================================================================
833  // ======================================================================================
834 
835 
836 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyTwoSidedInequalityToALMixin < CopyAnyToALUMixin < CopySimpleToILUMixin < ViolationsComputationLUMixin < ActiveSetDeterminationLUMixin < BodyIMixin< BoundsLUMixin <t_Base> > > > > > >
837  /**
838  * @brief Constraints 'lb <= x[I] <= ub'.
839  *
840  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
841  */
842  template <class t_Base>
844  {
845  protected:
846  /**
847  * @brief Protected destructor: prevent destruction of the child
848  * classes through a base pointer.
849  */
852 
853 
854  public:
855  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
856  using HUMOTO_PARENT_CLASS_SHORTHAND::getIndices;
857  using HUMOTO_PARENT_CLASS_SHORTHAND::getLowerBounds;
858  using HUMOTO_PARENT_CLASS_SHORTHAND::getUpperBounds;
859 
860 
861 
862  /// @copydoc humoto::constraints::ConstraintsBase::getType
864  {
865  return (ConstraintType::ILU);
866  }
867 
868 
869  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
870  void checkConsistency() const
871  {
872  HUMOTO_ASSERT( (getIndices().rows() == getLowerBounds().rows())
873  && (getIndices().rows() == getUpperBounds().rows()),
874  "Size of I does not match sizes of the bounds.");
875  }
876  };
877 #undef HUMOTO_PARENT_CLASS_SHORTHAND
878 
879 
880 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyLowerInequalityToALMixin < CopyAnyToALUMixin < CopySimpleToILUMixin < ViolationsComputationLMixin < ActiveSetDeterminationLMixin < BodyIMixin< BoundsLMixin <t_Base> > > > > > >
881  /**
882  * @brief Constraints 'lb <= x[I]'.
883  *
884  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
885  */
886  template <class t_Base>
888  {
889  protected:
890  /**
891  * @brief Protected destructor: prevent destruction of the child
892  * classes through a base pointer.
893  */
896 
897 
898  public:
899  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
900  using HUMOTO_PARENT_CLASS_SHORTHAND::getIndices;
901  using HUMOTO_PARENT_CLASS_SHORTHAND::getLowerBounds;
902 
903 
904 
905  /// @copydoc humoto::constraints::ConstraintsBase::getType
907  {
908  return (ConstraintType::IL);
909  }
910 
911 
912  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
913  void checkConsistency() const
914  {
915  HUMOTO_ASSERT( getIndices().rows() == getLowerBounds().rows(),
916  "Size of I does not match sizes of the bounds.");
917  }
918  };
919 #undef HUMOTO_PARENT_CLASS_SHORTHAND
920 
921 
922 
923 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyUpperInequalityToALMixin < CopyAnyToALUMixin < CopySimpleToILUMixin < ViolationsComputationUMixin < ActiveSetDeterminationUMixin < BodyIMixin< BoundsUMixin <t_Base> > > > > > >
924  /**
925  * @brief Constraints 'x[I] <= ub'.
926  *
927  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
928  */
929  template <class t_Base>
931  {
932  protected:
933  /**
934  * @brief Protected destructor: prevent destruction of the child
935  * classes through a base pointer.
936  */
939 
940 
941  public:
942  using HUMOTO_PARENT_CLASS_SHORTHAND::getNumberOfVariables;
943  using HUMOTO_PARENT_CLASS_SHORTHAND::getIndices;
944  using HUMOTO_PARENT_CLASS_SHORTHAND::getUpperBounds;
945 
946 
947 
948  /// @copydoc humoto::constraints::ConstraintsBase::getType
950  {
951  return (ConstraintType::IU);
952  }
953 
954 
955  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
956  void checkConsistency() const
957  {
958  HUMOTO_ASSERT( getIndices().rows() == getUpperBounds().rows(),
959  "Size of I does not match sizes of the bounds.");
960  }
961  };
962 #undef HUMOTO_PARENT_CLASS_SHORTHAND
963 
964 
965 
966 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyAnyToALUMixin < CopySimpleToILUMixin < CopyEqualityToABMixin < ViolationsComputationBMixin < ActiveSetDeterminationBMixin < BodyIMixin< BoundsBMixin <t_Base> > > > > > >
967  /**
968  * @brief Constraints 'x[I] = b'.
969  *
970  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
971  */
972  template <class t_Base>
974  {
975  protected:
976  /**
977  * @brief Protected destructor: prevent destruction of the child
978  * classes through a base pointer.
979  */
982 
983 
984  public:
985  using HUMOTO_PARENT_CLASS_SHORTHAND::getIndices;
986  using HUMOTO_PARENT_CLASS_SHORTHAND::getB;
987 
988 
989 
990  /// @copydoc humoto::constraints::ConstraintsBase::getType
992  {
993  return (ConstraintType::IB);
994  }
995 
996 
997 
998  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
999  void checkConsistency() const
1000  {
1001  HUMOTO_ASSERT( (getIndices().rows() == getB().rows()),
1002  "Size of I does not match size of b.");
1003  }
1004 
1005  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
1006  void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
1007  {
1009  HUMOTO_PARENT_CLASS_SHORTHAND::getATb(g);
1010  }
1011 
1012 
1013  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
1014  void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
1015  {
1017  HUMOTO_PARENT_CLASS_SHORTHAND::addATb(g);
1018  }
1019  };
1020 #undef HUMOTO_PARENT_CLASS_SHORTHAND
1021 
1022 
1023 
1024 #define HUMOTO_PARENT_CLASS_SHORTHAND CopyAnyToALUMixin < CopySimpleToILUMixin < CopyEqualityToABMixin < ViolationsComputationB0Mixin < ActiveSetDeterminationBMixin < BodyIMixin< BoundsB0Mixin <t_Base> > > > > > >
1025  /**
1026  * @brief Constraints 'x[I] = 0'.
1027  *
1028  * @tparam t_Base Base class (@ref humoto::constraints::ConstraintsBase or @ref humoto::TaskBase)
1029  */
1030  template <class t_Base>
1032  {
1033  protected:
1034  /**
1035  * @brief Protected destructor: prevent destruction of the child
1036  * classes through a base pointer.
1037  */
1040 
1041 
1042  public:
1043  using HUMOTO_PARENT_CLASS_SHORTHAND::getIndices;
1044 
1045 
1046 
1047  /// @copydoc humoto::constraints::ConstraintsBase::getType
1049  {
1050  return (ConstraintType::IB0);
1051  }
1052 
1053 
1054  /// @copydoc humoto::constraints::ConstraintsBase::checkConsistency
1055  void checkConsistency() const {}
1056 
1057 
1058  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
1059  void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
1060  {
1062  HUMOTO_PARENT_CLASS_SHORTHAND::getATb(g);
1063  }
1064 
1065 
1066  /// @copydoc humoto::constraints::ConstraintsBase::getATAandATb
1067  void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
1068  {
1070  HUMOTO_PARENT_CLASS_SHORTHAND::addATb(g);
1071  }
1072  };
1073 #undef HUMOTO_PARENT_CLASS_SHORTHAND
1074  }
1075 }
void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:1006
Constraints &#39;A*S*x = 0&#39;.
Definition: constraints.h:503
~ConstraintsGIL()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:623
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:689
#define HUMOTO_PARENT_CLASS_SHORTHAND
Definition: constraints.h:1024
~ConstraintsGILU()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:574
void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:1014
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:95
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:863
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:522
void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:765
void addATb(Eigen::VectorXd &g) const
Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:720
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:636
~ConstraintsASB0()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:510
~ConstraintsGIB()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:715
#define HUMOTO_LOCAL
Definition: export_import.h:26
void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:211
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:192
Constraints &#39;A*x = 0&#39;.
Definition: constraints.h:228
~ConstraintsAB()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:173
Constraints &#39;A*x <= ub&#39;.
Definition: constraints.h:121
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:405
Constraints &#39;x[I] = 0&#39;.
Definition: constraints.h:1031
void EIGENTOOLS_VISIBILITY_ATTRIBUTE addATA(Eigen::DenseBase< t_DerivedOutput > &result, const Eigen::DenseBase< t_DerivedInput > &A)
result += A^T * A
Definition: eigentools.h:262
Constraints &#39;lb <= A*S*x&#39;.
Definition: constraints.h:339
~ConstraintsIU()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:937
void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:756
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:643
Constraints &#39;G*x[I] = b&#39;.
Definition: constraints.h:708
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:453
#define HUMOTO_ASSERT(condition, message)
void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:1059
Constraints &#39;lb <= A*x&#39;.
Definition: constraints.h:76
void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:203
~ConstraintsGIU()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:669
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:738
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:913
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:102
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:366
~ConstraintsALU()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:36
EIGEN_DEFAULT_DENSE_INDEX_TYPE EigenIndex
Definition: utility.h:26
~ConstraintsASLU()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:297
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:311
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:799
~ConstraintsAB0()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:235
~ConstraintsAL()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:83
Constraints &#39;A*x = b&#39;.
Definition: constraints.h:166
Constraints &#39;lb <= G * x[I] <= ub&#39;.
Definition: constraints.h:567
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:412
~ConstraintsASB()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:440
Constraints &#39;lb <= G * x[I]&#39;.
Definition: constraints.h:616
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:359
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:253
Constraints &#39;lb <= A*x <= ub&#39;.
Definition: constraints.h:29
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:460
Constraints &#39;lb <= x[I] <= ub&#39;.
Definition: constraints.h:843
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:139
~ConstraintsIB0()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:1038
~ConstraintsGIB0()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:788
Constraints &#39;lb <= A*S*x <= ub&#39;.
Definition: constraints.h:290
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:318
Constraints &#39;x[I] <= ub&#39;.
Definition: constraints.h:930
void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:814
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:906
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:822
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:588
The root namespace of HuMoTo.
Definition: config.h:12
void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:806
void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:261
Constraints &#39;A*S*x <= ub&#39;.
Definition: constraints.h:386
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:49
void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:546
void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:269
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:1048
Constraints &#39;lb <= x[I]&#39;.
Definition: constraints.h:887
~ConstraintsILU()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:850
Constraints &#39;A*S*x = b&#39;.
Definition: constraints.h:433
~ConstraintsASL()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:346
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:1055
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:956
~ConstraintsAU()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:128
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:745
void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:472
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:870
~ConstraintsASU()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:393
void EIGENTOOLS_VISIBILITY_ATTRIBUTE getATA(Eigen::PlainObjectBase< t_DerivedOutput > &result, const Eigen::DenseBase< t_DerivedInput > &A)
result = A^T * A
Definition: eigentools.h:204
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:246
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:185
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:146
void getATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:538
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:56
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:529
Constraints &#39;x[I] = b&#39;.
Definition: constraints.h:973
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:991
void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:485
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:949
void addATAandATb(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Compute &#39;A^T * A&#39; for general equality constaints and save or add the result to H. Compute &#39;A^T * b&#39; for general equality constaints and save or add the result to g.
Definition: constraints.h:1067
~ConstraintsIL()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:894
Constraints &#39;G*x[I] = 0&#39;.
Definition: constraints.h:781
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:595
void checkConsistency() const
Check consistency of the constraints.
Definition: constraints.h:999
ConstraintType::Type getType() const
Returns type of the constraints.
Definition: constraints.h:682
Constraints &#39;G * x[I] <= ub&#39;.
Definition: constraints.h:662
~ConstraintsIB()
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition: constraints.h:980