Skip to content

Commit f80a4ff

Browse files
authored
Merge pull request #54 from sandialabs/revert-53-dev-weh
Revert "Merging new capabilities"
2 parents ae9868f + 8768673 commit f80a4ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+245
-7327
lines changed

Diff for: .clang-format

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
BasedOnStyle: Google
33
AlignTrailingComments: 'true'
4-
AllowAllArgumentsOnNextLine: 'true'
5-
AllowAllParametersOfDeclarationOnNextLine: 'true'
4+
AllowAllParametersOfDeclarationOnNextLine: 'false'
65
AlwaysBreakTemplateDeclarations: 'Yes'
76
BreakBeforeBraces: Stroustrup
87
ColumnLimit: 100

Diff for: ChangeLog.md

-11
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@ Here we list changes of Coek. More detailed information
44
about incremental changes can be found in the [commit
55
history](https://github.com/sandialabs/coek/commits).
66

7-
## 1.5.dev
8-
9-
* coek_utils: Python utilities that work with coek
10-
* coek: Added tictoc and DataPortals logic
11-
* coek: Added new template type utilities
12-
* coek: Using std::to_string to standardize coek tests
13-
* poek: Test updates based on standardized coek test outputs
14-
* pycoek: Various API additions to improve pyomo_coek compatibility with pyomo
15-
* pyomo_coek: Various changes to improve compatibility with pyomo
16-
* pyomo_coek: Added tests for compatibility with pyomo
17-
187
## 1.4
198

209
* Added support for multithreaded model creation.

Diff for: lib/CMakeLists.txt

+1-17
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,10 @@ if(${with_python})
2929
# Targets for poek testing
3030
#
3131
if(${with_tests})
32-
list(APPEND lib_test_targets test_poek test_pyomo test_coek_utils)
32+
list(APPEND lib_test_targets "test_poek")
3333
add_custom_target(test_poek
3434
COMMAND ${Python_EXECUTABLE} -m pytest ${CMAKE_CURRENT_SOURCE_DIR}/poek/poek
3535
)
36-
add_custom_target(test_coek_utils
37-
COMMAND ${Python_EXECUTABLE} -m pytest ${CMAKE_CURRENT_SOURCE_DIR}/coek_utils/coek_utils
38-
)
39-
add_custom_target(test_pyomo
40-
COMMAND ${Python_EXECUTABLE} -m pytest ${CMAKE_CURRENT_SOURCE_DIR}/pyomo_coek/pyomo_coek
41-
)
4236
endif()
4337
#
4438
# Targets for poek documentation
@@ -92,16 +86,6 @@ else()
9286
message("Ignoring lib/pyomo_coek")
9387
endif()
9488

95-
message("")
96-
if(${with_python})
97-
message("Configuring lib/coek_utils install")
98-
add_custom_target(pip_install_coek_utils ALL
99-
COMMAND ${Python_EXECUTABLE} -m pip install -e ${CMAKE_CURRENT_SOURCE_DIR}/coek_utils
100-
)
101-
else()
102-
message("Ignoring lib/coek_utils")
103-
endif()
104-
10589
#
10690
# Lib test targets
10791
#

Diff for: lib/coek/coek/CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
SET(sources
55
util/index_vector.cpp
66
util/option_cache.cpp
7-
util/tictoc.cpp
87
ast/base_terms.cpp
98
ast/constraint_terms.cpp
109
ast/value_terms.cpp
@@ -46,7 +45,6 @@ if (CMAKE_CXX_STANDARD GREATER_EQUAL 17)
4645
api/variable_array.cpp
4746
api/constraint_map.cpp
4847
api/subexpression_map.cpp
49-
util/DataPortal.cpp
5048
)
5149
endif()
5250

@@ -230,8 +228,6 @@ install(FILES
230228
util/template_utils.hpp
231229
util/sequence.hpp
232230
util/option_cache.hpp
233-
util/DataPortal.hpp
234-
util/tictoc.hpp
235231
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/coek/util
236232
)
237233
install(FILES

Diff for: lib/coek/coek/ast/visitor_to_list.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ void visit_MonomialTerm(const expr_pointer_t& expr, std::list<std::string>& repr
7070
auto tmp = safe_pointer_cast<MonomialTerm>(expr);
7171
repr.push_back("[");
7272
repr.push_back("*");
73-
repr.push_back(std::to_string(tmp->coef));
73+
{
74+
std::stringstream sstr;
75+
sstr << tmp->coef;
76+
repr.push_back(sstr.str());
77+
}
7478
if (tmp->var->name.size() == 0) {
7579
// WEH - It's hard to test this logic, since the variable index is dynamically generated
7680
// GCOVR_EXCL_START

Diff for: lib/coek/coek/model/writer_lp.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,9 @@ void LPWriter::print_constraint(fmt::ostream& ostr, const Constraint& c, size_t
590590
}
591591
else {
592592
print_repn(ostr, expr, vid);
593-
// CALI_MARK_BEGIN("ELSE");
593+
//CALI_MARK_BEGIN("ELSE");
594594
ostr.print(fmt::format(eq_fmt, lower.value() - tmp));
595-
// CALI_MARK_END("ELSE");
595+
//CALI_MARK_END("ELSE");
596596
}
597597
}
598598

0 commit comments

Comments
 (0)