Project

General

Profile

lssol_avd..txt

Kyle Hazelwood, 01/15/2015 12:00 PM

 
1
 
2
if (pgm.i4[I_ALG] == 0) sts = alg_lssol();                   /* straight LSSOL */
3
 else if (pgm.i4[I_ALG] == 1) sts = alg_svd_lssol(0);    /* SVD */
4
 else if (pgm.i4[I_ALG] == 2) sts = alg_svd_lssol(1);    /* SVD + LSSOL */                        
5
 else if (pgm.i4[I_ALG] == 3) sts = alg_3bump1();       /* 3bump for BPMs 
6
                                                                                    not matched to CEDs*/
7

    
8

    
9
int alg_lssol(void)  	/* LSSOL */
10
-> sorbit_ls_lssol
11
	- does the LSSOL least squares constrained fit to get the
12
	new corrector delta angles and the new predicted orbit
13

    
14
int alg_svd_lssol(int opt)
15
	- smooth orbit least squares algorithm using SVD algorithm to identify
16
	   singularities so that the problem can be reformulated without
17
	   the singularities so that LSSOL can be called to solve the
18
	   problem with constraints on the correctors.  One may also
19
	   obtain the standard SVD solution
20

    
21
->
22
 if (opt == 0) {	 /* SVD */
23
    sts = sorbit_ls_compute_svd(pl,nced,nbpm,cor->stepcut,dx1,dthet,dx2);
24
  }
25
 else {		/* SVD + LSSOL */
26
    sts = sorbit_ls_compute_lssol(pl,nced,nbpm,cor->stepcut,dx1,lb,ub,
27
                                  dthet,dx2,&lserr);
28
    if (lserr >= 0 && lserr <=6 )error_message_c(mes[lserr],0,GREEN,TRUE);
29
  }
30

    
31
int alg_3bump(void)
32
-> sorbit_3bump /* 3bump requiring bpm matched ceds one-to-one */
33

    
34
- sorbit_ls_lssol is in module sorbitlssol.cpp
35
- sorbit_ls_compute_svd and sorbit_ls_compute_lssol are in module sorbitls.cpp
36
- sorbit_3bump is in module sorbit3bump.cpp