Skip to content

Commit

Permalink
running grb_wrks on rocky
Browse files Browse the repository at this point in the history
  • Loading branch information
hhijazi committed Apr 16, 2024
1 parent 12a902f commit 65b735f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/Optimization/NonLinear/Power/ACOPF/ACOPF_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,12 @@ int main (int argc, char * argv[])
// Thermal_Limit_to *= 1e-3;
ACOPF.add(Thermal_Limit_to.in(arcs) <= 0);
ACOPF.set_name(grid._name);
ACOPF.print();
// ACOPF.print();
// ACOPF.initialize_zero();
solver<> OPF(ACOPF,gurobi);
double solver_time_start = get_wall_time();
auto f = sin(2.5*theta) + v;
f.print();
// f.print();
OPF.run(output=5, tol = 1e-6);
double solver_time_end = get_wall_time();
double total_time_end = get_wall_time();
Expand Down
4 changes: 2 additions & 2 deletions src/GurobiProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ void GurobiProgram::write_NLCstr(const string &fname){
ofstream file(fname, std::ios::app);
if (!file.is_open()) {
cerr << "Failed to open file for appending nonlinear constraints.\n";
return 1;
return;
}
// file << " zero = 0\n";
file << " General Constraints\n";
Expand Down Expand Up @@ -1058,7 +1058,7 @@ void GurobiProgram::write_NLCstr(const string &fname){
// Optional: Check if writing was successful
if (!file) {
cerr << "Failed to write to file.\n";
return 1;
return;
}

file.close();
Expand Down

0 comments on commit 65b735f

Please sign in to comment.