20 #include "symbol_table.hpp" 22 #include "util/evaluator.hpp" 31 using namespace ale::util;
32 using Var = mc::FFVar;
58 symbol_table& symbols,
59 const std::vector<Var>& variables,
60 const std::unordered_map<std::string, int>& positions):
62 _variables(variables),
74 return dispatch(expr.get());
79 return dispatch(expr.get());
82 template <
typename TReturn,
typename TType>
85 throw MAiNGOException(
" Error: MaingoEvaluator -- Used unsupported dispatch");
88 template <
unsigned IDim>
89 typename ale::index<IDim>::ref_type
dispatch(value_node<ale::index<IDim>>* node)
91 evaluator eval(_symbols);
92 return eval.dispatch(node);
95 template <
typename TType>
96 typename set<TType, 0>::basic_type
dispatch(value_node<set<TType, 0>>* node)
98 evaluator eval(_symbols);
99 return eval.dispatch(node);
103 template <
unsigned IDim>
104 tensor<Var, IDim>
dispatch(value_node<real<IDim>>* node)
106 return std::visit(*
this, node->get_variant());
112 return std::visit(*
this, node->get_variant());
118 return std::visit(*
this, node->get_variant());
122 template <
unsigned IDim>
123 tensor<Var, IDim>
dispatch(value_symbol<real<IDim>>* sym)
125 return std::visit(*
this, sym->get_value_variant());
130 return std::visit(*
this, sym->get_value_variant());
139 template <
unsigned IDim>
140 tensor<Var, IDim>
operator()(constant_node<real<IDim>>* node)
142 tensor<Var, IDim> result(node->value.shape());
143 result.ref().assign(node->value);
156 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported general logical expression");
161 template <
unsigned IDim>
162 tensor<Var, IDim>
operator()(parameter_node<real<IDim>>* node)
164 auto sym = _symbols.resolve<real<IDim>>(node->name);
166 throw MAiNGOException(
" Error: MaingoEvaluator -- Symbol " + node->name +
" has unexpected type");
168 return dispatch(sym);
173 auto sym = _symbols.resolve<real<0>>(node->name);
175 throw MAiNGOException(
" Error: MaingoEvaluator -- Symbol " + node->name +
" has unexpected type");
177 return dispatch(sym);
183 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported general logical expression");
188 template <
unsigned IDim>
189 tensor<Var, IDim>
operator()(parameter_symbol<real<IDim>>* sym)
191 tensor<Var, IDim> result(sym->m_value.shape());
192 result.ref().assign(sym->m_value);
203 template <
unsigned IDim>
204 tensor<Var, IDim>
operator()(variable_symbol<real<IDim>>* sym)
206 tensor<Var, IDim> result(sym->shape());
207 size_t indexes[IDim];
208 for (
int i = 0; i < IDim; ++i) {
211 int position = _positions.at(sym->m_name);
212 while (indexes[0] < result.shape(0)) {
213 result[indexes] = _variables[position];
215 for (
int i = IDim - 1; i >= 0; --i) {
216 if (++indexes[i] < sym->shape(i)) {
230 return _variables[_positions.at(sym->m_name)];
236 return dispatch(sym->m_value.get());
242 return dispatch(sym->m_value.get());
246 template <
unsigned IDim>
249 return dispatch(node->template get_child<0>())[dispatch(node->template get_child<1>()) - 1];
255 return dispatch(node->get_child<0>())[dispatch(node->get_child<1>()) - 1];
261 return -dispatch(node->get_child<0>());
267 return 1 / dispatch(node->get_child<0>());
274 for (
auto it = node->children.begin(); it != node->children.end(); ++it) {
275 result += dispatch(it->get());
283 if (node->children.size() % 2 == 0) {
284 throw MAiNGOException(
" Error: MaingoEvaluator -- Called sum_div with even number of arguments");
286 if (node->children.size() < 3) {
287 throw MAiNGOException(
" Error: MaingoEvaluator -- Called sum_div with less than 3 arguments");
289 std::vector<Var> vars;
290 std::vector<double> coeff;
291 for (
auto it = node->children.begin(); it != node->children.end(); ++it) {
292 if (distance(node->children.begin(), it) < (
int)(node->children.size() / 2)) {
293 vars.emplace_back(dispatch(it->get()));
296 if (!dispatch(it->get()).cst()) {
297 throw MAiNGOException(
" MaingoEvaluator -- Error: The " + std::to_string(distance(node->children.begin(), it)) +
"-th coefficient in sum_div is not a constant");
299 coeff.emplace_back(dispatch(it->get()).num().val());
302 return mc::sum_div(vars, coeff);
308 if (!(node->children.size() % 2 == 0)) {
309 throw MAiNGOException(
" Error: MaingoEvaluator -- Called xlog_sum with odd number of arguments");
311 if (node->children.size() < 2) {
312 throw MAiNGOException(
" Error: MaingoEvaluator -- Called xlog_sum with less than arguments");
314 std::vector<Var> vars;
315 std::vector<double> coeff;
316 for (
auto it = node->children.begin(); it != node->children.end(); ++it) {
317 if (distance(node->children.begin(), it) < (
int)(node->children.size() / 2)) {
318 vars.emplace_back(dispatch(it->get()));
321 if (!dispatch(it->get()).cst()) {
322 throw MAiNGOException(
" Error: MaingoEvaluator -- The " + std::to_string(distance(node->children.begin(), it)) +
"-th coefficient in xlog_sum is not a constant");
324 coeff.emplace_back(dispatch(it->get()).num().val());
327 return mc::xlog_sum(vars, coeff);
334 for (
auto it = node->children.begin(); it != node->children.end(); ++it) {
335 result *= dispatch(it->get());
344 for (
auto it = node->children.rbegin(); it != node->children.rend(); ++it) {
345 result = pow(dispatch(it->get()), result);
353 if (node->children.size() == 0) {
354 throw MAiNGOException(
" Error: MaingoEvaluator -- Called min without arguments");
356 auto it = node->children.begin();
357 Var result = dispatch(it->get());
359 for (; it != node->children.end(); ++it) {
360 result = mc::min(dispatch(it->get()), result);
368 if (node->children.size() == 0) {
369 throw MAiNGOException(
" Error: MaingoEvaluator -- Called max without arguments");
371 auto it = node->children.begin();
372 Var result = dispatch(it->get());
374 for (; it != node->children.end(); ++it) {
375 result = mc::max(dispatch(it->get()), result);
381 template <
typename TType>
384 auto elements = dispatch(node->template get_child<0>());
385 _symbols.push_scope();
386 if (elements.begin() == elements.end()) {
387 throw MAiNGOException(
" Error: MaingoEvaluator -- Called set_min with empty set");
389 auto it = elements.begin();
390 _symbols.define(node->name,
new parameter_symbol<TType>(node->name, *it));
391 Var result = dispatch(node->template get_child<1>());
393 for (; it != elements.end(); ++it) {
394 _symbols.define(node->name,
new parameter_symbol<TType>(node->name, *it));
395 result = mc::min(dispatch(node->template get_child<1>()), result);
397 _symbols.pop_scope();
402 template <
typename TType>
405 auto elements = dispatch(node->template get_child<0>());
406 _symbols.push_scope();
407 if (elements.begin() == elements.end()) {
408 throw MAiNGOException(
" Error: MaingoEvaluator -- Called set_max with empty set");
410 auto it = elements.begin();
411 _symbols.define(node->name,
new parameter_symbol<TType>(node->name, *it));
412 Var result = dispatch(node->template get_child<1>());
414 for (; it != elements.end(); ++it) {
415 _symbols.define(node->name,
new parameter_symbol<TType>(node->name, *it));
416 result = mc::max(dispatch(node->template get_child<1>()), result);
418 _symbols.pop_scope();
425 return exp(dispatch(node->get_child<0>()));
431 return log(dispatch(node->get_child<0>()));
437 return sqrt(dispatch(node->get_child<0>()));
443 return sin(dispatch(node->get_child<0>()));
449 return asin(dispatch(node->get_child<0>()));
455 return cos(dispatch(node->get_child<0>()));
461 return acos(dispatch(node->get_child<0>()));
467 return tan(dispatch(node->get_child<0>()));
473 return atan(dispatch(node->get_child<0>()));
479 return mc::lmtd(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()));
485 if (!dispatch(node->get_child<1>()).cst()) {
486 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in xexpax is not a constant");
488 return mc::xexpax(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val());
494 if (!dispatch(node->get_child<1>()).cst()) {
495 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in arh is not a constant");
497 return mc::Op<mc::FFVar>::arh(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val());
503 if (!dispatch(node->get_child<1>()).cst()) {
504 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in lb_func is not a constant");
506 return mc::lb_func(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val());
512 if (!dispatch(node->get_child<1>()).cst()) {
513 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in ub_func is not a constant");
515 return mc::ub_func(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val());
521 if (!dispatch(node->get_child<1>()).cst()) {
522 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in bounding_func is not a constant");
524 if (!dispatch(node->get_child<2>()).cst()) {
525 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in bounding_func is not a constant");
527 return mc::bounding_func(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val());
533 if (!dispatch(node->get_child<1>()).cst()) {
534 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in squash_node is not a constant");
536 if (!dispatch(node->get_child<2>()).cst()) {
537 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in squash_node is not a constant");
539 return mc::squash_node(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val());
544 if (!dispatch(node->get_child<1>()).cst()) {
545 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in regnormal_node is not a constant");
547 if (!dispatch(node->get_child<2>()).cst()) {
548 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in regnormal_node is not a constant");
550 return mc::regnormal(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val());
555 if (!dispatch(node->get_child<1>()).cst()) {
556 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in nrtl_dtau is not a constant");
558 if (!dispatch(node->get_child<2>()).cst()) {
559 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in nrtl_dtau is not a constant");
561 if (!dispatch(node->get_child<3>()).cst()) {
562 throw MAiNGOException(
" Error: MaingoEvaluator -- Fourth argument in nrtl_dtau is not a constant");
564 return mc::nrtl_dtau(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
565 dispatch(node->get_child<3>()).num().val());
571 if (!dispatch(node->get_child<1>()).cst()) {
572 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in ext_antoine_psat is not a constant");
574 if (!dispatch(node->get_child<2>()).cst()) {
575 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in ext_antoine_psat is not a constant");
577 if (!dispatch(node->get_child<3>()).cst()) {
578 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in ext_antoine_psat is not a constant");
580 if (!dispatch(node->get_child<4>()).cst()) {
581 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in ext_antoine_psat is not a constant");
583 if (!dispatch(node->get_child<5>()).cst()) {
584 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in ext_antoine_psat is not a constant");
586 if (!dispatch(node->get_child<6>()).cst()) {
587 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in ext_antoine_psat is not a constant");
589 if (!dispatch(node->get_child<7>()).cst()) {
590 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p7 in ext_antoine_psat is not a constant");
593 return mc::vapor_pressure(dispatch(node->get_child<0>()), 1, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
594 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
595 dispatch(node->get_child<6>()).num().val(), dispatch(node->get_child<7>()).num().val());
601 if (!dispatch(node->get_child<1>()).cst()) {
602 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in antoine_psat is not a constant");
604 if (!dispatch(node->get_child<2>()).cst()) {
605 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in antoine_psat is not a constant");
607 if (!dispatch(node->get_child<3>()).cst()) {
608 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in antoine_psat is not a constant");
611 return mc::vapor_pressure(dispatch(node->get_child<0>()), 2, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
612 dispatch(node->get_child<3>()).num().val());
618 if (!dispatch(node->get_child<1>()).cst()) {
619 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in wagner_psat is not a constant");
621 if (!dispatch(node->get_child<2>()).cst()) {
622 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in wagner_psat is not a constant");
624 if (!dispatch(node->get_child<3>()).cst()) {
625 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in wagner_psat is not a constant");
627 if (!dispatch(node->get_child<4>()).cst()) {
628 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in wagner_psat is not a constant");
630 if (!dispatch(node->get_child<5>()).cst()) {
631 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in wagner_psat is not a constant");
633 if (!dispatch(node->get_child<6>()).cst()) {
634 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in wagner_psat is not a constant");
637 return mc::vapor_pressure(dispatch(node->get_child<0>()), 3, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
638 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
639 dispatch(node->get_child<6>()).num().val());
645 if (!dispatch(node->get_child<1>()).cst()) {
646 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in ik_cape_psat is not a constant");
648 if (!dispatch(node->get_child<2>()).cst()) {
649 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in ik_cape_psat is not a constant");
651 if (!dispatch(node->get_child<3>()).cst()) {
652 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in ik_cape_psat is not a constant");
654 if (!dispatch(node->get_child<4>()).cst()) {
655 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in ik_cape_psat is not a constant");
657 if (!dispatch(node->get_child<5>()).cst()) {
658 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in ik_cape_psat is not a constant");
660 if (!dispatch(node->get_child<6>()).cst()) {
661 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in ik_cape_psat is not a constant");
663 if (!dispatch(node->get_child<7>()).cst()) {
664 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p7 in ik_cape_psat is not a constant");
666 if (!dispatch(node->get_child<8>()).cst()) {
667 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p8 in ik_cape_psat is not a constant");
669 if (!dispatch(node->get_child<9>()).cst()) {
670 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p9 in ik_cape_psat is not a constant");
672 if (!dispatch(node->get_child<10>()).cst()) {
673 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p10 in ik_cape_psat is not a constant");
676 return mc::vapor_pressure(dispatch(node->get_child<0>()), 4, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
677 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
678 dispatch(node->get_child<6>()).num().val(), dispatch(node->get_child<7>()).num().val(), dispatch(node->get_child<8>()).num().val(),
679 dispatch(node->get_child<9>()).num().val(), dispatch(node->get_child<10>()).num().val());
685 if (!dispatch(node->get_child<1>()).cst()) {
686 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in aspen_hig is not a constant");
688 if (!dispatch(node->get_child<2>()).cst()) {
689 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in aspen_hig is not a constant");
691 if (!dispatch(node->get_child<3>()).cst()) {
692 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in aspen_hig is not a constant");
694 if (!dispatch(node->get_child<4>()).cst()) {
695 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in aspen_hig is not a constant");
697 if (!dispatch(node->get_child<5>()).cst()) {
698 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in aspen_hig is not a constant");
700 if (!dispatch(node->get_child<6>()).cst()) {
701 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in aspen_hig is not a constant");
703 if (!dispatch(node->get_child<7>()).cst()) {
704 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p7 in aspen_hig is not a constant");
707 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(),
708 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
709 dispatch(node->get_child<6>()).num().val(), dispatch(node->get_child<7>()).num().val());
715 if (!dispatch(node->get_child<1>()).cst()) {
716 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in nasa9_hig is not a constant");
718 if (!dispatch(node->get_child<2>()).cst()) {
719 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in nasa9_hig is not a constant");
721 if (!dispatch(node->get_child<3>()).cst()) {
722 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in nasa9_hig is not a constant");
724 if (!dispatch(node->get_child<4>()).cst()) {
725 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in nasa9_hig is not a constant");
727 if (!dispatch(node->get_child<5>()).cst()) {
728 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in nasa9_hig is not a constant");
730 if (!dispatch(node->get_child<6>()).cst()) {
731 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in nasa9_hig is not a constant");
733 if (!dispatch(node->get_child<7>()).cst()) {
734 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p7 in nasa9_hig is not a constant");
736 if (!dispatch(node->get_child<8>()).cst()) {
737 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p8 in nasa9_hig is not a constant");
740 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(),
741 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
742 dispatch(node->get_child<6>()).num().val(), dispatch(node->get_child<7>()).num().val(), dispatch(node->get_child<8>()).num().val());
748 if (!dispatch(node->get_child<1>()).cst()) {
749 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in dippr107_hig is not a constant");
751 if (!dispatch(node->get_child<2>()).cst()) {
752 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in dippr107_hig is not a constant");
754 if (!dispatch(node->get_child<3>()).cst()) {
755 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in dippr107_hig is not a constant");
757 if (!dispatch(node->get_child<4>()).cst()) {
758 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in dippr107_hig is not a constant");
760 if (!dispatch(node->get_child<5>()).cst()) {
761 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in dippr107_hig is not a constant");
763 if (!dispatch(node->get_child<6>()).cst()) {
764 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in dippr107_hig is not a constant");
767 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(),
768 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
769 dispatch(node->get_child<6>()).num().val());
775 if (!dispatch(node->get_child<1>()).cst()) {
776 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in dippr127_hig is not a constant");
778 if (!dispatch(node->get_child<2>()).cst()) {
779 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in dippr127_hig is not a constant");
781 if (!dispatch(node->get_child<3>()).cst()) {
782 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in dippr127_hig is not a constant");
784 if (!dispatch(node->get_child<4>()).cst()) {
785 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in dippr127_hig is not a constant");
787 if (!dispatch(node->get_child<5>()).cst()) {
788 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in dippr127_hig is not a constant");
790 if (!dispatch(node->get_child<6>()).cst()) {
791 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in dippr127_hig is not a constant");
793 if (!dispatch(node->get_child<7>()).cst()) {
794 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p7 in dippr127_hig is not a constant");
796 if (!dispatch(node->get_child<8>()).cst()) {
797 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p8 in dippr127_hig is not a constant");
800 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(),
801 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
802 dispatch(node->get_child<6>()).num().val(), dispatch(node->get_child<7>()).num().val(), dispatch(node->get_child<8>()).num().val());
808 if (!dispatch(node->get_child<1>()).cst()) {
809 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in antoine_tsat is not a constant");
811 if (!dispatch(node->get_child<2>()).cst()) {
812 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in antoine_tsat is not a constant");
814 if (!dispatch(node->get_child<3>()).cst()) {
815 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in antoine_tsat is not a constant");
818 return mc::saturation_temperature(dispatch(node->get_child<0>()), 2, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
819 dispatch(node->get_child<3>()).num().val());
825 if (!dispatch(node->get_child<1>()).cst()) {
826 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in watson_dhvap is not a constant");
828 if (!dispatch(node->get_child<2>()).cst()) {
829 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in watson_dhvap is not a constant");
831 if (!dispatch(node->get_child<3>()).cst()) {
832 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in watson_dhvap is not a constant");
834 if (!dispatch(node->get_child<4>()).cst()) {
835 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in watson_dhvap is not a constant");
837 if (!dispatch(node->get_child<5>()).cst()) {
838 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in watson_dhvap is not a constant");
841 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(),
842 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val());
848 if (!dispatch(node->get_child<1>()).cst()) {
849 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in dippr106_dhvap is not a constant");
851 if (!dispatch(node->get_child<2>()).cst()) {
852 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in dippr106_dhvap is not a constant");
854 if (!dispatch(node->get_child<3>()).cst()) {
855 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in dippr106_dhvap is not a constant");
857 if (!dispatch(node->get_child<4>()).cst()) {
858 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p4 in dippr106_dhvap is not a constant");
860 if (!dispatch(node->get_child<5>()).cst()) {
861 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p5 in dippr106_dhvap is not a constant");
863 if (!dispatch(node->get_child<6>()).cst()) {
864 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p6 in dippr106_dhvap is not a constant");
867 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(),
868 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val(),
869 dispatch(node->get_child<6>()).num().val());
875 if (!dispatch(node->get_child<1>()).cst()) {
876 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p1 in cost_turton is not a constant");
878 if (!dispatch(node->get_child<2>()).cst()) {
879 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p2 in cost_turton is not a constant");
881 if (!dispatch(node->get_child<3>()).cst()) {
882 throw MAiNGOException(
" Error: MaingoEvaluator -- Parameter p3 in cost_turton is not a constant");
885 return mc::cost_function(dispatch(node->get_child<0>()), 1, dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
886 dispatch(node->get_child<3>()).num().val());
892 return mc::covariance_function(dispatch(node->get_child<0>()), 1);
898 return mc::covariance_function(dispatch(node->get_child<0>()), 2);
904 return mc::covariance_function(dispatch(node->get_child<0>()), 3);
910 return mc::covariance_function(dispatch(node->get_child<0>()), 4);
915 return mc::gaussian_probability_density_function(dispatch(node->get_child<0>()));
920 if (!dispatch(node->get_child<1>()).cst()) {
921 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in nrtl_tau is not a constant");
923 if (!dispatch(node->get_child<2>()).cst()) {
924 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in nrtl_tau is not a constant");
926 if (!dispatch(node->get_child<3>()).cst()) {
927 throw MAiNGOException(
" Error: MaingoEvaluator -- Fourth argument in nrtl_tau is not a constant");
929 if (!dispatch(node->get_child<4>()).cst()) {
930 throw MAiNGOException(
" Error: MaingoEvaluator -- Fifth argument in nrtl_tau is not a constant");
932 return mc::nrtl_tau(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
933 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val());
939 if (!dispatch(node->get_child<1>()).cst()) {
940 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in nrtl_g is not a constant");
942 if (!dispatch(node->get_child<2>()).cst()) {
943 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in nrtl_g is not a constant");
945 if (!dispatch(node->get_child<3>()).cst()) {
946 throw MAiNGOException(
" Error: MaingoEvaluator -- Fourth argument in nrtl_g is not a constant");
948 if (!dispatch(node->get_child<4>()).cst()) {
949 throw MAiNGOException(
" Error: MaingoEvaluator -- Fifth argument in nrtl_g is not a constant");
951 if (!dispatch(node->get_child<5>()).cst()) {
952 throw MAiNGOException(
" Error: MaingoEvaluator -- Sixth argument in nrtl_g is not a constant");
954 return mc::nrtl_G(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
955 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val());
961 if (!dispatch(node->get_child<1>()).cst()) {
962 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in nrtl_gtau is not a constant");
964 if (!dispatch(node->get_child<2>()).cst()) {
965 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in nrtl_gtau is not a constant");
967 if (!dispatch(node->get_child<3>()).cst()) {
968 throw MAiNGOException(
" Error: MaingoEvaluator -- Fourth argument in nrtl_gtau is not a constant");
970 if (!dispatch(node->get_child<4>()).cst()) {
971 throw MAiNGOException(
" Error: MaingoEvaluator -- Fifth argument in nrtl_gtau is not a constant");
973 if (!dispatch(node->get_child<5>()).cst()) {
974 throw MAiNGOException(
" Error: MaingoEvaluator -- Sixth argument in nrtl_gtau is not a constant");
976 return mc::nrtl_Gtau(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
977 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val());
983 if (!dispatch(node->get_child<1>()).cst()) {
984 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in nrtl_gdtau is not a constant");
986 if (!dispatch(node->get_child<2>()).cst()) {
987 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in nrtl_gdtau is not a constant");
989 if (!dispatch(node->get_child<3>()).cst()) {
990 throw MAiNGOException(
" Error: MaingoEvaluator -- Fourth argument in nrtl_gdtau is not a constant");
992 if (!dispatch(node->get_child<4>()).cst()) {
993 throw MAiNGOException(
" Error: MaingoEvaluator -- Fifth argument in nrtl_gdtau is not a constant");
995 if (!dispatch(node->get_child<5>()).cst()) {
996 throw MAiNGOException(
" Error: MaingoEvaluator -- Sixth argument in nrtl_gdtau is not a constant");
998 return mc::nrtl_Gdtau(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
999 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val());
1005 if (!dispatch(node->get_child<1>()).cst()) {
1006 throw MAiNGOException(
" Error: MaingoEvaluator -- Second argument in nrtl_dgtau is not a constant");
1008 if (!dispatch(node->get_child<2>()).cst()) {
1009 throw MAiNGOException(
" Error: MaingoEvaluator -- Third argument in nrtl_dgtau is not a constant");
1011 if (!dispatch(node->get_child<3>()).cst()) {
1012 throw MAiNGOException(
" Error: MaingoEvaluator -- Fourth argument in nrtl_dgtau is not a constant");
1014 if (!dispatch(node->get_child<4>()).cst()) {
1015 throw MAiNGOException(
" Error: MaingoEvaluator -- Fifth argument in nrtl_dgtau is not a constant");
1017 if (!dispatch(node->get_child<5>()).cst()) {
1018 throw MAiNGOException(
" Error: MaingoEvaluator -- Sixth argument in nrtl_dgtau is not a constant");
1020 return mc::nrtl_dGtau(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()).num().val(), dispatch(node->get_child<2>()).num().val(),
1021 dispatch(node->get_child<3>()).num().val(), dispatch(node->get_child<4>()).num().val(), dispatch(node->get_child<5>()).num().val());
1027 return mc::euclidean_norm_2d(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()));
1033 return mc::fabs(dispatch(node->get_child<0>()));
1039 return mc::fabsx_times_x(dispatch(node->get_child<0>()));
1045 return mc::xlog(dispatch(node->get_child<0>()));
1051 return mc::cosh(dispatch(node->get_child<0>()));
1057 return mc::sinh(dispatch(node->get_child<0>()));
1063 return mc::tanh(dispatch(node->get_child<0>()));
1069 return mc::coth(dispatch(node->get_child<0>()));
1075 return mc::Op<mc::FFVar>::acosh(dispatch(node->get_child<0>()));
1081 return mc::Op<mc::FFVar>::asinh(dispatch(node->get_child<0>()));
1087 return mc::Op<mc::FFVar>::atanh(dispatch(node->get_child<0>()));
1093 return mc::Op<mc::FFVar>::acoth(dispatch(node->get_child<0>()));
1099 return mc::erf(dispatch(node->get_child<0>()));
1105 return mc::erfc(dispatch(node->get_child<0>()));
1111 return mc::pos(dispatch(node->get_child<0>()));
1117 return mc::neg(dispatch(node->get_child<0>()));
1123 return mc::rlmtd(dispatch(node->get_child<0>()), dispatch(node->get_child<1>()));
1129 return mc::expx_times_y(dispatch(node->get_child<1>()), dispatch(node->get_child<0>()));
1135 return mc::p_sat_ethanol_schroeder(dispatch(node->get_child<0>()));
1141 return mc::rho_vap_sat_ethanol_schroeder(dispatch(node->get_child<0>()));
1147 return mc::rho_liq_sat_ethanol_schroeder(dispatch(node->get_child<0>()));
1153 Var arg1 = dispatch(node->get_child<0>());
1154 Var arg2 = dispatch(node->get_child<1>());
1155 Var arg3 = dispatch(node->get_child<2>());
1156 return mc::min(mc::max(arg1, arg2), mc::min(mc::max(arg2, arg3), mc::max(arg3, arg1)));
1160 template <
typename TType>
1163 auto elements = dispatch(node->template get_child<0>());
1164 _symbols.push_scope();
1166 for (
auto it = elements.begin(); it != elements.end(); ++it) {
1167 _symbols.define(node->name,
new parameter_symbol<TType>(node->name, *it));
1168 result += dispatch(node->template get_child<1>());
1170 _symbols.pop_scope();
1177 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported negation expression");
1185 result.
eq.push_back(dispatch(node->get_child<0>()) - dispatch(node->get_child<1>()));
1192 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported strict inequality expression");
1200 result.
ineq.push_back(dispatch(node->get_child<0>()) - dispatch(node->get_child<1>()));
1207 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported strict inequality expression");
1215 result.
ineq.push_back(dispatch(node->get_child<1>()) - dispatch(node->get_child<0>()));
1222 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported index comparison expression");
1229 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported index comparison expression");
1236 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported index comparison expression");
1243 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported index comparison expression");
1250 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported index comparison expression");
1257 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported disjunction expression");
1264 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported conjunction expression");
1271 throw MAiNGOException(
" Error: MaingoEvaluator -- Evaluated unsupported general logical expression");
1276 template <
typename TType>
1280 auto elements = dispatch(node->template get_child<0>());
1281 _symbols.push_scope();
1282 for (
auto it = elements.begin(); it != elements.end(); ++it) {
1283 _symbols.define(node->name,
new parameter_symbol<TType>(node->name, *it));
1284 auto cons = dispatch(node->template get_child<1>());
1285 result.
eq.insert(result.
eq.end(), cons.eq.begin(), cons.eq.end());
1286 result.
ineq.insert(result.
ineq.end(), cons.ineq.begin(), cons.ineq.end());
1288 _symbols.pop_scope();
symbol_table & _symbols
Definition: MAiNGOevaluator.h:1294
Var operator()(parameter_symbol< real< 0 >> *sym)
Definition: MAiNGOevaluator.h:197
Var operator()(set_min_node< TType > *node)
Definition: MAiNGOevaluator.h:382
const std::unordered_map< std::string, int > & _positions
Definition: MAiNGOevaluator.h:1296
Var operator()(antoine_psat_node *node)
Definition: MAiNGOevaluator.h:599
Var operator()(sum_div_node *node)
Definition: MAiNGOevaluator.h:281
Var operator()(nrtl_gtau_node *node)
Definition: MAiNGOevaluator.h:959
tensor< Var, IDim > operator()(parameter_symbol< real< IDim >> *sym)
Definition: MAiNGOevaluator.h:189
Var operator()(addition_node *node)
Definition: MAiNGOevaluator.h:271
Var operator()(variable_symbol< real< 0 >> *sym)
Definition: MAiNGOevaluator.h:228
Var operator()(nasa9_hig_node *node)
Definition: MAiNGOevaluator.h:713
Var operator()(mid_node *node)
Definition: MAiNGOevaluator.h:1151
ConstraintContainer operator()(expression_symbol< boolean< 0 >> *sym)
Definition: MAiNGOevaluator.h:240
Var operator()(aspen_hig_node *node)
Definition: MAiNGOevaluator.h:683
Var operator()(sum_node< TType > *node)
Definition: MAiNGOevaluator.h:1161
ConstraintContainer operator()(negation_node *node)
Definition: MAiNGOevaluator.h:1175
Var operator()(ale::squash_node *node)
Definition: MAiNGOevaluator.h:531
Var operator()(covar_sqrexp_node *node)
Definition: MAiNGOevaluator.h:907
Var operator()(parameter_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:171
Var operator()(tan_node *node)
Definition: MAiNGOevaluator.h:465
ConstraintContainer operator()(disjunction_node *node)
Definition: MAiNGOevaluator.h:1255
ConstraintContainer operator()(less_node< ale::index< 0 >> *node)
Definition: MAiNGOevaluator.h:1227
Var operator()(multiplication_node *node)
Definition: MAiNGOevaluator.h:331
Var operator()(cosh_node *node)
Definition: MAiNGOevaluator.h:1049
std::vector< Var > eq
Definition: MAiNGOevaluator.h:39
Var operator()(ub_func_node *node)
Definition: MAiNGOevaluator.h:510
ConstraintContainer operator()(greater_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:1205
Var operator()(set_max_node< TType > *node)
Definition: MAiNGOevaluator.h:403
Var operator()(cos_node *node)
Definition: MAiNGOevaluator.h:453
Var operator()(acoth_node *node)
Definition: MAiNGOevaluator.h:1091
Var operator()(cost_turton_node *node)
Definition: MAiNGOevaluator.h:873
ConstraintContainer operator()(greater_equal_node< ale::index< 0 >> *node)
Definition: MAiNGOevaluator.h:1248
Var operator()(xlog_sum_node *node)
Definition: MAiNGOevaluator.h:306
Var operator()(sinh_node *node)
Definition: MAiNGOevaluator.h:1055
Var dispatch(expression< real< 0 >> &expr)
Definition: MAiNGOevaluator.h:72
const std::vector< Var > & _variables
Definition: MAiNGOevaluator.h:1295
tensor< Var, IDim > operator()(entry_node< real< IDim >> *node)
Definition: MAiNGOevaluator.h:247
Var operator()(nrtl_g_node *node)
Definition: MAiNGOevaluator.h:937
ConstraintContainer operator()(greater_node< ale::index< 0 >> *node)
Definition: MAiNGOevaluator.h:1241
std::vector< Var > ineq
Definition: MAiNGOevaluator.h:40
Var operator()(bounding_func_node *node)
Definition: MAiNGOevaluator.h:519
Var operator()(abs_node *node)
Definition: MAiNGOevaluator.h:1031
Var operator()(xexpy_node *node)
Definition: MAiNGOevaluator.h:1127
Var operator()(exponentiation_node *node)
Definition: MAiNGOevaluator.h:341
ConstraintContainer operator()(constant_node< boolean< 0 >> *node)
Definition: MAiNGOevaluator.h:154
Var operator()(covar_matern_1_node *node)
Definition: MAiNGOevaluator.h:889
Containter for constraint evaluation.
Definition: MAiNGOevaluator.h:38
set< TType, 0 >::basic_type dispatch(value_node< set< TType, 0 >> *node)
Definition: MAiNGOevaluator.h:96
Var operator()(ale::regnormal_node *node)
Definition: MAiNGOevaluator.h:542
Var operator()(gpdf_node *node)
Definition: MAiNGOevaluator.h:913
Var operator()(nrtl_dtau_node *node)
Definition: MAiNGOevaluator.h:553
tensor< Var, IDim > operator()(parameter_node< real< IDim >> *node)
Definition: MAiNGOevaluator.h:162
Var operator()(schroeder_ethanol_p_node *node)
Definition: MAiNGOevaluator.h:1133
Var operator()(erfc_node *node)
Definition: MAiNGOevaluator.h:1103
Var operator()(expression_symbol< real< 0 >> *sym)
Definition: MAiNGOevaluator.h:234
Var operator()(arh_node *node)
Definition: MAiNGOevaluator.h:492
Var operator()(asinh_node *node)
Definition: MAiNGOevaluator.h:1079
Var operator()(schroeder_ethanol_rhovap_node *node)
Definition: MAiNGOevaluator.h:1139
ConstraintContainer operator()(less_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:1190
mc::FFVar Var
Definition: MAiNGOevaluator.h:32
ConstraintContainer operator()(conjunction_node *node)
Definition: MAiNGOevaluator.h:1262
Var operator()(nrtl_tau_node *node)
Definition: MAiNGOevaluator.h:918
Evaluates ALE expressions to Var.
Definition: MAiNGOevaluator.h:47
Var operator()(watson_dhvap_node *node)
Definition: MAiNGOevaluator.h:823
Var operator()(norm2_node *node)
Definition: MAiNGOevaluator.h:1025
Var operator()(coth_node *node)
Definition: MAiNGOevaluator.h:1067
ConstraintContainer operator()(greater_equal_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:1212
TReturn dispatch(value_node< TType > *node)
Definition: MAiNGOevaluator.h:83
Var operator()(antoine_tsat_node *node)
Definition: MAiNGOevaluator.h:806
ConstraintContainer operator()(parameter_node< boolean< 0 >> *node)
Definition: MAiNGOevaluator.h:181
namespace holding all essentials of MAiNGO
Definition: aleModel.h:31
Var operator()(neg_node *node)
Definition: MAiNGOevaluator.h:1115
Var operator()(lb_func_node *node)
Definition: MAiNGOevaluator.h:501
Var dispatch(value_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:110
Var operator()(inverse_node *node)
Definition: MAiNGOevaluator.h:265
ale::index< IDim >::ref_type dispatch(value_node< ale::index< IDim >> *node)
Definition: MAiNGOevaluator.h:89
ConstraintContainer operator()(less_equal_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:1197
Var operator()(atan_node *node)
Definition: MAiNGOevaluator.h:471
Var operator()(dippr127_hig_node *node)
Definition: MAiNGOevaluator.h:773
Var operator()(xabsx_node *node)
Definition: MAiNGOevaluator.h:1037
Var operator()(dippr106_dhvap_node *node)
Definition: MAiNGOevaluator.h:846
ConstraintContainer dispatch(expression< boolean< 0 >> &expr)
Definition: MAiNGOevaluator.h:77
Var operator()(tanh_node *node)
Definition: MAiNGOevaluator.h:1061
Var operator()(log_node *node)
Definition: MAiNGOevaluator.h:429
Var operator()(schroeder_ethanol_rholiq_node *node)
Definition: MAiNGOevaluator.h:1145
Var operator()(xlogx_node *node)
Definition: MAiNGOevaluator.h:1043
Var dispatch(value_symbol< real< 0 >> *sym)
Definition: MAiNGOevaluator.h:128
mc::FFVar nrtl_tau(const mc::FFVar &T, const std::vector< double > p)
Definition: functionWrapper.h:206
Var operator()(xexpax_node *node)
Definition: MAiNGOevaluator.h:483
Var operator()(covar_matern_3_node *node)
Definition: MAiNGOevaluator.h:895
ConstraintContainer operator()(equal_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:1182
Var operator()(min_node *node)
Definition: MAiNGOevaluator.h:351
Var operator()(lmtd_node *node)
Definition: MAiNGOevaluator.h:477
ConstraintContainer dispatch(value_node< boolean< 0 >> *node)
Definition: MAiNGOevaluator.h:116
Var operator()(sqrt_node *node)
Definition: MAiNGOevaluator.h:435
ConstraintContainer operator()(equal_node< ale::index< 0 >> *node)
Definition: MAiNGOevaluator.h:1220
ConstraintContainer operator()(element_node *node)
Definition: MAiNGOevaluator.h:1269
Var operator()(acosh_node *node)
Definition: MAiNGOevaluator.h:1073
mc::FFVar nrtl_dtau(const mc::FFVar &T, const std::vector< double > p)
Definition: functionWrapper.h:213
Var operator()(atanh_node *node)
Definition: MAiNGOevaluator.h:1085
Var operator()(dippr107_hig_node *node)
Definition: MAiNGOevaluator.h:746
Var operator()(nrtl_dgtau_node *node)
Definition: MAiNGOevaluator.h:1003
Var operator()(rlmtd_node *node)
Definition: MAiNGOevaluator.h:1121
MaingoEvaluator(symbol_table &symbols, const std::vector< Var > &variables, const std::unordered_map< std::string, int > &positions)
Constructor.
Definition: MAiNGOevaluator.h:57
Var operator()(ik_cape_psat_node *node)
Definition: MAiNGOevaluator.h:643
ConstraintContainer operator()(forall_node< TType > *node)
Definition: MAiNGOevaluator.h:1277
Var operator()(covar_matern_5_node *node)
Definition: MAiNGOevaluator.h:901
tensor< Var, IDim > dispatch(value_symbol< real< IDim >> *sym)
Definition: MAiNGOevaluator.h:123
This class defines the exceptions thrown by MAiNGO.
Definition: exceptions.h:39
Var operator()(max_node *node)
Definition: MAiNGOevaluator.h:366
Var operator()(asin_node *node)
Definition: MAiNGOevaluator.h:447
ConstraintContainer operator()(less_equal_node< ale::index< 0 >> *node)
Definition: MAiNGOevaluator.h:1234
Var operator()(nrtl_gdtau_node *node)
Definition: MAiNGOevaluator.h:981
tensor< Var, IDim > dispatch(value_node< real< IDim >> *node)
Definition: MAiNGOevaluator.h:104
Var operator()(minus_node *node)
Definition: MAiNGOevaluator.h:259
Var operator()(entry_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:253
Var operator()(exp_node *node)
Definition: MAiNGOevaluator.h:423
Var operator()(sin_node *node)
Definition: MAiNGOevaluator.h:441
Var operator()(ext_antoine_psat_node *node)
Definition: MAiNGOevaluator.h:569
Var operator()(constant_node< real< 0 >> *node)
Definition: MAiNGOevaluator.h:148
tensor< Var, IDim > operator()(constant_node< real< IDim >> *node)
Definition: MAiNGOevaluator.h:140
Var operator()(acos_node *node)
Definition: MAiNGOevaluator.h:459
Var operator()(erf_node *node)
Definition: MAiNGOevaluator.h:1097
Var operator()(wagner_psat_node *node)
Definition: MAiNGOevaluator.h:616
tensor< Var, IDim > operator()(variable_symbol< real< IDim >> *sym)
Definition: MAiNGOevaluator.h:204
Var operator()(pos_node *node)
Definition: MAiNGOevaluator.h:1109