You are on page 1of 15

SCHOOLOFI

NFORMATI
ONTECHNOLOGY&ENGI
NEERI
NG(
SITE)

WI
NTERSEMESTER2020-
21

OPTI
MIZATI
ONTECHNI
QUES

SWE1002SLOT:C2

DI
GITALASSI
GNMENT-
3

TOPI
C:TEACHI
NGLEARNI
NGBASEDOPTI
MIZATI
ONALGORI
THM

DONEBY

S.
SATHI
SH–17MI
S0108

UNDERTHEI
NCHARGEOF

PROF.
VANMATHIC

1|Page
INTRODUCTI ON:
Thischapt eri ntroducest eaching-l
earning-basedopt i
mizati
on
(TLBO)algori
thm andi t
sel i
tistandnon- dominatedsor t
ingmul ti
obj
ecti
ve
versi
ons.Two ex amplesofunconst rai
ned and const r
ained benchmar k
functi
onsandanex ampl eofamul t
iobjecti
veconst rainedpr obl
em are
presentedtodemonst r
atet hepr oceduralstepsoft healgor i
thm.
TheTLBOal gor i
thm hasgai nedwideaccept anceamongt he
optimizat
ion researchers.The TLBO al gori
thm i sat eaching-l
earni
ng
processinspi
redal gorithm andi sbasedont heef fectofi nf
luenceofa
teacherontheout putofl earnersinacl ass.

LI
TERATURESURVEY:

PAPER[
1]:

Anot
eont
eachi
ng–l
ear
ning-
basedopt
imi
zat
ional
gor
it
hm-
2012

Aut
hor
s:Mat
ejČr
epi
nšek,
Shi
h-Hi
sLi
u,LukaMer
nik

Teaching–Lear ni
ng-BasedOpt imi zati
on( TLBO)seemst obear isingstar
fr
om amongsta numberofmet aheur i
stics withr el
ati
velycompet it
ive
perf
ormances.I ti sr eport
ed t hati tout performs some oft he wel l
-
known  met aheuristi
cs r
egardi
ng constrained benchmark functi
ons,
constrained mechani caldesi gn,and cont i
nuous non- li
near 
numer i
cal
opti
mi zation problems.Such a br eakthrough has st eered us t owards
i
nvestigatingt hesecr etsofTLBO’ sdomi nance.Thi spaperr epor t
sour
fi
ndingsonTLBOqual it
ati
velyandquant itativ
elythroughcode-reviewsand
experi
ment s,respectiv
ely.

PAPER[
2]:

Teachi
ng–learni
ng-basedopti
mizati
onalgori
thm f
orunconst
rai
nedand
constr
ainedreal
-paramet
eropti
mizati
onprobl
ems-2012

Aut
hor
s:RVenkat
aRao,
VJSav
sani
,JBal
i
c

An ef f
icient opt i
mizati
on al gor
it
hm cal led teaching–l
earning-
based
optimization (TLBO)i s proposed int his arti
clet o solve conti
nuous
unconst rained and constrai
ned opt i
mization probl
ems.The pr oposed
met hodi sbasedont heeffectoftheinfluenceofat eacheront heoutput
oflearner sinacl ass.Thebasicphilosophyoft hemet hodi sexplai
nedin
detail
.Theal gori
thm istestedon25di ffer
entunconst rai
nedbenchmar k
functi
ons and 35 const r
ained benchmar k functi
ons wi t
h di f
fer
ent
2|Page
charact
eristi
cs.Fort heconstrai
nedbenchmar kfuncti
ons,TLBOist est
ed
with di
fferentconst rai
nthandl i
ng techniques such as superi
or i
ty of
feasi
blesol ut
ions,self-
adaptivepenalty
,ϵ-constrai
nt,st
ochasti
cr anki
ng
andensembl eofconst r
aints.Theperformanceoft heTLBOalgorithm is
comparedwi t
ht hatofotheroptimizat
ionalgori
thmsandt heresult
sshow
thebett
erper for
manceoft heproposedalgori
thm.

