← Back to team overview

yade-users team mailing list archive

Re: [Question #634499]: interface problem Yade-Matlab

 

Question #634499 on Yade changed:
https://answers.launchpad.net/yade/+question/634499

    Status: Open => Answered

Robert Caulk proposed the following answer:
Hello Alessandro,

>Is correct for you to assume as target function the sum of the
difference of the two strength with respect the target values?

I am unfamiliar with particle swarm optimization, but I am assuming the
"target function" is the one you are interested in minimizing? In my
experience with optimization, you want the function you are minimizing
to be a norm (of your choosing), not a sum. Sounds like you want to
minimize the norm of the residual, which is generally a safe bet.

>About instead the second option that you propose, which bash can i use
in this case? thanks in advance

Hmm I am not sure I understand. I am just describing a shell script
written in bash. These are scripts executed through the terminal that
control your computer. For example, "yadedaily test.py" is bash language
that we use to execute our yade scripts. We can put that command in a
script called script.sh. If you execute "sh script.sh" in the terminal,
it will run the commands contained within the script. I am assuming
matlab has non-gui access, maybe it is "matlab test.m"? So the script
would look something like:

while (some logic); do
    yadedaily testYade.py  # reads values from in.txt and prints values to out.txt
    matlab testMat.py  # reads values from out.txt and prints values to in.txt
    # change logic if residual < tolerance?
end

Maybe this is not the best way to go about it. Just an idea.

Cheers,

Robert

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.