15 #include "symbol_table.hpp" 17 #include "util/evaluator.hpp" 27 using Var = mc::FFVar;
53 symbol_table& symbols,
54 const std::vector<Var>& variables,
55 const std::unordered_map<std::string, int>& positions):
57 _variables(variables),
69 return dispatch(expr.get());
74 return dispatch(expr.get());
77 template <
typename TReturn,
typename TType>
80 throw MAiNGOException(
" Error: MaingoEvaluator -- Used unsupported dispatch");
83 template <
unsigned IDim>
84 typename ale::index<IDim>::ref_type
dispatch(value_node<ale::index<IDim>>* node)
86 evaluator eval(_symbols);
87 return eval.dispatch(node);
90 template <
typename TType>
91 typename set<TType, 0>::basic_type
dispatch(value_node<set<TType, 0>>* node)
93 evaluator eval(_symbols);
94 return eval.dispatch(node);
98 template <
unsigned IDim>
99 tensor<Var, IDim>
dispatch(value_node<real<IDim>>* node)
101 return std::visit(*
this, node->get_variant());
107 return std::visit(*
this, node->get_variant());
113 return std::visit(*
this, node->get_variant());
117 template <
unsigned IDim>
118 tensor<Var, IDim>
dispatch(value_symbol<real<IDim>>* sym)
120 return std::visit(*
this, sym->get_value_variant());
125 return std::visit(*
this, sym->get_value_variant());
134 template <
unsigned IDim>
135 tensor<Var, IDim>
operator()(constant_node<real<IDim>>* node)
137 tensor<Var, IDim> result(node->value.shape());
138 result.ref().assign(node->value);
151 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported general logical expression");
156 template <
unsigned IDim>
157 tensor<Var, IDim>
operator()(parameter_node<real<IDim>>* node)
159 auto sym = _symbols.resolve<real<IDim>>(node->name);
161 throw MAiNGOException(
" Error: MaingoEvaluator -- Symbol " + node->name +
" has unexpected type");
163 return dispatch(sym);
168 auto sym = _symbols.resolve<real<0>>(node->name);
170 throw MAiNGOException(
" Error: MaingoEvaluator -- Symbol " + node->name +
" has unexpected type");
172 return dispatch(sym);
178 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported general logical expression");
183 template <
unsigned IDim>
184 tensor<Var, IDim>
operator()(parameter_symbol<real<IDim>>* sym)
186 tensor<Var, IDim> result(sym->m_value.shape());
187 result.ref().assign(sym->m_value);
198 template <
unsigned IDim>
199 tensor<Var, IDim>
operator()(variable_symbol<real<IDim>>* sym)
201 tensor<Var, IDim> result(sym->shape());
202 size_t indexes[IDim];
203 for (
int i = 0; i < IDim; ++i) {
206 int position = _positions.at(sym->m_name);
207 while (indexes[0] < result.shape(0)) {
208 result[indexes] = _variables[position];
210 for (
int i = IDim - 1; i >= 0; --i) {
211 if (++indexes[i] < sym->shape(i)) {
225 return _variables[_positions.at(sym->m_name)];
231 return dispatch(sym->m_value.get());
237 return dispatch(sym->m_value.get());
241 template <
unsigned IDim>
244 return dispatch(node->template get_child<0>())[dispatch(node->template get_child<1>()) - 1];
250 return dispatch(node->get_child<0>())[dispatch(node->get_child<1>()) - 1];
256 return -dispatch(node->get_child<0>());
262 return 1 / dispatch(node->get_child<0>());
269 for (
auto it = node->children.begin(); it != node->children.end(); ++it) {
270 result += dispatch(it->get());
278 if (node->children.size() % 2 == 0) {
279 throw MAiNGOException(
" Error: MaingoEvaluator -- Called sum_div with even number of arguments");
281 if (node->children.size() < 3) {
282 throw MAiNGOException(
" Error: MaingoEvaluator -- Called sum_div with less than 3 arguments");
284 std::vector<Var> vars;
285 std::vector<double> coeff;
286 for (
auto it = node->children.begin(); it != node->children.end(); ++it) {
287 if (distance(node->children.begin(), it) < (
int)(node->children.size() / 2)) {
288 vars.emplace_back(dispatch(it->get()));
291 if (!dispatch(it->get()).cst()) {
292 throw MAiNGOException(
" MaingoEvaluator -- Error: The " + std::to_string(distance(node->children.begin(), it)) +
"-th coefficient in sum_div is not a constant");
294 coeff.emplace_back(dispatch(it->get()).num().val());
297 return mc::sum_div(vars, coeff);
303 if (!(node->children.size() % 2 == 0)) {
304 throw MAiNGOException(
" Error: MaingoEvaluator -- Called xlog_sum with odd number of arguments");
306 if (node->children.size() < 2) {
307 throw MAiNGOException(
" Error: MaingoEvaluator -- Called xlog_sum with less than arguments");
309 std::vector<Var> vars;
310 std::vector<double> coeff;
311 for (
auto it = node->children.begin(); it != node->children.end(); ++it) {
312 if (distance(node->children.begin(), it) < (
int)(node->children.size() / 2)) {
313 vars.emplace_back(dispatch(it->get()));
316 if (!dispatch(it->get()).cst()) {
317 throw MAiNGOException(
" Error: MaingoEvaluator -- The " + std::to_string(distance(node->children.begin(), it)) +
"-th coefficient in xlog_sum is not a constant");
319 coeff.emplace_back(dispatch(it->get()).num().val());
322 return mc::xlog_sum(vars, coeff);
329 for (
auto it = node->children.begin(); it != node->children.end(); ++it) {
330 result *= dispatch(it->get());
339 for (
auto it = node->children.rbegin(); it != node->children.rend(); ++it) {
340 result = pow(dispatch(it->get()), result);
348 if (node->children.size() == 0) {
349 throw MAiNGOException(
" Error: MaingoEvaluator -- Called min without arguments");
351 auto it = node->children.begin();
352 Var result = dispatch(it->get());
354 for (; it != node->children.end(); ++it) {
355 result = mc::min(dispatch(it->get()), result);
363 if (node->children.size() == 0) {
364 throw MAiNGOException(
" Error: MaingoEvaluator -- Called max without arguments");
366 auto it = node->children.begin();
367 Var result = dispatch(it->get());
369 for (; it != node->children.end(); ++it) {
370 result = mc::max(dispatch(it->get()), result);
376 template <
typename TType>
379 auto elements = dispatch(node->template get_child<0>());
380 _symbols.push_scope();
381 if (elements.begin() == elements.end()) {
382 throw MAiNGOException(
" Error: MaingoEvaluator -- Called set_min with empty set");
384 auto it = elements.begin();
385 _symbols.define(node->name,
new parameter_symbol<TType>(node->name, *it));
386 Var result = dispatch(node->template get_child<1>());
388 for (; it != elements.end(); ++it) {
389 _symbols.define(node->name,
new parameter_symbol<TType>(node->name, *it));
390 result = mc::min(dispatch(node->template get_child<1>()), result);
392 _symbols.pop_scope();
397 template <
typename TType>
400 auto elements = dispatch(node->template get_child<0>());
401 _symbols.push_scope();
402 if (elements.begin() == elements.end()) {
403 throw MAiNGOException(
" Error: MaingoEvaluator -- Called set_max with empty set");
405 auto it = elements.begin();
406 _symbols.define(node->name,
new parameter_symbol<TType>(node->name, *it));
407 Var result = dispatch(node->template get_child<1>());
409 for (; it != elements.end(); ++it) {
410 _symbols.define(node->name,
new parameter_symbol<TType>(node->name, *it));
411 result = mc::max(dispatch(node->template get_child<1>()), result);
413 _symbols.pop_scope();
420 return exp(dispatch(node->get_child<0>()));
426 return log(dispatch(node->get_child<0>()));
432 return sqrt(dispatch(node->get_child<0>()));
438 return sin(dispatch(node->get_child<0>()));
444 return asin(dispatch(node->get_child<0>()));
450 return cos(dispatch(node->get_child<0>()));
456 return acos(dispatch(node->get_child<0>()));
462 return tan(dispatch(node->get_child<0>()));
468 return atan(dispatch(node->get_child<0>()));
474 return mc::lmtd(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()));
480 if (!dispatch(node->get_child<1>()).cst()) {
481 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in xexpax is not a constant");
483 return mc::xexpax(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val());
489 if (!dispatch(node->get_child<1>()).cst()) {
490 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in arh is not a constant");
492 return mc::Op<mc::FFVar>::arh(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val());
498 if (!dispatch(node->get_child<1>()).cst()) {
499 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in lb_func is not a constant");
501 return mc::lb_func(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val());
507 if (!dispatch(node->get_child<1>()).cst()) {
508 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in ub_func is not a constant");
510 return mc::ub_func(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val());
516 if (!dispatch(node->get_child<1>()).cst()) {
517 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in bounding_func is not a constant");
519 if (!dispatch(node->get_child<2>()).cst()) {
520 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in bounding_func is not a constant");
522 return mc::bounding_func(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val());
528 if (!dispatch(node->get_child<1>()).cst()) {
529 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in squash_node is not a constant");
531 if (!dispatch(node->get_child<2>()).cst()) {
532 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in squash_node is not a constant");
534 return mc::squash_node(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val());
540 if (!dispatch(node->get_child<2>()).cst()) {
541 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in af_lcb_node is not a constant");
543 return mc::acquisition_function(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()), 1, dispatch(node->get_child<2>()).num().val());
549 if (!dispatch(node->get_child<2>()).cst()) {
550 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in af_ei_node is not a constant");
552 return mc::acquisition_function(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()), 2, dispatch(node->get_child<2>()).num().val());
558 if (!dispatch(node->get_child<2>()).cst()) {
559 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in af_pi_node is not a constant");
561 return mc::acquisition_function(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()), 3, dispatch(node->get_child<2>()).num().val());
567 if (!dispatch(node->get_child<1>()).cst()) {
568 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in regnormal_node is not a constant");
570 if (!dispatch(node->get_child<2>()).cst()) {
571 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in regnormal_node is not a constant");
573 return mc::regnormal(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val());
579 if (!dispatch(node->get_child<1>()).cst()) {
580 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in nrtl_dtau is not a constant");
582 if (!dispatch(node->get_child<2>()).cst()) {
583 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in nrtl_dtau is not a constant");
585 if (!dispatch(node->get_child<3>()).cst()) {
586 throw MAiNGOException(
" Error: MaingoEvaluator -- Fourth argument in nrtl_dtau is not a constant");
588 return mc::nrtl_dtau(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
589 dispatch(node->get_child<3>()).num().val());
595 if (!dispatch(node->get_child<1>()).cst()) {
596 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in ext_antoine_psat is not a constant");
598 if (!dispatch(node->get_child<2>()).cst()) {
599 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in ext_antoine_psat is not a constant");
601 if (!dispatch(node->get_child<3>()).cst()) {
602 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in ext_antoine_psat is not a constant");
604 if (!dispatch(node->get_child<4>()).cst()) {
605 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in ext_antoine_psat is not a constant");
607 if (!dispatch(node->get_child<5>()).cst()) {
608 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in ext_antoine_psat is not a constant");
610 if (!dispatch(node->get_child<6>()).cst()) {
611 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in ext_antoine_psat is not a constant");
613 if (!dispatch(node->get_child<7>()).cst()) {
614 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p7 in ext_antoine_psat is not a constant");
617 return mc::vapor_pressure(dispatch(node->get_child<0>()), 1, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
618 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
619 dispatch(node->get_child<6>()).num().val(), dispatch(node->get_child<7>()).num().val());
625 if (!dispatch(node->get_child<1>()).cst()) {
626 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in antoine_psat is not a constant");
628 if (!dispatch(node->get_child<2>()).cst()) {
629 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in antoine_psat is not a constant");
631 if (!dispatch(node->get_child<3>()).cst()) {
632 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in antoine_psat is not a constant");
635 return mc::vapor_pressure(dispatch(node->get_child<0>()), 2, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
636 dispatch(node->get_child<3>()).num().val());
642 if (!dispatch(node->get_child<1>()).cst()) {
643 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in wagner_psat is not a constant");
645 if (!dispatch(node->get_child<2>()).cst()) {
646 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in wagner_psat is not a constant");
648 if (!dispatch(node->get_child<3>()).cst()) {
649 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in wagner_psat is not a constant");
651 if (!dispatch(node->get_child<4>()).cst()) {
652 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in wagner_psat is not a constant");
654 if (!dispatch(node->get_child<5>()).cst()) {
655 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in wagner_psat is not a constant");
657 if (!dispatch(node->get_child<6>()).cst()) {
658 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in wagner_psat is not a constant");
661 return mc::vapor_pressure(dispatch(node->get_child<0>()), 3, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
662 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
663 dispatch(node->get_child<6>()).num().val());
669 if (!dispatch(node->get_child<1>()).cst()) {
670 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in ik_cape_psat is not a constant");
672 if (!dispatch(node->get_child<2>()).cst()) {
673 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in ik_cape_psat is not a constant");
675 if (!dispatch(node->get_child<3>()).cst()) {
676 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in ik_cape_psat is not a constant");
678 if (!dispatch(node->get_child<4>()).cst()) {
679 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in ik_cape_psat is not a constant");
681 if (!dispatch(node->get_child<5>()).cst()) {
682 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in ik_cape_psat is not a constant");
684 if (!dispatch(node->get_child<6>()).cst()) {
685 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in ik_cape_psat is not a constant");
687 if (!dispatch(node->get_child<7>()).cst()) {
688 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p7 in ik_cape_psat is not a constant");
690 if (!dispatch(node->get_child<8>()).cst()) {
691 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p8 in ik_cape_psat is not a constant");
693 if (!dispatch(node->get_child<9>()).cst()) {
694 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p9 in ik_cape_psat is not a constant");
696 if (!dispatch(node->get_child<10>()).cst()) {
697 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p10 in ik_cape_psat is not a constant");
700 return mc::vapor_pressure(dispatch(node->get_child<0>()), 4, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
701 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
702 dispatch(node->get_child<6>()).num().val(), dispatch(node->get_child<7>()).num().val(), dispatch(node->get_child<8>()).num().val(),
703 dispatch(node->get_child<9>()).num().val(), dispatch(node->get_child<10>()).num().val());
709 if (!dispatch(node->get_child<1>()).cst()) {
710 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in aspen_hig is not a constant");
712 if (!dispatch(node->get_child<2>()).cst()) {
713 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in aspen_hig is not a constant");
715 if (!dispatch(node->get_child<3>()).cst()) {
716 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in aspen_hig is not a constant");
718 if (!dispatch(node->get_child<4>()).cst()) {
719 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in aspen_hig is not a constant");
721 if (!dispatch(node->get_child<5>()).cst()) {
722 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in aspen_hig is not a constant");
724 if (!dispatch(node->get_child<6>()).cst()) {
725 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in aspen_hig is not a constant");
727 if (!dispatch(node->get_child<7>()).cst()) {
728 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p7 in aspen_hig is not a constant");
731 return mc::ideal_gas_enthalpy(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), 1, dispatch(node->get_child<2>()).num().val(),
732 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
733 dispatch(node->get_child<6>()).num().val(), dispatch(node->get_child<7>()).num().val());
739 if (!dispatch(node->get_child<1>()).cst()) {
740 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in nasa9_hig is not a constant");
742 if (!dispatch(node->get_child<2>()).cst()) {
743 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in nasa9_hig is not a constant");
745 if (!dispatch(node->get_child<3>()).cst()) {
746 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in nasa9_hig is not a constant");
748 if (!dispatch(node->get_child<4>()).cst()) {
749 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in nasa9_hig is not a constant");
751 if (!dispatch(node->get_child<5>()).cst()) {
752 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in nasa9_hig is not a constant");
754 if (!dispatch(node->get_child<6>()).cst()) {
755 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in nasa9_hig is not a constant");
757 if (!dispatch(node->get_child<7>()).cst()) {
758 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p7 in nasa9_hig is not a constant");
760 if (!dispatch(node->get_child<8>()).cst()) {
761 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p8 in nasa9_hig is not a constant");
764 return mc::ideal_gas_enthalpy(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), 2, dispatch(node->get_child<2>()).num().val(),
765 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
766 dispatch(node->get_child<6>()).num().val(), dispatch(node->get_child<7>()).num().val(), dispatch(node->get_child<8>()).num().val());
772 if (!dispatch(node->get_child<1>()).cst()) {
773 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in dippr107_hig is not a constant");
775 if (!dispatch(node->get_child<2>()).cst()) {
776 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in dippr107_hig is not a constant");
778 if (!dispatch(node->get_child<3>()).cst()) {
779 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in dippr107_hig is not a constant");
781 if (!dispatch(node->get_child<4>()).cst()) {
782 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in dippr107_hig is not a constant");
784 if (!dispatch(node->get_child<5>()).cst()) {
785 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in dippr107_hig is not a constant");
787 if (!dispatch(node->get_child<6>()).cst()) {
788 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in dippr107_hig is not a constant");
791 return mc::ideal_gas_enthalpy(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), 3, dispatch(node->get_child<2>()).num().val(),
792 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
793 dispatch(node->get_child<6>()).num().val());
799 if (!dispatch(node->get_child<1>()).cst()) {
800 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in dippr127_hig is not a constant");
802 if (!dispatch(node->get_child<2>()).cst()) {
803 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in dippr127_hig is not a constant");
805 if (!dispatch(node->get_child<3>()).cst()) {
806 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in dippr127_hig is not a constant");
808 if (!dispatch(node->get_child<4>()).cst()) {
809 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in dippr127_hig is not a constant");
811 if (!dispatch(node->get_child<5>()).cst()) {
812 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in dippr127_hig is not a constant");
814 if (!dispatch(node->get_child<6>()).cst()) {
815 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in dippr127_hig is not a constant");
817 if (!dispatch(node->get_child<7>()).cst()) {
818 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p7 in dippr127_hig is not a constant");
820 if (!dispatch(node->get_child<8>()).cst()) {
821 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p8 in dippr127_hig is not a constant");
824 return mc::ideal_gas_enthalpy(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), 4, dispatch(node->get_child<2>()).num().val(),
825 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
826 dispatch(node->get_child<6>()).num().val(), dispatch(node->get_child<7>()).num().val(), dispatch(node->get_child<8>()).num().val());
832 if (!dispatch(node->get_child<1>()).cst()) {
833 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in antoine_tsat is not a constant");
835 if (!dispatch(node->get_child<2>()).cst()) {
836 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in antoine_tsat is not a constant");
838 if (!dispatch(node->get_child<3>()).cst()) {
839 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in antoine_tsat is not a constant");
842 return mc::saturation_temperature(dispatch(node->get_child<0>()), 2, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
843 dispatch(node->get_child<3>()).num().val());
849 if (!dispatch(node->get_child<1>()).cst()) {
850 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in watson_dhvap is not a constant");
852 if (!dispatch(node->get_child<2>()).cst()) {
853 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in watson_dhvap is not a constant");
855 if (!dispatch(node->get_child<3>()).cst()) {
856 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in watson_dhvap is not a constant");
858 if (!dispatch(node->get_child<4>()).cst()) {
859 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in watson_dhvap is not a constant");
861 if (!dispatch(node->get_child<5>()).cst()) {
862 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in watson_dhvap is not a constant");
865 return mc::enthalpy_of_vaporization(dispatch(node->get_child<0>()), 1, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
866 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val());
872 if (!dispatch(node->get_child<1>()).cst()) {
873 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in dippr106_dhvap is not a constant");
875 if (!dispatch(node->get_child<2>()).cst()) {
876 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in dippr106_dhvap is not a constant");
878 if (!dispatch(node->get_child<3>()).cst()) {
879 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in dippr106_dhvap is not a constant");
881 if (!dispatch(node->get_child<4>()).cst()) {
882 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in dippr106_dhvap is not a constant");
884 if (!dispatch(node->get_child<5>()).cst()) {
885 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in dippr106_dhvap is not a constant");
887 if (!dispatch(node->get_child<6>()).cst()) {
888 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in dippr106_dhvap is not a constant");
891 return mc::enthalpy_of_vaporization(dispatch(node->get_child<0>()), 2, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
892 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
893 dispatch(node->get_child<6>()).num().val());
899 if (!dispatch(node->get_child<1>()).cst()) {
900 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in cost_turton is not a constant");
902 if (!dispatch(node->get_child<2>()).cst()) {
903 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in cost_turton is not a constant");
905 if (!dispatch(node->get_child<3>()).cst()) {
906 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in cost_turton is not a constant");
909 return mc::cost_function(dispatch(node->get_child<0>()), 1, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
910 dispatch(node->get_child<3>()).num().val());
916 return mc::covariance_function(dispatch(node->get_child<0>()), 1);
922 return mc::covariance_function(dispatch(node->get_child<0>()), 2);
928 return mc::covariance_function(dispatch(node->get_child<0>()), 3);
934 return mc::covariance_function(dispatch(node->get_child<0>()), 4);
939 return mc::gaussian_probability_density_function(dispatch(node->get_child<0>()));
944 if (!dispatch(node->get_child<1>()).cst()) {
945 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in nrtl_tau is not a constant");
947 if (!dispatch(node->get_child<2>()).cst()) {
948 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in nrtl_tau is not a constant");
950 if (!dispatch(node->get_child<3>()).cst()) {
951 throw MAiNGOException(
" Error: MaingoEvaluator -- Fourth argument in nrtl_tau is not a constant");
953 if (!dispatch(node->get_child<4>()).cst()) {
954 throw MAiNGOException(
" Error: MaingoEvaluator -- Fifth argument in nrtl_tau is not a constant");
956 return mc::nrtl_tau(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
957 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val());
963 if (!dispatch(node->get_child<1>()).cst()) {
964 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in nrtl_g is not a constant");
966 if (!dispatch(node->get_child<2>()).cst()) {
967 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in nrtl_g is not a constant");
969 if (!dispatch(node->get_child<3>()).cst()) {
970 throw MAiNGOException(
" Error: MaingoEvaluator -- Fourth argument in nrtl_g is not a constant");
972 if (!dispatch(node->get_child<4>()).cst()) {
973 throw MAiNGOException(
" Error: MaingoEvaluator -- Fifth argument in nrtl_g is not a constant");
975 if (!dispatch(node->get_child<5>()).cst()) {
976 throw MAiNGOException(
" Error: MaingoEvaluator -- Sixth argument in nrtl_g is not a constant");
978 return mc::nrtl_G(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
979 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val());
985 if (!dispatch(node->get_child<1>()).cst()) {
986 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in nrtl_gtau is not a constant");
988 if (!dispatch(node->get_child<2>()).cst()) {
989 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in nrtl_gtau is not a constant");
991 if (!dispatch(node->get_child<3>()).cst()) {
992 throw MAiNGOException(
" Error: MaingoEvaluator -- Fourth argument in nrtl_gtau is not a constant");
994 if (!dispatch(node->get_child<4>()).cst()) {
995 throw MAiNGOException(
" Error: MaingoEvaluator -- Fifth argument in nrtl_gtau is not a constant");
997 if (!dispatch(node->get_child<5>()).cst()) {
998 throw MAiNGOException(
" Error: MaingoEvaluator -- Sixth argument in nrtl_gtau is not a constant");
1000 return mc::nrtl_Gtau(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
1001 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val());
1007 if (!dispatch(node->get_child<1>()).cst()) {
1008 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in nrtl_gdtau is not a constant");
1010 if (!dispatch(node->get_child<2>()).cst()) {
1011 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in nrtl_gdtau is not a constant");
1013 if (!dispatch(node->get_child<3>()).cst()) {
1014 throw MAiNGOException(
" Error: MaingoEvaluator -- Fourth argument in nrtl_gdtau is not a constant");
1016 if (!dispatch(node->get_child<4>()).cst()) {
1017 throw MAiNGOException(
" Error: MaingoEvaluator -- Fifth argument in nrtl_gdtau is not a constant");
1019 if (!dispatch(node->get_child<5>()).cst()) {
1020 throw MAiNGOException(
" Error: MaingoEvaluator -- Sixth argument in nrtl_gdtau is not a constant");
1022 return mc::nrtl_Gdtau(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
1023 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val());
1029 if (!dispatch(node->get_child<1>()).cst()) {
1030 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in nrtl_dgtau is not a constant");
1032 if (!dispatch(node->get_child<2>()).cst()) {
1033 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in nrtl_dgtau is not a constant");
1035 if (!dispatch(node->get_child<3>()).cst()) {
1036 throw MAiNGOException(
" Error: MaingoEvaluator -- Fourth argument in nrtl_dgtau is not a constant");
1038 if (!dispatch(node->get_child<4>()).cst()) {
1039 throw MAiNGOException(
" Error: MaingoEvaluator -- Fifth argument in nrtl_dgtau is not a constant");
1041 if (!dispatch(node->get_child<5>()).cst()) {
1042 throw MAiNGOException(
" Error: MaingoEvaluator -- Sixth argument in nrtl_dgtau is not a constant");
1044 return mc::nrtl_dGtau(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
1045 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val());
1051 return mc::euclidean_norm_2d(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()));
1057 return mc::fabs(dispatch(node->get_child<0>()));
1063 return mc::fabsx_times_x(dispatch(node->get_child<0>()));
1069 return mc::xlog(dispatch(node->get_child<0>()));
1075 return mc::cosh(dispatch(node->get_child<0>()));
1081 return mc::sinh(dispatch(node->get_child<0>()));
1087 return mc::tanh(dispatch(node->get_child<0>()));
1093 return mc::coth(dispatch(node->get_child<0>()));
1099 return mc::Op<mc::FFVar>::acosh(dispatch(node->get_child<0>()));
1105 return mc::Op<mc::FFVar>::asinh(dispatch(node->get_child<0>()));
1111 return mc::Op<mc::FFVar>::atanh(dispatch(node->get_child<0>()));
1117 return mc::Op<mc::FFVar>::acoth(dispatch(node->get_child<0>()));
1123 return mc::erf(dispatch(node->get_child<0>()));
1129 return mc::erfc(dispatch(node->get_child<0>()));
1135 return mc::pos(dispatch(node->get_child<0>()));
1141 return mc::neg(dispatch(node->get_child<0>()));
1147 return mc::rlmtd(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()));
1153 return mc::expx_times_y(dispatch(node->get_child<1>()), dispatch(node->get_child<0>()));
1159 return mc::p_sat_ethanol_schroeder(dispatch(node->get_child<0>()));
1165 return mc::rho_vap_sat_ethanol_schroeder(dispatch(node->get_child<0>()));
1171 return mc::rho_liq_sat_ethanol_schroeder(dispatch(node->get_child<0>()));
1177 Var arg1 = dispatch(node->get_child<0>());
1178 Var arg2 = dispatch(node->get_child<1>());
1179 Var arg3 = dispatch(node->get_child<2>());
1180 return mc::min(mc::max(arg1, arg2), mc::min(mc::max(arg2, arg3), mc::max(arg3, arg1)));
1184 template <
typename TType>
1187 auto elements = dispatch(node->template get_child<0>());
1188 _symbols.push_scope();
1190 for (
auto it = elements.begin(); it != elements.end(); ++it) {
1191 _symbols.define(node->name,
new parameter_symbol<TType>(node->name, *it));
1192 result += dispatch(node->template get_child<1>());
1194 _symbols.pop_scope();
1201 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported negation expression");
1209 result.
eq.push_back(dispatch(node->get_child<0>()) - dispatch(node->get_child<1>()));
1216 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported strict inequality expression");
1224 result.
ineq.push_back(dispatch(node->get_child<0>()) - dispatch(node->get_child<1>()));
1231 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported strict inequality expression");
1239 result.
ineq.push_back(dispatch(node->get_child<1>()) - dispatch(node->get_child<0>()));
1246 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported index comparison expression");
1253 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported index comparison expression");
1260 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported index comparison expression");
1267 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported index comparison expression");
1274 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported index comparison expression");
1281 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported disjunction expression");
1288 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported conjunction expression");
1295 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported general logical expression");
1300 template <
typename TType>
1304 auto elements = dispatch(node->template get_child<0>());
1305 _symbols.push_scope();
1306 for (
auto it = elements.begin(); it != elements.end(); ++it) {
1307 _symbols.define(node->name,
new parameter_symbol<TType>(node->name, *it));
1308 auto cons = dispatch(node->template get_child<1>());
1309 result.
eq.insert(result.
eq.end(), cons.eq.begin(), cons.eq.end());
1310 result.
ineq.insert(result.
ineq.end(), cons.ineq.begin(), cons.ineq.end());
1312 _symbols.pop_scope();
symbol_table & _symbols
Definition: MAiNGOevaluator.h:1318
Var operator()(parameter_symbol< real< 0 >> *sym)
Definition: MAiNGOevaluator.h:192
Var operator()(set_min_node< TType > *node)
Definition: MAiNGOevaluator.h:377
const std::unordered_map< std::string, int > & _positions
Definition: MAiNGOevaluator.h:1320
Var operator()(antoine_psat_node *node)
Definition: MAiNGOevaluator.h:623
Var operator()(sum_div_node *node)
Definition: MAiNGOevaluator.h:276
Var operator()(nrtl_gtau_node *node)
Definition: MAiNGOevaluator.h:983
tensor< Var, IDim > operator()(parameter_symbol< real< IDim >> *sym)
Definition: MAiNGOevaluator.h:184
Var operator()(addition_node *node)
Definition: MAiNGOevaluator.h:266
Var operator()(variable_symbol< real< 0 >> *sym)
Definition: MAiNGOevaluator.h:223
Var operator()(nasa9_hig_node *node)
Definition: MAiNGOevaluator.h:737
Var operator()(mid_node *node)
Definition: MAiNGOevaluator.h:1175
ConstraintContainer operator()(expression_symbol< boolean< 0 >> *sym)
Definition: MAiNGOevaluator.h:235
Var operator()(aspen_hig_node *node)
Definition: MAiNGOevaluator.h:707
Var operator()(sum_node< TType > *node)
Definition: MAiNGOevaluator.h:1185
ConstraintContainer operator()(negation_node *node)
Definition: MAiNGOevaluator.h:1199
Var operator()(ale::squash_node *node)
Definition: MAiNGOevaluator.h:526
Var operator()(covar_sqrexp_node *node)
Definition: MAiNGOevaluator.h:931
Var operator()(parameter_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:166
Var operator()(tan_node *node)
Definition: MAiNGOevaluator.h:460
ConstraintContainer operator()(disjunction_node *node)
Definition: MAiNGOevaluator.h:1279
ConstraintContainer operator()(less_node< ale::index< 0 >> *node)
Definition: MAiNGOevaluator.h:1251
Var operator()(multiplication_node *node)
Definition: MAiNGOevaluator.h:326
Var operator()(cosh_node *node)
Definition: MAiNGOevaluator.h:1073
std::vector< Var > eq
Definition: MAiNGOevaluator.h:34
Var operator()(ub_func_node *node)
Definition: MAiNGOevaluator.h:505
ConstraintContainer operator()(greater_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:1229
Var operator()(set_max_node< TType > *node)
Definition: MAiNGOevaluator.h:398
Var operator()(cos_node *node)
Definition: MAiNGOevaluator.h:448
Var operator()(acoth_node *node)
Definition: MAiNGOevaluator.h:1115
Var operator()(cost_turton_node *node)
Definition: MAiNGOevaluator.h:897
ConstraintContainer operator()(greater_equal_node< ale::index< 0 >> *node)
Definition: MAiNGOevaluator.h:1272
Var operator()(xlog_sum_node *node)
Definition: MAiNGOevaluator.h:301
Var operator()(sinh_node *node)
Definition: MAiNGOevaluator.h:1079
Var dispatch(expression< real< 0 >> &expr)
Definition: MAiNGOevaluator.h:67
const std::vector< Var > & _variables
Definition: MAiNGOevaluator.h:1319
tensor< Var, IDim > operator()(entry_node< real< IDim >> *node)
Definition: MAiNGOevaluator.h:242
Var operator()(nrtl_g_node *node)
Definition: MAiNGOevaluator.h:961
Var operator()(ale::af_ei_node *node)
Definition: MAiNGOevaluator.h:547
ConstraintContainer operator()(greater_node< ale::index< 0 >> *node)
Definition: MAiNGOevaluator.h:1265
std::vector< Var > ineq
Definition: MAiNGOevaluator.h:35
Var operator()(bounding_func_node *node)
Definition: MAiNGOevaluator.h:514
Var operator()(abs_node *node)
Definition: MAiNGOevaluator.h:1055
Var operator()(xexpy_node *node)
Definition: MAiNGOevaluator.h:1151
Var operator()(exponentiation_node *node)
Definition: MAiNGOevaluator.h:336
ConstraintContainer operator()(constant_node< boolean< 0 >> *node)
Definition: MAiNGOevaluator.h:149
Var operator()(covar_matern_1_node *node)
Definition: MAiNGOevaluator.h:913
Containter for constraint evaluation.
Definition: MAiNGOevaluator.h:33
set< TType, 0 >::basic_type dispatch(value_node< set< TType, 0 >> *node)
Definition: MAiNGOevaluator.h:91
Var operator()(ale::regnormal_node *node)
Definition: MAiNGOevaluator.h:565
Var operator()(gpdf_node *node)
Definition: MAiNGOevaluator.h:937
Var operator()(nrtl_dtau_node *node)
Definition: MAiNGOevaluator.h:577
tensor< Var, IDim > operator()(parameter_node< real< IDim >> *node)
Definition: MAiNGOevaluator.h:157
Var operator()(schroeder_ethanol_p_node *node)
Definition: MAiNGOevaluator.h:1157
Var operator()(erfc_node *node)
Definition: MAiNGOevaluator.h:1127
Var operator()(expression_symbol< real< 0 >> *sym)
Definition: MAiNGOevaluator.h:229
Var operator()(arh_node *node)
Definition: MAiNGOevaluator.h:487
Var operator()(asinh_node *node)
Definition: MAiNGOevaluator.h:1103
Var operator()(schroeder_ethanol_rhovap_node *node)
Definition: MAiNGOevaluator.h:1163
ConstraintContainer operator()(less_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:1214
mc::FFVar Var
Definition: MAiNGOevaluator.h:27
ConstraintContainer operator()(conjunction_node *node)
Definition: MAiNGOevaluator.h:1286
Var operator()(nrtl_tau_node *node)
Definition: MAiNGOevaluator.h:942
Evaluates ALE expressions to Var.
Definition: MAiNGOevaluator.h:42
Var operator()(watson_dhvap_node *node)
Definition: MAiNGOevaluator.h:847
Var operator()(norm2_node *node)
Definition: MAiNGOevaluator.h:1049
Var operator()(coth_node *node)
Definition: MAiNGOevaluator.h:1091
ConstraintContainer operator()(greater_equal_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:1236
TReturn dispatch(value_node< TType > *node)
Definition: MAiNGOevaluator.h:78
Var operator()(antoine_tsat_node *node)
Definition: MAiNGOevaluator.h:830
ConstraintContainer operator()(parameter_node< boolean< 0 >> *node)
Definition: MAiNGOevaluator.h:176
namespace holding all essentials of MAiNGO
Definition: aleModel.h:25
Var operator()(neg_node *node)
Definition: MAiNGOevaluator.h:1139
Var operator()(lb_func_node *node)
Definition: MAiNGOevaluator.h:496
Var dispatch(value_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:105
Var operator()(inverse_node *node)
Definition: MAiNGOevaluator.h:260
ale::index< IDim >::ref_type dispatch(value_node< ale::index< IDim >> *node)
Definition: MAiNGOevaluator.h:84
ConstraintContainer operator()(less_equal_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:1221
Var operator()(atan_node *node)
Definition: MAiNGOevaluator.h:466
Var operator()(dippr127_hig_node *node)
Definition: MAiNGOevaluator.h:797
Var operator()(xabsx_node *node)
Definition: MAiNGOevaluator.h:1061
Var operator()(dippr106_dhvap_node *node)
Definition: MAiNGOevaluator.h:870
ConstraintContainer dispatch(expression< boolean< 0 >> &expr)
Definition: MAiNGOevaluator.h:72
Var operator()(tanh_node *node)
Definition: MAiNGOevaluator.h:1085
Var operator()(log_node *node)
Definition: MAiNGOevaluator.h:424
Var operator()(schroeder_ethanol_rholiq_node *node)
Definition: MAiNGOevaluator.h:1169
Var operator()(xlogx_node *node)
Definition: MAiNGOevaluator.h:1067
Var dispatch(value_symbol< real< 0 >> *sym)
Definition: MAiNGOevaluator.h:123
mc::FFVar nrtl_tau(const mc::FFVar &T, const std::vector< double > p)
Definition: functionWrapper.h:200
Var operator()(xexpax_node *node)
Definition: MAiNGOevaluator.h:478
Var operator()(covar_matern_3_node *node)
Definition: MAiNGOevaluator.h:919
ConstraintContainer operator()(equal_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:1206
Var operator()(min_node *node)
Definition: MAiNGOevaluator.h:346
Var operator()(lmtd_node *node)
Definition: MAiNGOevaluator.h:472
ConstraintContainer dispatch(value_node< boolean< 0 >> *node)
Definition: MAiNGOevaluator.h:111
Var operator()(sqrt_node *node)
Definition: MAiNGOevaluator.h:430
ConstraintContainer operator()(equal_node< ale::index< 0 >> *node)
Definition: MAiNGOevaluator.h:1244
ConstraintContainer operator()(element_node *node)
Definition: MAiNGOevaluator.h:1293
Var operator()(acosh_node *node)
Definition: MAiNGOevaluator.h:1097
mc::FFVar nrtl_dtau(const mc::FFVar &T, const std::vector< double > p)
Definition: functionWrapper.h:207
Var operator()(atanh_node *node)
Definition: MAiNGOevaluator.h:1109
Var operator()(dippr107_hig_node *node)
Definition: MAiNGOevaluator.h:770
Var operator()(nrtl_dgtau_node *node)
Definition: MAiNGOevaluator.h:1027
Var operator()(rlmtd_node *node)
Definition: MAiNGOevaluator.h:1145
MaingoEvaluator(symbol_table &symbols, const std::vector< Var > &variables, const std::unordered_map< std::string, int > &positions)
Constructor.
Definition: MAiNGOevaluator.h:52
Var operator()(ik_cape_psat_node *node)
Definition: MAiNGOevaluator.h:667
ConstraintContainer operator()(forall_node< TType > *node)
Definition: MAiNGOevaluator.h:1301
Var operator()(covar_matern_5_node *node)
Definition: MAiNGOevaluator.h:925
tensor< Var, IDim > dispatch(value_symbol< real< IDim >> *sym)
Definition: MAiNGOevaluator.h:118
This class defines the exceptions thrown by MAiNGO.
Definition: MAiNGOException.h:35
Var operator()(max_node *node)
Definition: MAiNGOevaluator.h:361
Var operator()(asin_node *node)
Definition: MAiNGOevaluator.h:442
ConstraintContainer operator()(less_equal_node< ale::index< 0 >> *node)
Definition: MAiNGOevaluator.h:1258
Var operator()(nrtl_gdtau_node *node)
Definition: MAiNGOevaluator.h:1005
tensor< Var, IDim > dispatch(value_node< real< IDim >> *node)
Definition: MAiNGOevaluator.h:99
Var operator()(minus_node *node)
Definition: MAiNGOevaluator.h:254
Var operator()(entry_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:248
Var operator()(ale::af_lcb_node *node)
Definition: MAiNGOevaluator.h:538
Var operator()(exp_node *node)
Definition: MAiNGOevaluator.h:418
Var operator()(sin_node *node)
Definition: MAiNGOevaluator.h:436
Var operator()(ale::af_pi_node *node)
Definition: MAiNGOevaluator.h:556
Var operator()(ext_antoine_psat_node *node)
Definition: MAiNGOevaluator.h:593
Var operator()(constant_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:143
tensor< Var, IDim > operator()(constant_node< real< IDim >> *node)
Definition: MAiNGOevaluator.h:135
Var operator()(acos_node *node)
Definition: MAiNGOevaluator.h:454
Var operator()(erf_node *node)
Definition: MAiNGOevaluator.h:1121
Var operator()(wagner_psat_node *node)
Definition: MAiNGOevaluator.h:640
tensor< Var, IDim > operator()(variable_symbol< real< IDim >> *sym)
Definition: MAiNGOevaluator.h:199
Var operator()(pos_node *node)
Definition: MAiNGOevaluator.h:1133