28 inline std::vector<double>
31 std::vector<double> out(in.size());
32 for (
size_t i = 0; i < in.size(); i++) {
39 inline std::vector<std::vector<double>>
40 operator-(
const std::vector<std::vector<double>>& in)
42 std::vector<std::vector<double>> out(in.size());
43 for (
size_t i = 0; i < in.size(); i++) {
50 inline std::vector<double>
51 operator+(
const std::vector<double>& in1,
const std::vector<double>& in2)
53 if (in1.size() != in2.size())
54 throw MAiNGOException(
" Error: UbpQuadExpr -- inconsistent sizes in vector + operator.");
55 std::vector<double> out(in1.size());
56 for (
size_t i = 0; i < in1.size(); i++) {
57 out[i] = in1[i] + in2[i];
63 inline std::vector<std::vector<double>>
64 operator+(
const std::vector<std::vector<double>>& in1,
const std::vector<std::vector<double>>& in2)
66 if (in1.size() != in2.size())
67 throw MAiNGOException(
" Error: UbpQuadExpr -- inconsistent sizes in vector<vector> + operator.");
68 std::vector<std::vector<double>> out(in1.size());
69 for (
size_t i = 0; i < in1.size(); i++) {
70 if (in1[i].size() != in2[i].size())
71 throw MAiNGOException(
" Error: UbpQuadExpr -- inconsistent sizes in vector<vector> + operator.");
72 out[i] = in1[i] + in2[i];
78 inline std::vector<double>
79 operator-(
const std::vector<double>& in1,
const std::vector<double>& in2)
81 if (in1.size() != in2.size())
82 throw MAiNGOException(
" Error: UbpQuadExpr -- inconsistent sizes in vector - operator.");
83 std::vector<double> out(in1.size());
84 for (
size_t i = 0; i < in1.size(); i++) {
85 out[i] = in1[i] - in2[i];
91 inline std::vector<std::vector<double>>
92 operator-(
const std::vector<std::vector<double>>& in1,
const std::vector<std::vector<double>>& in2)
94 if (in1.size() != in2.size())
95 throw MAiNGOException(
" Error: UbpQuadExpr -- inconsistent sizes in vector<vector> - operator.");
96 std::vector<std::vector<double>> out(in1.size());
97 for (
size_t i = 0; i < in1.size(); i++) {
98 if (in1[i].size() != in2[i].size())
99 throw MAiNGOException(
" Error: UbpQuadExpr -- inconsistent sizes in vector<vector> - operator.");
100 out[i] = in1[i] - in2[i];
106 inline std::vector<double>
107 operator*(
const std::vector<double>& in1,
const double in2)
109 std::vector<double> out(in1.size());
110 for (
size_t i = 0; i < in1.size(); i++) {
111 out[i] = in1[i] * in2;
117 inline std::vector<std::vector<double>>
118 operator*(
const std::vector<std::vector<double>>& in1,
const double in2)
120 std::vector<std::vector<double>> out(in1.size());
121 for (
size_t i = 0; i < in1.size(); i++) {
122 out[i] = in1[i] * in2;
162 if (iLin >= nvarIn) {
211 throw MAiNGOException(
" Error: UbpQuadExpr -- nvar does not fit in += operator.");
218 else if (in.
nvar == 0) {
248 throw MAiNGOException(
" Error: UbpQuadExpr -- nvar does not fit in += operator.");
255 else if (in.
nvar == 0) {
285 throw MAiNGOException(
" Error: UbpQuadExpr -- nvar does not fit in * operator.");
293 else if (in.
nvar == 0) {
300 throw MAiNGOException(
" Error: UbpQuadExpr -- multiplications higher than second order are not allowed in (MIQ)Ps.");
302 for (
size_t i = 0; i <
nvar; i++) {
303 for (
size_t j = 0; j < in.
nvar; j++) {
343 *
this *= (1. / (double)in);
371 throw MAiNGOException(
" Error: UbpQuadExpr -- nvar does not fit in + operator.");
379 else if (in2.
nvar == 0) {
448 throw MAiNGOException(
" Error: UbpQuadExpr -- nvar does not fit in - operator.");
457 else if (in2.
nvar == 0) {
524 throw MAiNGOException(
" Error: UbpQuadExpr -- nvar does not fit in * operator.");
533 else if (in2.
nvar == 0) {
541 throw MAiNGOException(
" Error: UbpQuadExpr -- multiplications higher than second order are not allowed in (MIQ)Ps.");
543 for (
size_t i = 0; i < in1.
nvar; i++) {
544 for (
size_t j = 0; j < in2.
nvar; j++) {
571 return in1 * ((double)in2);
585 return in2 * ((double)in1);
592 throw MAiNGOException(
" Error: UbpQuadExpr -- function x/y not allowed in (MIQ)Ps.");
599 return in1 * (1. / in2);
606 return in1 * (1. / (double)in2);
613 throw MAiNGOException(
" Error: UbpQuadExpr -- function 1/x not allowed in (MIQ)Ps.");
620 throw MAiNGOException(
" Error: UbpQuadExpr -- function 1/x not allowed in (MIQ)Ps.");
649 throw std::runtime_error(
" Error: UbpQuadExpr -- function pow with n <> 0,1,2 not allowed in (MIQ)Ps.");
662 throw std::runtime_error(
" Error: UbpQuadExpr -- function pow with a <> 0,1,2 not allowed in (MIQ)Ps.");
664 static QE pow(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function pow(x,y) not allowed in (MIQ)Ps."); }
665 static QE pow(
const double x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function pow(a,y) not allowed in (MIQ)Ps."); }
666 static QE pow(
const int x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function pow(n,y) not allowed in (MIQ)Ps."); }
667 static QE prod(
const unsigned int n,
const QE* x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function prod not allowed in (MIQ)Ps."); }
668 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."); }
669 static QE point(
const double c) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function point not allowed in (MIQ)Ps."); }
670 static QE zeroone() {
throw std::runtime_error(
" Error: UbpQuadExpr -- function zeroone not allowed in (MIQ)Ps."); }
671 static void I(
QE& x,
const QE& y) { x = y; }
672 static double l(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function l not allowed in (MIQ)Ps."); }
673 static double u(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function u not allowed in (MIQ)Ps."); }
674 static double abs(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function abs not allowed in (MIQ)Ps."); }
675 static double mid(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function mid not allowed in (MIQ)Ps."); }
676 static double diam(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function diam not allowed in (MIQ)Ps."); }
677 static QE inv(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function inv not allowed in (MIQ)Ps."); }
678 static QE sqrt(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function sqrt not allowed in (MIQ)Ps."); }
679 static QE exp(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function exp not allowed in (MIQ)Ps."); }
680 static QE log(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function log not allowed in (MIQ)Ps."); }
681 static QE xlog(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function xlog not allowed in (MIQ)Ps."); }
682 static QE fabsx_times_x(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function fabsx_times_x not allowed in (MIQ)Ps."); }
683 static QE xexpax(
const QE& x,
const double a) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function xexpax not allowed in (MIQ)Ps."); }
684 static QE lmtd(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function lmtd not allowed in (MIQ)Ps."); }
685 static QE rlmtd(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function rlmtd not allowed in (MIQ)Ps."); }
686 static QE euclidean_norm_2d(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function euclidean_norm_2d not allowed in (MIQ)Ps."); }
687 static QE expx_times_y(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function expx_times_y not allowed in (MIQ)Ps."); }
688 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,
689 const double p7 = 0,
const double p8 = 0,
const double p9 = 0,
const double p10 = 0) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function vapor_pressure not allowed in (MIQ)Ps."); }
690 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,
691 const double p7 = 0) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function ideal_gas_enthalpy not allowed in (MIQ)Ps."); }
692 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,
693 const double p7 = 0,
const double p8 = 0,
const double p9 = 0,
const double p10 = 0) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function saturation_temperature not allowed in (MIQ)Ps."); }
694 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 enthalpy_of_vaporization not allowed in (MIQ)Ps."); }
695 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 cost_function not allowed in (MIQ)Ps."); }
696 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 nrtl_tau not allowed in (MIQ)Ps."); }
697 static QE nrtl_dtau(
const QE& x,
const double b,
const double e,
const double f) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function nrtl_dtau not allowed in (MIQ)Ps."); }
698 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 nrtl_G not allowed in (MIQ)Ps."); }
699 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 nrtl_Gtau not allowed in (MIQ)Ps."); }
700 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 nrtl_Gdtau not allowed in (MIQ)Ps."); }
701 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 nrtl_dGtau not allowed in (MIQ)Ps."); }
702 static QE iapws(
const QE& x,
const double type) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function iapws not allowed in (MIQ)Ps."); }
703 static QE iapws(
const QE& x,
const QE& y,
const double type) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function iapws not allowed in (MIQ)Ps."); }
704 static QE p_sat_ethanol_schroeder(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function p_sat_ethanol_schroeder not allowed in (MIQ)Ps."); }
707 static QE covariance_function(
const QE& x,
const double type) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function covariance_function not allowed in (MIQ)Ps."); }
708 static QE acquisition_function(
const QE& x,
const QE& y,
const double type,
const double fmin) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function acquisition_function not allowed in (MIQ)Ps."); }
710 static QE regnormal(
const QE& x,
const double a,
const double b) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function regnormal not allowed in (MIQ)Ps."); }
711 static QE fabs(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function fabs not allowed in (MIQ)Ps."); }
712 static QE sin(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function sin not allowed in (MIQ)Ps."); }
713 static QE cos(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function cos not allowed in (MIQ)Ps."); }
714 static QE tan(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function tan not allowed in (MIQ)Ps."); }
715 static QE asin(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function asin not allowed in (MIQ)Ps."); }
716 static QE acos(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function acos not allowed in (MIQ)Ps."); }
717 static QE atan(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function atan not allowed in (MIQ)Ps."); }
718 static QE sinh(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function sinh not allowed in (MIQ)Ps."); }
719 static QE cosh(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function cosh not allowed in (MIQ)Ps."); }
720 static QE tanh(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function tanh not allowed in (MIQ)Ps."); }
721 static QE coth(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function coth not allowed in (MIQ)Ps."); }
722 static QE asinh(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function asinh not allowed in (MIQ)Ps."); }
723 static QE acosh(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function acosh not allowed in (MIQ)Ps."); }
724 static QE atanh(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function atanh not allowed in (MIQ)Ps."); }
725 static QE acoth(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function acoth not allowed in (MIQ)Ps."); }
726 static QE erf(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function erf not allowed in (MIQ)Ps."); }
727 static QE erfc(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function erfc not allowed in (MIQ)Ps."); }
728 static QE fstep(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function fstep not allowed in (MIQ)Ps."); }
729 static QE bstep(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function bstep not allowed in (MIQ)Ps."); }
730 static QE hull(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function hull not allowed in (MIQ)Ps."); }
731 static QE min(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function min not allowed in (MIQ)Ps."); }
732 static QE max(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function max not allowed in (MIQ)Ps."); }
733 static QE pos(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function pos not allowed in (MIQ)Ps."); }
734 static QE neg(
const QE& x) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function neg not allowed in (MIQ)Ps."); }
735 static QE lb_func(
const QE& x,
const double lb) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function lb_func not allowed in (MIQ)Ps."); }
736 static QE ub_func(
const QE& x,
const double ub) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function ub_func not allowed in (MIQ)Ps."); }
737 static QE bounding_func(
const QE& x,
const double lb,
const double ub) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function bounding_func not allowed in (MIQ)Ps."); }
738 static QE squash_node(
const QE& x,
const double lb,
const double ub) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function squash_node not allowed in (MIQ)Ps."); }
739 static QE sum_div(
const std::vector<QE>& x,
const std::vector<double>& coeff) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function sum_div not allowed in (MIQ)Ps."); }
740 static QE xlog_sum(
const std::vector<QE>& x,
const std::vector<double>& coeff) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function xlog_sum not allowed in (MIQ)Ps."); }
741 static QE mc_print(
const QE& x,
const int number) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function mc_print not allowed in (MIQ)Ps."); }
742 static QE arh(
const QE& x,
const double k) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function arh not allowed in (MIQ)Ps."); }
743 static QE cheb(
const QE& x,
const unsigned n) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function cheb not allowed in (MIQ)Ps."); }
744 static bool inter(
QE& xIy,
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function inter not allowed in (MIQ)Ps."); }
745 static bool eq(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function eq not allowed in (MIQ)Ps."); }
746 static bool ne(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function ne not allowed in (MIQ)Ps."); }
747 static bool lt(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function lt not allowed in (MIQ)Ps."); }
748 static bool le(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function le not allowed in (MIQ)Ps."); }
749 static bool gt(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function gt not allowed in (MIQ)Ps."); }
750 static bool ge(
const QE& x,
const QE& y) {
throw std::runtime_error(
" Error: UbpQuadExpr -- function ge not allowed in (MIQ)Ps."); }
UbpQuadExpr & operator*=(const double in)
Operator*= for double.
Definition: ubpQuadExpr.h:315
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:335
static QE nrtl_tau(const QE &x, const double a, const double b, const double e, const double f)
Definition: ubpQuadExpr.h:696
static QE acosh(const QE &x)
Definition: ubpQuadExpr.h:723
static QE pos(const QE &x)
Definition: ubpQuadExpr.h:733
UbpQuadExpr & operator*=(const int in)
Operator*= for int.
Definition: ubpQuadExpr.h:324
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:107
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:701
UbpQuadExpr & operator/=(const int in)
Operator/= for int.
Definition: ubpQuadExpr.h:341
UbpQuadExpr & operator-=(const int in)
Operator-= for int.
Definition: ubpQuadExpr.h:275
static QE tanh(const QE &x)
Definition: ubpQuadExpr.h:720
UbpQuadExpr & operator-=(const double in)
Operator-= for double.
Definition: ubpQuadExpr.h:268
static QE pow(const double x, const QE &y)
Definition: ubpQuadExpr.h:665
UbpQuadExpr(const double in)
Constructor for a constant.
Definition: ubpQuadExpr.h:178
static QE coth(const QE &x)
Definition: ubpQuadExpr.h:721
std::vector< std::vector< double > > coeffsQuad
Definition: ubpQuadExpr.h:354
static QE covariance_function(const QE &x, const double type)
Definition: ubpQuadExpr.h:707
static QE iapws(const QE &x, const double type)
Definition: ubpQuadExpr.h:702
static QE rlmtd(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:685
static bool inter(QE &xIy, const QE &x, const QE &y)
Definition: ubpQuadExpr.h:744
static QE atanh(const QE &x)
Definition: ubpQuadExpr.h:724
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:694
static QE rho_vap_sat_ethanol_schroeder(const QE &x)
Definition: ubpQuadExpr.h:705
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:699
static QE sin(const QE &x)
Definition: ubpQuadExpr.h:712
UbpQuadExpr & operator-=(const UbpQuadExpr &in)
Operator-= for UbpQuadExpr.
Definition: ubpQuadExpr.h:245
std::vector< double > coeffsLin
Definition: ubpQuadExpr.h:353
UbpQuadExpr(const size_t nvarIn, const size_t iLin)
Constructor for a specific variable participating linearly.
Definition: ubpQuadExpr.h:160
static QE hull(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:730
static double mid(const QE &x)
Definition: ubpQuadExpr.h:675
static QE rho_liq_sat_ethanol_schroeder(const QE &x)
Definition: ubpQuadExpr.h:706
UbpQuadExpr operator/(const UbpQuadExpr &in1, const UbpQuadExpr &in2)
Operator/ for two UbpQuadExpr.
Definition: ubpQuadExpr.h:590
static QE mc_print(const QE &x, const int number)
Definition: ubpQuadExpr.h:741
static QE expx_times_y(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:687
static QE ub_func(const QE &x, const double ub)
Definition: ubpQuadExpr.h:736
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:690
double constant
Definition: ubpQuadExpr.h:352
static QE tan(const QE &x)
Definition: ubpQuadExpr.h:714
static QE xlog_sum(const std::vector< QE > &x, const std::vector< double > &coeff)
Definition: ubpQuadExpr.h:740
static QE sqr(const QE &x)
Definition: ubpQuadExpr.h:637
static QE acos(const QE &x)
Definition: ubpQuadExpr.h:716
static QE point(const double c)
Definition: ubpQuadExpr.h:669
UbpQuadExpr(const size_t nvarIn)
Constructor accepting a number of variables.
Definition: ubpQuadExpr.h:145
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:698
static bool eq(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:745
static bool ne(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:746
static QE iapws(const QE &x, const QE &y, const double type)
Definition: ubpQuadExpr.h:703
static QE exp(const QE &x)
Definition: ubpQuadExpr.h:679
maingo::ubp::UbpQuadExpr QE
Definition: ubpQuadExpr.h:636
static QE cost_function(const QE &x, const double type, const double p1, const double p2, const double p3)
Definition: ubpQuadExpr.h:695
static QE log(const QE &x)
Definition: ubpQuadExpr.h:680
static QE neg(const QE &x)
Definition: ubpQuadExpr.h:734
static bool lt(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:747
static QE pow(const QE &x, const double a)
Definition: ubpQuadExpr.h:651
static QE min(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:731
static QE sum_div(const std::vector< QE > &x, const std::vector< double > &coeff)
Definition: ubpQuadExpr.h:739
static bool ge(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:750
static QE atan(const QE &x)
Definition: ubpQuadExpr.h:717
static QE sinh(const QE &x)
Definition: ubpQuadExpr.h:718
static QE monom(const unsigned int n, const QE *x, const unsigned *k)
Definition: ubpQuadExpr.h:668
static QE asin(const QE &x)
Definition: ubpQuadExpr.h:715
UbpQuadExpr & operator/=(const UbpQuadExpr &in)
Operator/= for UbpQuadExpr.
Definition: ubpQuadExpr.h:333
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:688
static QE gaussian_probability_density_function(const QE &x)
Definition: ubpQuadExpr.h:709
static QE sqrt(const QE &x)
Definition: ubpQuadExpr.h:678
UbpQuadExpr & operator+=(const int in)
Operator+= for int.
Definition: ubpQuadExpr.h:238
static QE fabs(const QE &x)
Definition: ubpQuadExpr.h:711
namespace holding all essentials of MAiNGO
Definition: aleModel.h:25
static QE pow(const QE &x, const int n)
Definition: ubpQuadExpr.h:638
static QE asinh(const QE &x)
Definition: ubpQuadExpr.h:722
UbpQuadExpr()
Default constructor.
Definition: ubpQuadExpr.h:138
static QE euclidean_norm_2d(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:686
static QE fstep(const QE &x)
Definition: ubpQuadExpr.h:728
static QE p_sat_ethanol_schroeder(const QE &x)
Definition: ubpQuadExpr.h:704
static QE acoth(const QE &x)
Definition: ubpQuadExpr.h:725
static double l(const QE &x)
Definition: ubpQuadExpr.h:672
static QE fabsx_times_x(const QE &x)
Definition: ubpQuadExpr.h:682
static QE arh(const QE &x, const double k)
Definition: ubpQuadExpr.h:742
static QE lb_func(const QE &x, const double lb)
Definition: ubpQuadExpr.h:735
static bool gt(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:749
static QE inv(const QE &x)
Definition: ubpQuadExpr.h:677
static QE prod(const unsigned int n, const QE *x)
Definition: ubpQuadExpr.h:667
static QE zeroone()
Definition: ubpQuadExpr.h:670
std::vector< double > operator+(const std::vector< double > &in1, const std::vector< double > &in2)
Operator+ for addition of two double vectors.
Definition: ubpQuadExpr.h:51
static QE erf(const QE &x)
Definition: ubpQuadExpr.h:726
static QE squash_node(const QE &x, const double lb, const double ub)
Definition: ubpQuadExpr.h:738
static QE nrtl_dtau(const QE &x, const double b, const double e, const double f)
Definition: ubpQuadExpr.h:697
static void I(QE &x, const QE &y)
Definition: ubpQuadExpr.h:671
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:700
static bool le(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:748
size_t nvar
Definition: ubpQuadExpr.h:351
UbpQuadExpr & operator=(const int in)
Operator= for an integer constant.
Definition: ubpQuadExpr.h:198
static double abs(const QE &x)
Definition: ubpQuadExpr.h:674
static QE cheb(const QE &x, const unsigned n)
Definition: ubpQuadExpr.h:743
static double diam(const QE &x)
Definition: ubpQuadExpr.h:676
std::vector< double > operator-(const std::vector< double > &in)
Operator- for a double vector.
Definition: ubpQuadExpr.h:29
UbpQuadExpr & operator=(const double in)
Operator= for a double constant.
Definition: ubpQuadExpr.h:188
static QE pow(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:664
static QE cosh(const QE &x)
Definition: ubpQuadExpr.h:719
static QE pow(const int x, const QE &y)
Definition: ubpQuadExpr.h:666
UbpQuadExpr & operator*=(const UbpQuadExpr &in)
Operator*= for UbpQuadExpr.
Definition: ubpQuadExpr.h:282
This class defines the exceptions thrown by MAiNGO.
Definition: MAiNGOException.h:35
static QE acquisition_function(const QE &x, const QE &y, const double type, const double fmin)
Definition: ubpQuadExpr.h:708
UbpQuadExpr & operator+=(const UbpQuadExpr &in)
Operator+= for UbpQuadExpr.
Definition: ubpQuadExpr.h:208
static QE xexpax(const QE &x, const double a)
Definition: ubpQuadExpr.h:683
static QE bounding_func(const QE &x, const double lb, const double ub)
Definition: ubpQuadExpr.h:737
static QE max(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:732
static QE cos(const QE &x)
Definition: ubpQuadExpr.h:713
static double u(const QE &x)
Definition: ubpQuadExpr.h:673
UbpQuadExpr & operator+=(const double in)
Operator+= for double.
Definition: ubpQuadExpr.h:231
static QE erfc(const QE &x)
Definition: ubpQuadExpr.h:727
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:692
static QE lmtd(const QE &x, const QE &y)
Definition: ubpQuadExpr.h:684
static QE regnormal(const QE &x, const double a, const double b)
Definition: ubpQuadExpr.h:710
Struct used to compute coefficients of linear and quadratic/bilinear terms in (MIQ)Ps. This struct is used to avoid the need of propagating the IloExpr object resulting in HUGE RAM usage.
Definition: ubpQuadExpr.h:132
static QE xlog(const QE &x)
Definition: ubpQuadExpr.h:681
static QE bstep(const QE &x)
Definition: ubpQuadExpr.h:729
bool hasQuad
Definition: ubpQuadExpr.h:355