PAPER[
3]:

An el
i
tistt
eachi
ng-
lear
ning-
based opt
imi
zat
ion al
gor
it
hm f
orsol
vi
ng
compl
exconst
rai
nedopt
imi
zat
ionpr
obl
ems-
2012

Aut
hor
s:RRao,
Viv
ekPat
el

Natur ei nspir
edpopul ationbasedal gorithmsi sar esear chf i
eldwhi ch
simul atesdi fferentnaturalphenomenat osol v eawi der angeofpr obl
ems.
Resear chers hav e proposed sev eralal gor ithms consi der ing di ff
erent
naturalphenomena.Teachi ng-
Learning-basedopt imization( TLBO)i sone
ofther ecentlypr oposedpopul at
ionbasedal gori
thm whi chsi mulatest he
teachi ng- l
earning processoft hecl assr oom.Thi sal gor i
thm doesnot
requireanyal gorit
hm-specifi
ccont rolpar amet ers.Int hi spaper ,elit
ism
concepti si nt r
oduced i nt he TLBO al gor i
thm and i ts ef fecton t he
performanceoft heal gorit
hm isi nvestigat ed.Theef fectsofcommon
control li
ngpar amet erssuchast hepopul ationsi zeandt henumberof
gener at i
onsont heper formanceoft heal gor it
hm ar ealsoi nv est i
gated.The
proposedal gor i
thm istestedon35const rainedbenchmar kf unctionswi th
diff
erentchar act eri
sti
csandt heperformanceoft healgor ithm i scompar ed
witht hatofot herwel lknown opt imizat ion algorit
hms.The pr oposed
algorithm canbeappl iedt ovar
iousopt i
mi zat ionpr oblemsoft hei ndustrial
environment .

PAPER[
4]:

Parameter opti
mizati
on of modern machi
ning pr
ocesses usi
ng
teachi
ng–l
earni
ng-basedopt
imi
zat
ional
gor
it
hm-
2013

Aut
hor
s:RVenkat
aRao,
VDKal
yankar

Moder
n machi ni
ng pr ocesses ar
e now- a-days wi dely used by
manuf
act
uri
ngindust
ri
esi nordert
oproducehighquali
typr eci
seandver
y
compl
ex pr
oducts.These modern machini
ng processes invol
velar
ge
3|Page
numberofi nputpar ameterswhi chmayaf fectthecostandqual i
tyoft he
products.Selectionofopt i
mum machi ningpar amet ersi
nsuchpr ocesses
i
sv eryimpor tanttosat i
sfyalltheconf li
ctingobj ecti
vesoft hepr ocess.In
thi
sr esear ch wor k,a newl y dev el
oped adv anced algori
thm named

teaching–learning-basedoptimi zat
ion( TLBO)al gori
thm’i
sappl iedf orthe
processpar amet eroptimizat
ionofsel ectedmoder nmachi ni
ngpr ocesses.
Thisalgor i
thm isinspiredbyt het eaching–l earningprocessandi tworks
ontheef fectofinfluenceofat eacheront heout putoflearnersinacl ass.

PAPER[
5]:

Animprovedteachi
ng-l
earni
ng-
basedopti
mizat
ional
gor
it
hm f
orsol
vi
ng
unconst
rai
nedopti
mizati
onprobl
ems-2013

Aut
hor
s:RVenkat
aRao,
Viv
ekPat
el

Teachi ng–Learning-Based Opt i


