user defined variable as optimisation variable

Moderators: cyao, michael_borland

Post Reply
libov
Posts: 32
Joined: 30 May 2013, 07:14

user defined variable as optimisation variable

Post by libov » 11 Jul 2014, 21:29

Hi Michael et al,

let's say I defined a variable in the lattice file and used it for several elements. Can I use this variable as optimisation variable?

For example,
.lte file:
Q1: K1=1,L=myVariable
Q2: K1=2,L=myVariable

.ele file:
<say that myVariable should be varied>

Of course one could do:
&optimization_variable name=Q1, item= L, ... &end
&optimization_variable name=Q2, item= L, ... &end
&optimization_term term="Q1.L Q2.L 1e-3 sene" &end

but for many elements the latter procedure gets a bit tedious..

Thanks in advance !

Yours
Slava

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: user defined variable as optimisation variable

Post by michael_borland » 14 Jul 2014, 08:30

Slava,

Unfortunately, there isn't a way to use a user-defined variable in optimization. It's something we should add.

Meanwhile, here's how I would do it:
&optimization_variable name=Q1, item= L, ... &end
&optimization_covariable name=Q2, item= L, equation = "Q1.L" &end
&optimization_covariable name=Q3, item= L, equation = "Q1.L" &end
&optimization_covariable name=Q4, item= L, equation = "Q1.L" &end

etc.

--Michael

libov
Posts: 32
Joined: 30 May 2013, 07:14

Re: user defined variable as optimisation variable

Post by libov » 16 Jul 2014, 02:52

Thanks!!
Slava

Post Reply