33 inline std::vector<double>
36 std::vector<double> out(in.size());
37 for (
size_t i = 0; i < in.size(); i++) {
44 inline std::vector<std::vector<double>>
45 operator-(
const std::vector<std::vector<double>>& in)
47 std::vector<std::vector<double>> out(in.size());
48 for (
size_t i = 0; i < in.size(); i++) {
55 inline std::vector<double>
56 operator+(
const std::vector<double>& in1,
const std::vector<double>& in2)
58 if (in1.size() != in2.size())
59 throw MAiNGOException(
" Error: UbpQuadExpr -- inconsistent sizes in vector + operator.");
60 std::vector<double> out(in1.size());
61 for (
size_t i = 0; i < in1.size(); i++) {
62 out[i] = in1[i] + in2[i];
68 inline std::vector<std::vector<double>>
69 operator+(
const std::vector<std::vector<double>>& in1,
const std::vector<std::vector<double>>& in2)
71 if (in1.size() != in2.size())
72 throw MAiNGOException(
" Error: UbpQuadExpr -- inconsistent sizes in vector<vector> + operator.");
73 std::vector<std::vector<double>> out(in1.size());
74 for (
size_t i = 0; i < in1.size(); i++) {
75 if (in1[i].size() != in2[i].size())
76 throw MAiNGOException(
" Error: UbpQuadExpr -- inconsistent sizes in vector<vector> + operator.");
77 out[i] = in1[i] + in2[i];
83 inline std::vector<double>
84 operator-(
const std::vector<double>& in1,
const std::vector<double>& in2)
86 if (in1.size() != in2.size())
87 throw MAiNGOException(
" Error: UbpQuadExpr -- inconsistent sizes in vector - operator.");
88 std::vector<double> out(in1.size());
89 for (
size_t i = 0; i < in1.size(); i++) {
90 out[i] = in1[i] - in2[i];
96 inline std::vector<std::vector<double>>
97 operator-(
const std::vector<std::vector<double>>& in1,
const std::vector<std::vector<double>>& in2)
99 if (in1.size() != in2.size())
100 throw MAiNGOException(
" Error: UbpQuadExpr -- inconsistent sizes in vector<vector> - operator.");
101 std::vector<std::vector<double>> out(in1.size());
102 for (
size_t i = 0; i < in1.size(); i++) {
103 if (in1[i].size() != in2[i].size())
104 throw MAiNGOException(
" Error: UbpQuadExpr -- inconsistent sizes in vector<vector> - operator.");
105 out[i] = in1[i] - in2[i];
111 inline std::vector<double>
operator*(
const std::vector<double>& in1,
const double in2)
113 std::vector<double> out(in1.size());
114 for (
size_t i = 0; i < in1.size(); i++) {
115 out[i] = in1[i] * in2;
121 inline std::vector<std::vector<double>>
operator*(
const std::vector<std::vector<double>>& in1,
const double in2)
123 std::vector<std::vector<double>> out(in1.size());
124 for (
size_t i = 0; i < in1.size(); i++) {
125 out[i] = in1[i] * in2;
165 if (iLin >= nvarIn) {
214 throw MAiNGOException(
" Error: UbpQuadExpr -- nvar does not fit in += operator.");
221 else if (in.
nvar == 0) {
251 throw MAiNGOException(
" Error: UbpQuadExpr -- nvar does not fit in += operator.");
258 else if (in.
nvar == 0) {
288 throw MAiNGOException(
" Error: UbpQuadExpr -- nvar does not fit in * operator.");
296 else if (in.
nvar == 0) {
303 throw MAiNGOException(
" Error: UbpQuadExpr -- multiplications higher than second order are not allowed in (MIQ)Ps.");
305 for (
size_t i = 0; i <
nvar; i++) {
306 for (
size_t j = 0; j < in.
nvar; j++) {
346 *
this *= (1. / (double)in);
374 throw MAiNGOException(
" Error: UbpQuadExpr -- nvar does not fit in + operator.");
382 else if (in2.
nvar == 0) {
451 throw MAiNGOException(
" Error: UbpQuadExpr -- nvar does not fit in - operator.");
460 else if (in2.
nvar == 0) {
526 throw MAiNGOException(
" Error: UbpQuadExpr -- nvar does not fit in * operator.");
535 else if (in2.
nvar == 0) {
543 throw MAiNGOException(
" Error: UbpQuadExpr -- multiplications higher than second order are not allowed in (MIQ)Ps.");
545 for (
size_t i = 0; i < in1.
nvar; i++) {
546 for (
size_t j = 0; j < in2.
nvar; j++) {
571 return in1 * ((double)in2);
583 return in2 * ((double)in1);
590 throw MAiNGOException(
" Error: UbpQuadExpr -- function x/y not allowed in (MIQ)Ps.");
597 return in1 * (1. / in2);
604 return in1 * (1. / (double)in2);
611 throw MAiNGOException(
" Error: UbpQuadExpr -- function 1/x not allowed in (MIQ)Ps.");
618 throw MAiNGOException(
" Error: UbpQuadExpr -- function 1/x not allowed in (MIQ)Ps.");
647 throw std::runtime_error(
" Error: UbpQuadExpr -- function pow with n <> 0,1,2 not allowed in (MIQ)Ps.");
660 throw std::runtime_error(
" Error: UbpQuadExpr -- function pow with a <> 0,1,2 not allowed in (MIQ)Ps.");
662 static QE pow(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function pow(x,y) not allowed in (MIQ)Ps."); }
663 static QE pow(
const double x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function pow(a,y) not allowed in (MIQ)Ps."); }
664 static QE pow(
const int x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function pow(n,y) not allowed in (MIQ)Ps."); }
665 static QE prod(
const unsigned int n,
const QE* x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function prod not allowed in (MIQ)Ps."); }
666 static QE monom(
const unsigned int n,
const QE* x,
const unsigned* k) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function monom not allowed in (MIQ)Ps."); }
667 static QE point(
const double c) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
668 static QE zeroone() {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
669 static void I(
QE& x,
const QE& y) { x = y; }
670 static double l(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
671 static double u(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
672 static double abs(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
673 static double mid(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
674 static double diam(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
675 static QE inv(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
676 static QE sqrt(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
677 static QE exp(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
678 static QE log(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
679 static QE xlog(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
680 static QE fabsx_times_x(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
681 static QE xexpax(
const QE& x,
const double a) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
682 static QE lmtd(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
683 static QE rlmtd(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
684 static QE euclidean_norm_2d(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
685 static QE expx_times_y(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
686 static QE vapor_pressure(
const QE& x,
const double type,
const double p1,
const double p2,
const double p3,
const double p4 = 0,
const double p5 = 0,
const double p6 = 0,
687 const double p7 = 0,
const double p8 = 0,
const double p9 = 0,
const double p10 = 0) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
688 static QE ideal_gas_enthalpy(
const QE& x,
const double x0,
const double type,
const double p1,
const double p2,
const double p3,
const double p4,
const double p5,
const double p6 = 0,
689 const double p7 = 0) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
690 static QE saturation_temperature(
const QE& x,
const double type,
const double p1,
const double p2,
const double p3,
const double p4 = 0,
const double p5 = 0,
const double p6 = 0,
691 const double p7 = 0,
const double p8 = 0,
const double p9 = 0,
const double p10 = 0) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
692 static QE enthalpy_of_vaporization(
const QE& x,
const double type,
const double p1,
const double p2,
const double p3,
const double p4,
const double p5,
const double p6 = 0) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
693 static QE cost_function(
const QE& x,
const double type,
const double p1,
const double p2,
const double p3) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
694 static QE nrtl_tau(
const QE& x,
const double a,
const double b,
const double e,
const double f) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
695 static QE nrtl_dtau(
const QE& x,
const double b,
const double e,
const double f) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
696 static QE nrtl_G(
const QE& x,
const double a,
const double b,
const double e,
const double f,
const double alpha) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
697 static QE nrtl_Gtau(
const QE& x,
const double a,
const double b,
const double e,
const double f,
const double alpha) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
698 static QE nrtl_Gdtau(
const QE& x,
const double a,
const double b,
const double e,
const double f,
const double alpha) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
699 static QE nrtl_dGtau(
const QE& x,
const double a,
const double b,
const double e,
const double f,
const double alpha) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
700 static QE iapws(
const QE& x,
const double type) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
701 static QE iapws(
const QE& x,
const QE& y,
const double type) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
705 static QE covariance_function(
const QE& x,
const double type) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
707 static QE regnormal(
const QE& x,
const double a,
const double b) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
708 static QE fabs(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
709 static QE sin(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
710 static QE cos(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
711 static QE tan(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
712 static QE asin(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
713 static QE acos(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
714 static QE atan(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
715 static QE sinh(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
716 static QE cosh(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
717 static QE tanh(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
718 static QE coth(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
719 static QE asinh(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
720 static QE acosh(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
721 static QE atanh(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
722 static QE acoth(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
723 static QE erf(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
724 static QE erfc(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
725 static QE fstep(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
726 static QE bstep(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
727 static QE hull(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
728 static QE min(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
729 static QE max(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
730 static QE pos(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
731 static QE neg(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
732 static QE lb_func(
const QE& x,
const double lb) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
733 static QE ub_func(
const QE& x,
const double ub) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
734 static QE bounding_func(
const QE& x,
const double lb,
const double ub) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
735 static QE squash_node(
const QE& x,
const double lb,
const double ub) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
736 static QE sum_div(
const std::vector<QE>& x,
const std::vector<double>& coeff) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
737 static QE xlog_sum(
const std::vector<QE>& x,
const std::vector<double>& coeff) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
738 static QE mc_print(
const QE& x,
const int number) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
739 static QE arh(
const QE& x,
const double k) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
740 static QE cheb(
const QE& x,
const unsigned n) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
741 static bool inter(
QE& xIy,
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
742 static bool eq(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
743 static bool ne(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
744 static bool lt(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
745 static bool le(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
746 static bool gt(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
747 static bool ge(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function not allowed in (MIQ)Ps."); }
namespace holding forward declaration of McCormick objects. For more info refer to the open-source li...
UbpQuadExpr & operator/=(const double in)
Operator/= for double.
Definition: ubpQuadExpr.h:338
static QE nrtl_tau(const QE &x, const double a, const double b, const double e, const double f)
Definition: ubpQuadExpr.h:694
static QE acosh(const QE &x)
Definition: ubpQuadExpr.h:720
static QE pos(const QE &x)
Definition: ubpQuadExpr.h:730
static QE nrtl_dGtau(const QE &x, const double a, const double b, const double e, const double f, const double alpha)
Definition: ubpQuadExpr.h:699
UbpQuadExpr & operator/=(const int in)
Operator/= for int.
Definition: ubpQuadExpr.h:344
UbpQuadExpr & operator-=(const int in)
Operator-= for int.
Definition: ubpQuadExpr.h:278
static QE tanh(const QE &x)
Definition: ubpQuadExpr.h:717
UbpQuadExpr & operator-=(const double in)
Operator-= for double.
Definition: ubpQuadExpr.h:271
static QE pow(const double x, const QE &y)
Definition: ubpQuadExpr.h:663
UbpQuadExpr(const double in)
Constructor for a constant.
Definition: ubpQuadExpr.h:181
static QE coth(const QE &x)
Definition: ubpQuadExpr.h:718
std::vector< std::vector< double > > coeffsQuad
Definition: ubpQuadExpr.h:357
static QE covariance_function(const QE &x, const double type)
Definition: ubpQuadExpr.h:705
static QE iapws(const QE &x, const double type)
Definition: ubpQuadExpr.h:700
static QE rlmtd(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:683
static bool inter(QE &xIy, const QE &x, const QE &y)
Definition: ubpQuadExpr.h:741
static QE atanh(const QE &x)
Definition: ubpQuadExpr.h:721
static QE enthalpy_of_vaporization(const QE &x, const double type, const double p1, const double p2, const double p3, const double p4, const double p5, const double p6=0)
Definition: ubpQuadExpr.h:692
static QE rho_vap_sat_ethanol_schroeder(const QE &x)
Definition: ubpQuadExpr.h:703
static QE nrtl_Gtau(const QE &x, const double a, const double b, const double e, const double f, const double alpha)
Definition: ubpQuadExpr.h:697
static QE sin(const QE &x)
Definition: ubpQuadExpr.h:709
UbpQuadExpr & operator-=(const UbpQuadExpr &in)
Operator-= for UbpQuadExpr.
Definition: ubpQuadExpr.h:248
std::vector< double > coeffsLin
Definition: ubpQuadExpr.h:356
UbpQuadExpr(const size_t nvarIn, const size_t iLin)
Constructor for a specific variable participating linearly.
Definition: ubpQuadExpr.h:163
static QE hull(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:727
static double mid(const QE &x)
Definition: ubpQuadExpr.h:673
static QE rho_liq_sat_ethanol_schroeder(const QE &x)
Definition: ubpQuadExpr.h:704
UbpQuadExpr operator/(const UbpQuadExpr &in1, const UbpQuadExpr &in2)
Operator/ for two UbpQuadExpr.
Definition: ubpQuadExpr.h:588
static QE mc_print(const QE &x, const int number)
Definition: ubpQuadExpr.h:738
static QE expx_times_y(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:685
static QE ub_func(const QE &x, const double ub)
Definition: ubpQuadExpr.h:733
static QE ideal_gas_enthalpy(const QE &x, const double x0, const double type, const double p1, const double p2, const double p3, const double p4, const double p5, const double p6=0, const double p7=0)
Definition: ubpQuadExpr.h:688
double constant
Definition: ubpQuadExpr.h:355
static QE tan(const QE &x)
Definition: ubpQuadExpr.h:711
static QE xlog_sum(const std::vector< QE > &x, const std::vector< double > &coeff)
Definition: ubpQuadExpr.h:737
static QE sqr(const QE &x)
Definition: ubpQuadExpr.h:635
static QE acos(const QE &x)
Definition: ubpQuadExpr.h:713
static QE point(const double c)
Definition: ubpQuadExpr.h:667
UbpQuadExpr(const size_t nvarIn)
Constructor accepting a number of variables.
Definition: ubpQuadExpr.h:148
static QE nrtl_G(const QE &x, const double a, const double b, const double e, const double f, const double alpha)
Definition: ubpQuadExpr.h:696
static bool eq(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:742
static bool ne(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:743
static QE iapws(const QE &x, const QE &y, const double type)
Definition: ubpQuadExpr.h:701
std::vector< double > operator *(const std::vector< double > &in1, const double in2)
Operator* for multiplication of a double vector with a double constant.
Definition: ubpQuadExpr.h:111
static QE exp(const QE &x)
Definition: ubpQuadExpr.h:677
maingo::ubp::UbpQuadExpr QE
Definition: ubpQuadExpr.h:634
static QE cost_function(const QE &x, const double type, const double p1, const double p2, const double p3)
Definition: ubpQuadExpr.h:693
static QE log(const QE &x)
Definition: ubpQuadExpr.h:678
static QE neg(const QE &x)
Definition: ubpQuadExpr.h:731
static bool lt(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:744
static QE pow(const QE &x, const double a)
Definition: ubpQuadExpr.h:649
static QE min(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:728
static QE sum_div(const std::vector< QE > &x, const std::vector< double > &coeff)
Definition: ubpQuadExpr.h:736
static bool ge(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:747
static QE atan(const QE &x)
Definition: ubpQuadExpr.h:714
static QE sinh(const QE &x)
Definition: ubpQuadExpr.h:715
static QE monom(const unsigned int n, const QE *x, const unsigned *k)
Definition: ubpQuadExpr.h:666
static QE asin(const QE &x)
Definition: ubpQuadExpr.h:712
UbpQuadExpr & operator/=(const UbpQuadExpr &in)
Operator/= for UbpQuadExpr.
Definition: ubpQuadExpr.h:336
static QE vapor_pressure(const QE &x, const double type, const double p1, const double p2, const double p3, const double p4=0, const double p5=0, const double p6=0, const double p7=0, const double p8=0, const double p9=0, const double p10=0)
Definition: ubpQuadExpr.h:686
static QE gaussian_probability_density_function(const QE &x)
Definition: ubpQuadExpr.h:706
static QE sqrt(const QE &x)
Definition: ubpQuadExpr.h:676
UbpQuadExpr & operator+=(const int in)
Operator+= for int.
Definition: ubpQuadExpr.h:241
static QE fabs(const QE &x)
Definition: ubpQuadExpr.h:708
namespace holding all essentials of MAiNGO
Definition: aleModel.h:31
static QE pow(const QE &x, const int n)
Definition: ubpQuadExpr.h:636
static QE asinh(const QE &x)
Definition: ubpQuadExpr.h:719
UbpQuadExpr()
Default constructor.
Definition: ubpQuadExpr.h:141
UbpQuadExpr & operator *=(const UbpQuadExpr &in)
Operator*= for UbpQuadExpr.
Definition: ubpQuadExpr.h:285
static QE euclidean_norm_2d(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:684
static QE fstep(const QE &x)
Definition: ubpQuadExpr.h:725
static QE p_sat_ethanol_schroeder(const QE &x)
Definition: ubpQuadExpr.h:702
static QE acoth(const QE &x)
Definition: ubpQuadExpr.h:722
static double l(const QE &x)
Definition: ubpQuadExpr.h:670
static QE fabsx_times_x(const QE &x)
Definition: ubpQuadExpr.h:680
static QE arh(const QE &x, const double k)
Definition: ubpQuadExpr.h:739
static QE lb_func(const QE &x, const double lb)
Definition: ubpQuadExpr.h:732
static bool gt(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:746
static QE inv(const QE &x)
Definition: ubpQuadExpr.h:675
static QE prod(const unsigned int n, const QE *x)
Definition: ubpQuadExpr.h:665
static QE zeroone()
Definition: ubpQuadExpr.h:668
std::vector< double > operator+(const std::vector< double > &in1, const std::vector< double > &in2)
Operator+ for addition of two double vectors.
Definition: ubpQuadExpr.h:56
static QE erf(const QE &x)
Definition: ubpQuadExpr.h:723
static QE squash_node(const QE &x, const double lb, const double ub)
Definition: ubpQuadExpr.h:735
static QE nrtl_dtau(const QE &x, const double b, const double e, const double f)
Definition: ubpQuadExpr.h:695
static void I(QE &x, const QE &y)
Definition: ubpQuadExpr.h:669
static QE nrtl_Gdtau(const QE &x, const double a, const double b, const double e, const double f, const double alpha)
Definition: ubpQuadExpr.h:698
static bool le(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:745
size_t nvar
Definition: ubpQuadExpr.h:354
UbpQuadExpr & operator=(const int in)
Operator= for an integer constant.
Definition: ubpQuadExpr.h:201
static double abs(const QE &x)
Definition: ubpQuadExpr.h:672
static QE cheb(const QE &x, const unsigned n)
Definition: ubpQuadExpr.h:740
static double diam(const QE &x)
Definition: ubpQuadExpr.h:674
std::vector< double > operator-(const std::vector< double > &in)
Operator- for a double vector.
Definition: ubpQuadExpr.h:34
UbpQuadExpr & operator=(const double in)
Operator= for a double constant.
Definition: ubpQuadExpr.h:191
static QE pow(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:662
static QE cosh(const QE &x)
Definition: ubpQuadExpr.h:716
static QE pow(const int x, const QE &y)
Definition: ubpQuadExpr.h:664
This class defines the exceptions thrown by MAiNGO.
Definition: exceptions.h:39
UbpQuadExpr & operator+=(const UbpQuadExpr &in)
Operator+= for UbpQuadExpr.
Definition: ubpQuadExpr.h:211
static QE xexpax(const QE &x, const double a)
Definition: ubpQuadExpr.h:681
static QE bounding_func(const QE &x, const double lb, const double ub)
Definition: ubpQuadExpr.h:734
static QE max(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:729
static QE cos(const QE &x)
Definition: ubpQuadExpr.h:710
static double u(const QE &x)
Definition: ubpQuadExpr.h:671
UbpQuadExpr & operator+=(const double in)
Operator+= for double.
Definition: ubpQuadExpr.h:234
static QE erfc(const QE &x)
Definition: ubpQuadExpr.h:724
static QE saturation_temperature(const QE &x, const double type, const double p1, const double p2, const double p3, const double p4=0, const double p5=0, const double p6=0, const double p7=0, const double p8=0, const double p9=0, const double p10=0)
Definition: ubpQuadExpr.h:690
static QE lmtd(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:682
static QE regnormal(const QE &x, const double a, const double b)
Definition: ubpQuadExpr.h:707
Struct used to compute coefficients of linear and quadratic/bilinear terms in (MIQ)Ps....
Definition: ubpQuadExpr.h:135
static QE xlog(const QE &x)
Definition: ubpQuadExpr.h:679
static QE bstep(const QE &x)
Definition: ubpQuadExpr.h:726
bool hasQuad
Definition: ubpQuadExpr.h:358