/[ascend]/trunk/runqrslv.c
ViewVC logotype

Diff of /trunk/runqrslv.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2870 by jpye, Thu Mar 26 02:56:07 2015 UTC revision 2871 by jpye, Thu Mar 26 03:13:21 2015 UTC
# Line 101  int main(int argc, char *argv[]){ Line 101  int main(int argc, char *argv[]){
101      assert(0 == Asc_PutEnv(ASC_ENV_SOLVERS "=solvers/qrslv"));      assert(0 == Asc_PutEnv(ASC_ENV_SOLVERS "=solvers/qrslv"));
102      /* read back and display the ASCENDLIBRARY setting */      /* read back and display the ASCENDLIBRARY setting */
103      char *lib = Asc_GetEnv(ASC_ENV_LIBRARY);      char *lib = Asc_GetEnv(ASC_ENV_LIBRARY);
104      CONSOLE_DEBUG("%s = %s\n",ASC_ENV_LIBRARY,lib);      CONSOLE_DEBUG("%s = %s",ASC_ENV_LIBRARY,lib);
105      ASC_FREE(lib);      ASC_FREE(lib);
106    
107      /* load the QRSlv solver, presumably from the ASCENDSOLVERS path */      /* load the QRSlv solver, presumably from the ASCENDSOLVERS path */
# Line 138  int main(int argc, char *argv[]){ Line 138  int main(int argc, char *argv[]){
138      assert(sys != NULL);      assert(sys != NULL);
139    
140      /* assign the solver to the system */      /* assign the solver to the system */
141        CONSOLE_DEBUG("Assigning solver");
142      assert(slv_select_solver(sys,qrslv_index));      assert(slv_select_solver(sys,qrslv_index));
143      CONSOLE_DEBUG("Assigned solver '%s'...",slv_solver_name(slv_get_selected_solver(sys)));      CONSOLE_DEBUG("Assigned solver '%s'...",slv_solver_name(slv_get_selected_solver(sys)));
144    
145      /* presolve, check it's ready, then solve */      /* presolve, check it's ready, then solve */
146        CONSOLE_DEBUG("Presolve...");
147      assert(0 == slv_presolve(sys));      assert(0 == slv_presolve(sys));
148      slv_status_t status1;      slv_status_t status1;
149      slv_get_status(sys, &status1);      slv_get_status(sys, &status1);
150      assert(status1.ready_to_solve);      assert(status1.ready_to_solve);
151        CONSOLE_DEBUG("Solve...");
152      slv_solve(sys);      slv_solve(sys);
153      /* check that solver status was 'ok' */      /* check that solver status was 'ok' */
154      slv_get_status(sys, &status1);      slv_get_status(sys, &status1);

Legend:
Removed from v.2870  
changed lines
  Added in v.2871

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22