File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -318,18 +318,11 @@ bool RAMPL::isRunning() const {
318318 :param string solver: The solver that will be used to solve the problem.
319319 :raises Error: If the underlying interpreter is not running.
320320*/
321- void RAMPL::solve (Rcpp::Nullable<std::string> problem = R_NilValue, Rcpp::Nullable<std::string> solver = R_NilValue) {
322- if (problem.isNotNull () && solver.isNotNull ())
323- _impl.solve (problem, solver);
324- else if (problem.isNotNull ())
325- _impl.solve (problem, " " );
326- else if (solver.isNotNull ())
327- _impl.solve (" " , solver);
328- else
329- _impl.solve (" " , " " );
330-
331-
332- // return _impl.solve("", ""); // FIXME: does not print to stdout with R IDE on Windows
321+ void RAMPL::solve (Rcpp::Nullable<std::string> problem, Rcpp::Nullable<std::string> solver) {
322+ std::string cpp_problem = problem.isNotNull () ? problem.getValue () : " " ;
323+ std::string cpp_solver = solver.isNotNull () ? solver.getValue () : " " ;
324+
325+ _impl.solve (cpp_problem, cpp_solver);
333326}
334327
335328
You can’t perform that action at this time.
0 commit comments