mizat i
on (TLBO)al gorithmssi mulatet he
teaching–learningphenomenonofacl assroom tosolvemul t
i-di
mensi onal ,
l
inearandnonl i
nearpr obl emswi thappr eci
ableeffi
ciency .Inthispaper ,
t he
basic TLBO al gorit
hm i si mpr oved t o enhance i ts expl orat
ion and
exploitati
oncapaci ti
esbyi ntr
oduci ngt heconceptofnumberoft eacher s,
adapt i
v eteaching fact or,t utori
alt raini
ng and sel fmot i
vated learning.
Performance of t he i mpr oved TLBO al gori
thm i s assessed by
i
mpl ement ing it on a r ange of st andard unconst rained benchmar k
functions hav i
ng differentchar act eri
sti
cs.The r esults ofopt i
mi zati
on
obtainedusi ngt heimpr ovedTLBOal gori
thm arev ali
dat edbycompar i
ng
them wi tht hoseobt ainedusi ngt hebasi cTLBO andot heropt i
mi zati
on
algori
thmsav ail
ableint hel it
erature.

ALGORI
THM:

Teaching-
learningisani mpor tantpr ocesswher eev eryi ndivi
dualtri
est o
l
earnsomet hi
ngf r
om ot heri ndividualst oimpr ovet hemsel v es.Raoetal
.
andRaoandPat elpr oposedanal gori
thm,knownasTeachi ng-Learni
ng-
BasedOptimization ( TLBO) ,whi ch si mul ates the t raditi
onalt eaching
l
earning phenomenon ofa cl assr oom.The al gorithm si mul at
es two
fundamentalmodesofl ear ni
ng:( i)through thet eacher (known ast he
teacherphase)and ( ii
)i nteracting wi t
h ot herlearner s( known ast he
l
earnerphase) .TLBOi sapopul ati
onbasedal gori
thm,wher eagr oupof
students(i.
e.l earner )is consi der ed the popul at
ion and t he diff
erent
subjectsofferedt ot helear nersar eanal ogouswi tht hedi f
ferentdesign
vari
ables oft he opt imization pr oblem.The r esults oft he lear
nerar e
analogoustot hef i
tnessv alueoft heopt i
mi zati
onprobl em.

4|Page
Thebestsol
utioni
ntheent
ir
epopulat
ionisconsider
edastheteacher
.The
oper
ati
onoftheTLBOalgori
thm i
sexplai
nedbelowwi t
hthet
eacherphase
andl
earnerphase.

1.Teacherphase:

Thisphaseoft heal gorithm si mul atest hel earningoft hest udent s( i


.e.
l
earner s)t hrough t he t eacher .Dur i
ng t his phase,a t eacherconv ey s
knowl edgeamongt hel ear nersandmakesanef forttoi ncr easet hemean
resultoft hecl ass.Supposet her ear e‘ m’numberofsubj ect s( i
.e.desi gn
vari
abl es)off eredt o‘n’ numberofl ear ners(i.e.popul ati
onsi ze, k=1, 2, ...
,n) .Atanysequent ialteachi ng- lear ni
ngcy cle,i,Mj ,
iist hemeanr esultof
thelear nersinapar ti
cul arsubj ect‘ j’(j=1, 2, ..., m) .
Sinceat eacheri sthe
mostex periencedandknowl edgeabl eper sononasubj ect ,t hebestl earner
i
nt heent i
repopul ationi sconsi deredat eacheri nt heal gor i
t hm.LetXt otal
kbest,ibet her esul toft hebestl ear nerconsi deringal lthesubj ect swhoi s
i
dent i
fiedasat eacherf ort hatcy cle.Thet eacherwi l
lputmaxi mum ef fort
i
ntoi ncr easingt heknowl edgel eveloft hewhol ecl ass,butl ear nerswi l
l
gainknowl edgeaccor dingt ot hequal ityoft eachi ngdel i
v er edbyat eacher
andt hequal ityofl ear ner spr esenti nt hecl ass.Consi der ingt hisf act,the
diff
erencebet weent her esul toft het eacherandt hemeanr esul toft he
l
earner si neachsubj ecti sex pr essedas:

Di
ff
erence_
Meanj
,
i=r
i(
Xj,
kbest
,i
TFMj
,
i), (
1)

wher
eXj
,
kbest
,i
ist
her
esul
toft
het
eacher(
i.
e.bestl
ear
ner
)insubj
ectj
.

