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
user defined variable as optimisation variable
Moderators: cyao, michael_borland
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: user defined variable as optimisation variable
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
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
Re: user defined variable as optimisation variable
Thanks!!
Slava
Slava