File tree 3 files changed +10
-4
lines changed
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ option(Ipopt "Link to IPOPT libraries" ON)
41
41
42
42
option (MP "Link to AMPL MP libraries" OFF )
43
43
44
- option (CoinUtils "Link to CoinUtils libraries" ON )
44
+ option (CoinUtils "Link to CoinUtils libraries" OFF )
45
45
46
46
# Find XLNT (optional)
47
47
option (Xlnt "Link to XLNT libraries" OFF )
@@ -195,7 +195,7 @@ set(THIRDPARTY_INSTALL_PATH ${THIRDPARTY_BASE_PATH})
195
195
196
196
if (NOT WIN32 )
197
197
#CoinUtils
198
- if (CoinUtils)
198
+ if (CoinUtils or MP )
199
199
include (ExternalProject)
200
200
#CoinUtils
201
201
message (STATUS "Enable CoinUtils" )
Original file line number Diff line number Diff line change @@ -26,8 +26,11 @@ using namespace gravity;
26
26
#ifdef USE_MP
27
27
TEST_CASE (" testing readNL() function" ) {
28
28
Model<> M;
29
- string NL_file = string (prj_dir)+" /data_sets/NL/ex4 .nl" ;
29
+ string NL_file = string (prj_dir)+" /data_sets/NL/hvycrash .nl" ;
30
30
int status = M.readNL (NL_file);
31
+ solver<> GRB (M,gurobi);
32
+ double solver_time_start = get_wall_time ();
33
+ GRB.run ();
31
34
CHECK (status==0 );
32
35
CHECK (M.get_nb_vars ()==36 );
33
36
CHECK (M.get_nb_cons ()==30 );
Original file line number Diff line number Diff line change @@ -1046,7 +1046,10 @@ void GurobiProgram::write_NLCstr(const string &fname){
1046
1046
assert (sense==GRB_EQUAL);/* Check what to do with inequalities */
1047
1047
nb_inst = c->get_nb_inst ();
1048
1048
for (size_t i = 0 ; i< nb_inst; i++){
1049
- file << " " << c->get_name ()+" (" +c->_indices ->_keys ->at (i)+" ):\n " ;
1049
+ if (c->_indices )
1050
+ file << " " << c->get_name ()+" (" +c->_indices ->_keys ->at (i)+" ):\n " ;
1051
+ else
1052
+ file << " " << c->get_name ()+" (" +to_string (i)+" ):\n " ;
1050
1053
file << " zero(0) = NL :\n " ;
1051
1054
int parent_id = -1 ;
1052
1055
file << c->getNLexpr (-1 ,parent_id,i);
You can’t perform that action at this time.
0 commit comments