TFistheteachi
ngfactor
,whi
chdeci
destheval
ueofmeant obechanged,
andriistherandom numberint
herange[0,1].Thev al
ueofTFcanbe
ei
ther1or2.ThevalueofTFi
sdeci
dedrandomlywithequalpr
obabi
l
ityas:

TF=r
ound[
1+r
and(
0,1)
{21}
], (
2)

wher erandi
st herandom numberintherange[0,1].TFisnotaparamet
er
oft heTLBO algorit
hm.Thev al
ueofTFi snotgivenasani nputtothe
algori
thm andi t
sv alueisrandomlydecidedbyt healgori
thm usi
ngEq.
(2).
Basedont heDi f
ference_
Meanj,
i,t
heexist
ingsoluti
onisupdatedi
nthe
teacherphaseaccordingt ot
hefol
lowingexpr
essi
on:

X′
j
,k,
i=Xj
,
k,i
+Di
ff
erence_
Meanj
,
i (
3)

whereX′j
,
k,ii
stheupdat edvalueofXj,k,
i
.AcceptX′j
,k,
iifi
tgi
vesabetter
funct
ionval
ue.Alltheacceptedfuncti
onv al
uesattheendoftheteacher
phasearemaintained,andthesev al
uesbecomet heinputtothel
earner
5|Page
phase.Itmaybenot edt hatt hev aluesofr iandTFaf fectt heper f
ormance
oftheTLBOal gorithm.r ii stherandom numberi nther ange[0, 1]andTFi s
the teaching f actor.Howev er,the v al
ues ofr iand TF ar e generated
randoml yint heal gor it
hm andt hesepar amet er sarenotsuppl i
edasi nput
totheal gorit
hm ( unl ikesuppl yi
ngcr ossov erandmut ationpr obabil
iti
esin
GA,inert
iawei ghtandcogni t
iveandsoci alpar amet ersinPSO,andcol ony
sizeandl imiti nABC,et c. ).Thus,tuningofr iandTFi snotr equir
edi nthe
TLBOal gori
thm ( unliket het uningofcr ossov erandmut ati
onpr obabili
ti
es
i
nGA,i nert
iawei ghtandcogni tiveandsoci alpar amet ersi nPSO,and
colonysi zeand l imi tin ABC,et c.).TLBO r equirest uning ofonl ythe
common cont rolpar amet ers,like popul at ion size and number of
generations,f oritswor king,andt hesecommoncont r
olpar amet ersare
requir
ed f or t he wor king of al l popul ation based opt i
mi zati
on
algori
thms. Thus,TLBOcanbecal ledanal gorithm-specif i
cpar amet er
-l
ess
algori
thm.

2.Lear
nerphase:

Thisphaseoft healgorit
hm simulatest helearningoft hestudents(i.
e.
l
earners)throughinteracti
onamongt hemsel ves.Thestudentscanal so
gain knowledge bydiscussing and int eract
ing with otherstudents.A
l
earnerwi l
ll earn new informati
on i ft he otherlearners have mor e
knowledget hanhim orher .Thel earningphenomenonoft hi
sphasei s
expressedbelow.

Randomlysel ecttwol earners,PandQ,sucht hatX't


otalP,
i=X′t
otalQ,
I
,
where,X′
totalP,iandX′ t
otalQ,iar
etheupdatedvaluesofXtotalP,iand
Xtot
alQ,i
,respectiv
ely
,attheendoft het
eacherphase.

MATLABCODE:

Cl
c;
Cl
ear
;
Cl
oseal
l
;

%%Pr
obl
em Def
ini
ti
on

%CostFuncti
on
Cost
Funct
ion=@(x)Spher
e(x)
;

nVar=10; %NumberofUnknownVari
abl
es
VarSi
ze=[
1nVar
];%UnknownVar
iabl
esMat
ri
xSize

Var
Min=-
10; %UnknownVar
iabl
esLowerBound
Var
Max=10; %UnknownVar
iabl
esUpperBound

