- Reworked the connection object and the IO system
- Reworked the support for TRICS - Added a second generation motor
This commit is contained in:
16
optimise.c
16
optimise.c
@ -347,7 +347,7 @@
|
||||
return 0;
|
||||
}
|
||||
sprintf(pBueffel,"Trying hard to optimise variable %s",pOvar->pName);
|
||||
SCWrite(pCon,pBueffel,eWarning);
|
||||
SCWrite(pCon,pBueffel,eLog);
|
||||
iRet = SilentScan(self->pScanner,pOvar->iStep,self->eCount,
|
||||
self->fPreset,pServ->pSics,pCon);
|
||||
if(!iRet)
|
||||
@ -397,11 +397,11 @@
|
||||
strcat(pBueffel,cData);
|
||||
break;
|
||||
}
|
||||
SCWrite(pCon,pBueffel,eWarning);
|
||||
SCWrite(pCon,pBueffel,eLog);
|
||||
|
||||
if(fMax < self->fThreshold)
|
||||
{
|
||||
SCWrite(pCon,"Peak may be lost, increasing scan range",eWarning);
|
||||
SCWrite(pCon,"Peak may be lost, increasing scan range",eLog);
|
||||
pOvar->iLost++;
|
||||
if(pOvar->iLost > 2)
|
||||
{
|
||||
@ -435,11 +435,11 @@
|
||||
{
|
||||
pOvar->fShift = ABS(pOvar->fCenter - fNewCenter);
|
||||
sprintf(pBueffel,"%s shifted by %8.2f ",pOvar->pName,pOvar->fShift);
|
||||
SCWrite(pCon,pBueffel,eWarning);
|
||||
SCWrite(pCon,pBueffel,eLog);
|
||||
pOvar->fPrecision = 3*fStdDev;
|
||||
sprintf(pBueffel,"%s precision set to 3*StdDev = %8.3f",
|
||||
pOvar->pName, 3*fStdDev);
|
||||
SCWrite(pCon,pBueffel,eWarning);
|
||||
SCWrite(pCon,pBueffel,eLog);
|
||||
pOvar->fCenter = fNewCenter;
|
||||
}
|
||||
/* drive to the new center */
|
||||
@ -627,7 +627,7 @@ static int findDirection(pOptimise self, pOVarEntry pOvar, SConnection *pCon)
|
||||
}
|
||||
snprintf(buffer,255,"Climbing %s, value = %f, count = %ld",
|
||||
pOvar->pName, varValue, currentCount);
|
||||
SCWrite(pCon,buffer,eWarning);
|
||||
SCWrite(pCon,buffer,eLog);
|
||||
|
||||
if(currentCount <= lastCount)
|
||||
{
|
||||
@ -695,7 +695,7 @@ static int findDirection(pOptimise self, pOVarEntry pOvar, SConnection *pCon)
|
||||
for(iCycle = 0; iCycle < self->iMaxCycles; iCycle++)
|
||||
{
|
||||
sprintf(pBueffel,"Optimiser cycle %d of %d started",iCycle, self->iMaxCycles);
|
||||
SCWrite(pCon,pBueffel,eStatus);
|
||||
SCWrite(pCon,pBueffel,eLog);
|
||||
for(i = iRedoVar; i < self->iVar; i++)
|
||||
{
|
||||
iRet = CenterVariable(self,pCon,i);
|
||||
@ -740,7 +740,7 @@ static int findDirection(pOptimise self, pOVarEntry pOvar, SConnection *pCon)
|
||||
for(iCycle = 0; iCycle < self->iMaxCycles; iCycle++)
|
||||
{
|
||||
sprintf(pBueffel,"Optimiser cycle %d of %d started",iCycle, self->iMaxCycles);
|
||||
SCWrite(pCon,pBueffel,eStatus);
|
||||
SCWrite(pCon,pBueffel,eLog);
|
||||
for(i = iRedoVar; i < self->iVar; i++)
|
||||
{
|
||||
iRet = ClimbVariable(self,pCon,i);
|
||||
|
Reference in New Issue
Block a user