Changeset 20780
- Timestamp:
- 2014-05-23T09:52:40+02:00 (10 years ago)
- Location:
- trunk/SimulationRuntime/c
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SimulationRuntime/c/optimization/DataManagement/MoveData.c
r20645 r20780 50 50 * author: Vitalij Ruge 51 51 */ 52 int pickUpModelData(DATA* data, SOLVER_INFO* solverInfo){ 52 int pickUpModelData(DATA* data, SOLVER_INFO* solverInfo) 53 { 53 54 const int nReal = data->modelData.nVariablesReal; 54 55 int i, j; -
trunk/SimulationRuntime/c/simulation/simulation_input_xml.cpp
r19410 r20780 398 398 read_value(mi.md["OPENMODELICAHOME"], &simulationInfo->OPENMODELICAHOME); 399 399 infoStreamPrint(LOG_SIMULATION, 0, "OPENMODELICAHOME: %s", simulationInfo->OPENMODELICAHOME); 400 if (ACTIVE_STREAM(LOG_SIMULATION))messageClose(LOG_SIMULATION);400 messageClose(LOG_SIMULATION); 401 401 402 402 modelica_integer nxchk, nychk, npchk; … … 428 428 || nystrchk != modelData->nVariablesString) 429 429 { 430 if (ACTIVE_WARNING_STREAM(LOG_SIMULATION)) { 430 if (ACTIVE_WARNING_STREAM(LOG_SIMULATION)) 431 { 431 432 warningStreamPrint(LOG_SIMULATION, 1, "Error, input data file does not match model."); 432 433 warningStreamPrint(LOG_SIMULATION, 0, "nx in setup file: %ld from model code: %d", nxchk, (int)modelData->nStates); … … 466 467 debugStreamPrint(LOG_DEBUG, 0, "real %s: mapAlias[%s] = %ld", debugName, info.name, j); \ 467 468 } \ 468 if (ACTIVE_STREAM(LOG_DEBUG))messageClose(LOG_DEBUG);469 messageClose(LOG_DEBUG); 469 470 470 471 READ_VARIABLES(modelData->realVarsData,mi.rSta,REAL_ATTRIBUTE,"real states",0,modelData->nStates,mapAlias); … … 529 530 modelData->realAlias[i].aliasType ? ((modelData->realAlias[i].aliasType==2) ? "time" : "real parameters") : "real variables"); 530 531 } 531 if (ACTIVE_STREAM(LOG_DEBUG))messageClose(LOG_DEBUG);532 messageClose(LOG_DEBUG); 532 533 533 534 /* … … 577 578 modelData->integerAlias[i].aliasType?"integer parameters":"integer variables"); 578 579 } 579 if (ACTIVE_STREAM(LOG_DEBUG))messageClose(LOG_DEBUG);580 messageClose(LOG_DEBUG); 580 581 581 582 /* … … 625 626 modelData->booleanAlias[i].aliasType ? "boolean parameters" : "boolean variables"); 626 627 } 627 if (ACTIVE_STREAM(LOG_DEBUG))messageClose(LOG_DEBUG);628 messageClose(LOG_DEBUG); 628 629 629 630 /* … … 673 674 modelData->stringAlias[i].aliasType ? "string parameters" : "string variables"); 674 675 } 675 if (ACTIVE_STREAM(LOG_DEBUG))messageClose(LOG_DEBUG);676 messageClose(LOG_DEBUG); 676 677 677 678 XML_ParserFree(parser); -
trunk/SimulationRuntime/c/simulation/solver/events.c
r20762 r20780 384 384 listClear(eventList); 385 385 386 if(ACTIVE_STREAM(LOG_EVENTS)) { 387 if(listLen(tmpEventList) > 0) { 386 if(ACTIVE_STREAM(LOG_EVENTS)) 387 { 388 if(listLen(tmpEventList) > 0) 389 { 388 390 debugStreamPrint(LOG_EVENTS, 0, "found events: "); 389 } else { 391 } 392 else 393 { 390 394 debugStreamPrint(LOG_EVENTS, 0, "found event: "); 391 395 } 392 396 } 393 while(listLen(tmpEventList) > 0) { 397 while(listLen(tmpEventList) > 0) 398 { 394 399 event_id = *((long*)listFirstData(tmpEventList)); 395 400 listPopFront(tmpEventList); -
trunk/SimulationRuntime/c/simulation/solver/external_input.c
r20561 r20780 103 103 } 104 104 105 if(ACTIVE_STREAM(LOG_SIMULATION)){ 105 if(ACTIVE_STREAM(LOG_SIMULATION)) 106 { 106 107 printf("\nExternal Input"); 107 108 printf("\n========================================================"); -
trunk/SimulationRuntime/c/simulation/solver/initialization/initialization.c
r20766 r20780 74 74 if(1e-5 < funcValue) 75 75 { 76 if (ACTIVE_STREAM(LOG_INIT)) { 76 if (ACTIVE_STREAM(LOG_INIT)) 77 { 77 78 infoStreamPrint(LOG_INIT, 1, "error in initialization. System of initial equations are not consistent\n(least square function value is %g)", funcValue); 78 79 for(i=0; i<initData->nInitResiduals; i++) { … … 595 596 dumpInitialization(data,initData); 596 597 retVal = reportResidualValue(initData); 597 if (ACTIVE_STREAM(LOG_INIT))messageClose(LOG_INIT);598 messageClose(LOG_INIT); 598 599 freeInitData(initData); 599 600 -
trunk/SimulationRuntime/c/simulation/solver/initialization/method_ipopt.c
r20143 r20780 216 216 */ 217 217 infoStreamPrint(LOG_INIT, 0, "ipopt using symbolic sparse jacobian G"); 218 if(ACTIVE_STREAM(LOG_INIT)) { 218 if(ACTIVE_STREAM(LOG_INIT)) 219 { 219 220 infoStreamPrint(LOG_INIT, 0, "sparsity pattern"); 220 221 for(i=0; i<n; ++i) { -
trunk/SimulationRuntime/c/simulation/solver/kinsolSolver.c
r20310 r20780 260 260 infoStreamPrint(LOG_NLS, 0, "KINDlsGetNumJacEvals = %5ld", nje); 261 261 infoStreamPrint(LOG_NLS, 0, "KINDlsGetNumFuncEvals = %5ld", nfeD); 262 if (ACTIVE_STREAM(LOG_NLS))messageClose(LOG_NLS);262 messageClose(LOG_NLS); 263 263 264 264 /* free memory */ -
trunk/SimulationRuntime/c/simulation/solver/mixedSearchSolver.c
r20635 r20780 303 303 }while(!found_solution); 304 304 305 if(ACTIVE_STREAM(LOG_NLS))messageClose(LOG_NLS);305 messageClose(LOG_NLS); 306 306 debugStreamPrint(LOG_NLS, 0, "#### Finished mixed equation system in steps %d.\n", stepCount); 307 307 return success; -
trunk/SimulationRuntime/c/simulation/solver/nonlinearSolverNewton.c
r20635 r20780 381 381 } 382 382 383 if (ACTIVE_STREAM(LOG_NLS))messageClose(LOG_NLS);383 messageClose(LOG_NLS); 384 384 385 385 return success; -
trunk/SimulationRuntime/c/simulation/solver/perform_simulation.c
r20762 r20780 195 195 196 196 saveZeroCrossings(data); 197 if (ACTIVE_STREAM(LOG_SOLVER))messageClose(LOG_SOLVER);197 messageClose(LOG_SOLVER); 198 198 199 199 … … 210 210 sim_result.emit(&sim_result,data); 211 211 handleEvents(data, solverInfo->eventLst, &(solverInfo->currentTime), solverInfo); 212 if (ACTIVE_STREAM(LOG_EVENTS))messageClose(LOG_EVENTS);212 messageClose(LOG_EVENTS); 213 213 threadData->currentErrorStage = ERROR_SIMULATION; 214 214 -
trunk/SimulationRuntime/c/simulation/solver/stateset.c
r20143 r20780 281 281 infoStreamPrint(LOG_DSS, 1, "select new states at time %f", data->localData[0]->timeValue); 282 282 setAMatrix(newEnable, nCandidates, nStates, A, states, statecandidates, data); 283 if (ACTIVE_STREAM(LOG_DSS))messageClose(LOG_DSS);283 messageClose(LOG_DSS); 284 284 } 285 285 ret = -1;
Note: See TracChangeset
for help on using the changeset viewer.