Skip to content

Commit

Permalink
Fixing ifdefs for compact terms
Browse files Browse the repository at this point in the history
  • Loading branch information
whart222 committed May 7, 2024
1 parent 130ab39 commit 94eb2ba
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/coek/coek/ast/visitor_to_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void visit_expression(const expr_pointer_t& expr, std::list<std::string>& repr)
VISIT_CASE(ParameterTerm);
VISIT_CASE(IndexParameterTerm);
VISIT_CASE(VariableTerm);
#if __cpp_lib_variant
#ifdef COEK_WITH_COMPACT_MODEL
VISIT_CASE(VariableRefTerm);
VISIT_CASE(ParameterRefTerm);
#endif
Expand Down
2 changes: 1 addition & 1 deletion lib/coek/coek/ast/visitor_write_expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ void visit_expression(const expr_pointer_t& expr, std::ostream& ostr)
VISIT_CASE(ParameterTerm);
VISIT_CASE(IndexParameterTerm);
VISIT_CASE(VariableTerm);
#if __cpp_lib_variant
#ifdef COEK_WITH_COMPACT_MODEL
VISIT_CASE(ParameterRefTerm);
VISIT_CASE(VariableRefTerm);
#endif
Expand Down
2 changes: 0 additions & 2 deletions lib/coek/coek/compact/visitor_exprtemplate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,8 @@ expr_pointer_t visit_expression(const expr_pointer_t& expr)
// VISIT_CASE(ParameterTerm);
VISIT_CASE(IndexParameterTerm);
// VISIT_CASE(VariableTerm);
#ifdef COEK_WITH_COMPACT_MODEL
VISIT_CASE(VariableRefTerm);
VISIT_CASE(ParameterRefTerm);
#endif
// VISIT_CASE(MonomialTerm);
VISIT_CASE(InequalityTerm);
VISIT_CASE(EqualityTerm);
Expand Down
2 changes: 1 addition & 1 deletion lib/coek/coek/solvers/gurobi/gurobi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ void GurobiSolver::post_solve()
std::shared_ptr<SolverResults> GurobiSolver::solve(CompactModel& compact_model)
{
pre_solve();
results->model_name = compact_model.name;
results->model_name = compact_model.name();

// Add Gurobi variables
size_t nv = 0;
Expand Down

0 comments on commit 94eb2ba

Please sign in to comment.