6|Page
%%TLBOPar
amet
ers

MaxI
t=1000; %Maxi
mum NumberofI
ter
ati
ons

nPop=50; %Popul
ati
onSi
ze

%%I
nit
ial
i
zat
ion

%EmptySt
ruct
ureforI
ndivi
dual
s
Empt
y_i
ndi
vi
dual.
Posit
ion=[]
;
Empt
y_i
ndi
vi
dual.
Cost=[];

%Ini
ti
ali
zePopul
ati
onArr
ay
Pop=repmat(
empty_i
ndi
vi
dual
,nPop,
1);

%Ini
ti
ali
zeBestSol
uti
on
Best
Sol.
Cost=inf
;

%Init
ial
izePopulat
ionMember s
ForI=1:nPop
Pop(i
).Posi
ti
on=uni f
rnd(
VarMin,
VarMax,Var
Size)
;
Pop(i
).Cost=CostFuncti
on(
pop(i
).
Posi
ti
on);

I
fpop(i
).Cost<BestSol
.Cost
Best
Sol=pop(i)
;
End
End

%Ini
ti
ali
zeBestCostRecord
Best
Costs=zeros(
MaxIt,
1);

%%TLBOMai
nLoop

Fori
t=1:
MaxI
t

%Calcul
atePopulat
ionMean
Mean=0;
ForI=1:
nPop
Mean=Mean+pop( i
).
Posi
ti
on;
End
Mean=Mean/ nPop;

%Sel ectTeacher
Teacher=pop( 1);
ForI=2: nPop
I
fpop( i)
.Cost<Teacher
.Cost
Teacher=pop( i
);
End
End

%TeacherPhase
7|Page
ForI=1:nPop
%CreateEmpt
ySoluti
on
Newsol=empty
_indi
vi
dual
;

%TeachingFactor
TF=randi(
[12])
;

%Teaching(
mov i
ngtowardsteacher)
Newsol
.Posi
ti
on=pop(i).
Posit
ion…
+r
and(Var
Size)
.*(
Teacher
.Posit
ion–TF*
Mean)
;

%Cli
ppi
ng
Newsol
.Posi
ti
on=max(
newsol
.Posi
ti
on,Var
Min)
;
Newsol
.Posi
ti
on=mi
n(newsol
.
Posit
ion,
VarMax)
;

%Evaluat
ion
Newsol.
Cost=Cost
Funct
ion(
newsol
.
Posi
ti
on)
;

%Compar isi
on
I
fnewsol.Cost<pop(i
).
Cost
Pop(i
)=newsol ;
I
fpop(i)
.Cost<BestSol
.Cost
Best
Sol=pop( i
);
End
End
End

%LearnerPhase
ForI=1:nPop

A=1:nPop;
A(
i)=[]
;
J=A(randi
(nPop-
1))
;

Step=pop(i).
Posi
ti
on–pop(j
).
Posi
ti
on;
I
fpop( j
).
Cost<pop(i
).
Cost
Step=-Step;
End

%Creat
eEmptySolut
ion
Newsol=empt
y_i
ndivi
dual
;

%Teaching(
movi
ngtowardsteacher
)
Newsol
.Posi
ti
on=pop(
i)
.Posi
tion+rand(
Var
Size)
.*St
ep;

%Cli
ppi
ng
Newsol
.Posi
ti
on=max(
newsol
.Posi
ti
on,Var
Min)
;
Newsol
.Posi
ti
on=mi
n(newsol
.
Posit
ion,
VarMax)
;

%Evaluat
ion
Newsol.
Cost=Cost
Funct
ion(
newsol
.
Posi
ti
on)
;
8|Page
%Compar isi
on
I
fnewsol.Cost<pop(i
).
Cost
Pop(i
)=newsol ;
I
fpop(i)
.Cost<BestSol
.Cost
Best
Sol=pop( i
);
End
End
End

%StoreRecordf
orCurr
entIt
erat
ion
Best
Costs(
it
)=BestSol
.Cost
;

%ShowIter
ati
onInfor
mation
Di
sp(
[‘
It
erat
ion‘num2str
(i
t)‘
:BestCost=‘
num2st
r(Best
Cost
s(i
t)
)]
);

End

%%Resul
ts

Fi
gur e;
%plot(BestCosts,‘
LineWidt
h’,2);
Semi l
ogy(BestCosts,‘Li
neWidth’
,2)
;
Xlabel(
‘I
terat
ion’)
;
Yl
abel (
‘BestCost’)
;
Gridon;

I
MPLEMENTATI
ON:

TESTCASESANDSCREENSHOTS:

9|Page
10|Page
11|Page
12|Page
OUTPUTS:

13|Page
14|Page
RESULTSANDDI
SCUSSI
ONS:

The oper ators used by di jkstra’s algor ithm si mul atet he way nat ural
select i
on i s car r
ied out .Dy nami c pr ogr ammi ng i s a wel l-
est abl i
shed
techni quet hatobt ai nsapar t
ial/ordinar yDi fferent ialequat i
on,v ariat i
onal
orquasi -
v ari
at ionali nequal itydependi ng on t he t ype ofPr oblem;t he
solut i
onpr ovidest hev alueoft hepr oblem asaf unct ionoft hei niti
al
posi ti
on( t
hev aluef unction) .Theot hermet hodr ecast st hepr obl emsas
l
inearpr ogr amsov eraspaceOff easi blemeasur es.Di jkstra’sal gor it
hm
solv estheshor test -pathpr obl em f oranywei ght ed, Direct edgr aphwi t
hnon
-negat iv
ewei ght s.Itcanhandl egr aphsconsi sti
ngofcy cl es,butNegat ive
wei ghts wi l
l cause t his al gorithm t o pr oduce i ncor rect r esul ts.
Consequent l
y, weAssumet hatw€≥0f oral le∈Eher e.Di j
kst r
a’ salgor it
hm
wor kscor rectly,becauseal ledgeWei ght sar enon- negat ive,andt hev er tex
witht hel eastshor test-pathest imat ei salway sChosen.I nt hef i
rsti terat i
on
oft hewhi l
el oopi nl i
nes3t hrough7,t hesour cesi schosenandI ts
adjacentv ert
iceshav ethei rest (v)sett ow( (s,v )).Int hesecondi ter ation,
thev ertexuwi t
hMi nimalw( (s,u) )wi l
lbesel ect ed;t hent hoseedges
i
nci dentf rom uwi llber elax ed.Cl ear l
y,Ther eexi st snoshor t
erpat hf rom s
tout hant hesi ngleedge( s,u) ,becauseal lwei ght sar enotNegat i
v e,and
anypat ht racedt hatusesani ntermedi atev ertexi slonger .Cont i
nui ng
thisReasoni ng br i
ngsust ot heconcl usion t hatt he al gor ithm,i ndeed,
comput est heshor testpat hs.

CONCLUSI
ON:

This st udy i ntended to apply opt i


mizat
ion met hod t o dy namic programmi ng
compar at
ivelyTwosol uti
onsarefeasibleandopt i
malsol uti
onsFeasiblesolut
ionWhi l
e
solvingapr obl em byUsingagreedyappr oach,thesolutionisobt ai
nedinanumberof
stages.Thesol ut
ionwhichSat
isfi
est heproblem constraint
st heyarecall
edaf easibl
e
solution.Andt heanotheropti
malSol uti
onamongal lthef easibl
esoluti
oni fthebest
solutioneitheri tcanhav eami nimum ormaxi mum v alueischoseni tisanopt i
mal
solution.Wesuggestt hatdy
nami cprogrammi nginAbandi swel l
suit
edtothepr obl
em
ofal i
gningl ongr eadsbetweenthemsel vesandcanbeUsedasacor ecomponentof
met hodsf orobt ai
ningaconsensussequencef r
om thelongr eadsalone.

15|Page

You might also like