Optimisation with Michlet

Discussion in 'Software' started by julien, Nov 13, 2008.

  1. julien
    Joined: Oct 2008
    Posts: 4
    Likes: 1, Points: 0, Legacy Rep: 28
    Location: France

    julien New Member

    Hello, I am currently working on a global optimisation of a yacht (seakeeping, Resistance and space)
    As the function is very likely to be multimodal I will take a "precalculation" type of approach ie generate a population of hull within a given design space and assess the different attributes for each hull of the population.
    The objective fx will be an aggregate fx.

    I plan to use Michlet for the Hydrodynamic Resistance prediction but for that I have to find a way to automate it (systematicly vary the parameters and export the result to excel)
    Does anybody knoes if this is possible?
    Would Godzilla be of any help in the case of a multi-objective optimisation?

    Thank you for your help!

    Julien
     
    1 person likes this.
  2. daiquiri
    Joined: May 2004
    Posts: 5,373
    Likes: 255, Points: 93, Legacy Rep: 3380
    Location: Italy (Garda Lake) and Croatia (Istria)

    daiquiri Engineering and Design

    Hello,

    You should read the paper I've attached here.
    I think you could contact guys who wrote the paper and have the first-hand info about how they did it.

    Good luck! ;)
     

    Attached Files:

  3. Guest625101138

    Guest625101138 Previous Member

    I have attached the input file for a Godzilla optimisation in case you have not explored one. It gives you an idea of the objectives that can be adjusted.

    What you have to remember with this is that Michlet is producing results for calm water and without hull sinkage. The theory is based on thin ships and probably loses accuracy around slenderness ratios of 4 or 5.

    So the real world has greater complexity than Michlet copes with. It does however provide results very quickly and usually something that goes best in calm water will also go best in rougher water - up to a point.

    Rick W
     

    Attached Files:

  4. marshmat
    Joined: Apr 2005
    Posts: 4,127
    Likes: 149, Points: 63, Legacy Rep: 2043
    Location: Ontario

    marshmat Senior Member

    Hi Julien,

    I have done a few optimizations (for interest only, none have yet been built) using multiple Godzilla runs over a wide range of design parameters. Godzilla will, once the dust settles, produce a single hull optimized for a single set of criteria (which can, I should note, include an interior space requirement). What I've done in a few cases is to start by constraining maximum (but generally not minimum) length, beam and draught, and by fixing displacement at one target value, suitable for the intended purpose of the craft. I'll then use the same Godzilla input file for a series of runs, changing only the design speed in each run. In some cases I'll repeat that with a light-ship and a fully-loaded displacement value. Plotting the resulting resistance curves, and comparing against plots of the various coefficients of form, gives a good picture of what the optimum would be given a broader range of criteria. Whether to optimize for total resistance or for indicated power is a matter for further debate, although if you're only optimizing for one speed they should produce the same result.

    Right now, this is all happening manually, generally when I'm looking for distractions from things that really ought to be more important (tonight it's coupled fermion eigenspinors). I see no reason why such a procedure could not be automated, but so far I haven't have the time or the coding skills- or the need- to do so. I'd love to hear about anyone else's scripts that can automate this kind of procedure, though....
     
  5. Leo Lazauskas
    Joined: Jan 2002
    Posts: 2,696
    Likes: 151, Points: 63, Legacy Rep: 2229
    Location: Adelaide, South Australia

    Leo Lazauskas Senior Member

    You can't do that with Michlet/Godzilla because the public release has a graphic interface that requires some keyboard input from the user.

    I am in the throes of writing manuals for another code "Flotilla" that can be called from within other programs. The input and output files are simple text that can be easily manipulated using "awk" and other Unix-like utilities. That means that users can create their own optimisation methods and criteria. It also means that long runs can be done on separate machines and results collated automatically.

    Unfortunately:
    1. Flotilla won't be free (I'm still on the dole, so I can't afford to give stuff to other free-loaders any more)
    2. Flotilla is a bit slower than Godzilla because near-field effects are calculated in order to account for dynamic sinkage and trim and hull wave profiles.

    I should have demos for monohulls, symmetric catamarans and SES out within a couple of weeks.

    Cheers,
    Leo.
     
  6. daiquiri
    Joined: May 2004
    Posts: 5,373
    Likes: 255, Points: 93, Legacy Rep: 3380
    Location: Italy (Garda Lake) and Croatia (Istria)

    daiquiri Engineering and Design

    Talk of the devil... and there he arrives. :D
    Julien, mr. Lazauskas is one of the authors of the paper I'd attached. :)
     
  7. marshmat
    Joined: Apr 2005
    Posts: 4,127
    Likes: 149, Points: 63, Legacy Rep: 2043
    Location: Ontario

    marshmat Senior Member

    I think Leo must be searching the forum periodically for any mention of Michlet.... hardly a thread goes by where it is mentioned without Leo offering some excellent insight into how it works (he did write it, after all).

    Leo, this isn't the first time you've mentioned Flotilla and I'm looking forward to hearing more about that code. When it's ready, please let us know how much you'll be charging for it- I'd love to get my hands on a copy if the budget allows. (That's the problem with the academic/student life.... steady incomes are hard to find. A couple of my best profs lost their jobs to budget cuts last year.)
     
  8. Leo Lazauskas
    Joined: Jan 2002
    Posts: 2,696
    Likes: 151, Points: 63, Legacy Rep: 2229
    Location: Adelaide, South Australia

    Leo Lazauskas Senior Member

    Hi Matt,
    I look around boatdesign.net nearly every day. I don't have time to reply to everything I'd like to, but rest assured, I don't just wander in looking for Michlet-related posts. :)

    My current plan is to have several separate versions of Flotilla, e.g. one for monohulls, cats, SES and ACV. I'm guessing that not everyone who designs monohulls wants to pay for a version that can also handle SES and ACV, and vice versa.

    Here are a few reports that I have produced using Flotilla that show some of its capabilities:

    Performance characteristics of a 260t displacement SES
    http://www.cyberiad.net/library/pdf/giam260a0.pdf

    The hydrodynamic resistance, wave wakes and bottom pressure
    signatures of a 5900t displacement air warfare destroyer
    http://www.cyberiad.net/library/pdf/nibberluna0.pdf

    The wave resistance of a model ACV
    http://www.cyberiad.net/library/pdf/everest_acv.pdf

    I'm at the point of turning these into examples to go along with the various versions. There will also be some exercises for students.

    I think that users will like the ability to estimate ship component weights. For example, there will be options to allow estimation of the structural weight of aluminium catamarans, steel monohulls, etc. I am using "standard" weight components used by the US navy and some other organisations, e.g.
    100 Structure
    200 Propulsion
    ...
    700 Armaments

    The program will also allow estimation of the range of the vessel once the weights are known and the amount of fuel can be estimated.

    I don't plan to output any graphics through Flotilla. Users will have to use gnuplot, Matlab, Scilab, or similar, to display results produced by Flotilla. I will, however, release a small program that produces wave pattern graphics like those shown in the reports given above.

    If I had a financially-capable brain, I'd give you an idea of what I'll be charging, but at this stage I honestly don't have any idea.

    All the best,
    Leo.
     
    1 person likes this.
  9. julien
    Joined: Oct 2008
    Posts: 4
    Likes: 1, Points: 0, Legacy Rep: 28
    Location: France

    julien New Member

    Thank you all for your answers.
    I can't wait to see Flotilla!

    The thing is that as I explained to you before I am doing a multi-objective optimisation and therefore I must have an approach that takes into account the interdependance of the attributes to optimise.
    If I use Godzilla, it will only solve for min resistance...

    I am a bit desapointed because I though that using VBA with the "Shell" command followed by a "sendkeys" I would be able to control Michlet but apparently not...

    But I am abviously still a big fan of michlet!

    Thank you
     
  10. volodim
    Joined: Nov 2008
    Posts: 2
    Likes: 1, Points: 0, Legacy Rep: 28
    Location: France

    volodim New Member


    Hello,

    I'm a friend of julien and I've developed a program to automate julien's task on Michlet. As it helped julien, it may interest other people here on this forum.
    However, since you plan to release a non-free version of your software in the future to automate this kind of work, it is fair to ask if I can share this tool on this forum or not.

    Bear in mind that all this tool does is send a combination of keys to Michlet so that the user does not have to do it himself, it does not alter in any way your program.
     
    1 person likes this.
  11. Leo Lazauskas
    Joined: Jan 2002
    Posts: 2,696
    Likes: 151, Points: 63, Legacy Rep: 2229
    Location: Adelaide, South Australia

    Leo Lazauskas Senior Member

    Thanks for informing me. I have no problem if you aren't modifying my program, i.e. if you are just sending it key sequences. When you have it working I would be happy to put a link to your program on my Michlet page if you are agreeable.

    You misunderstood what I said in relation to "Flotilla". It is a completely different code that has little to do with Michlet. Your work with Julien doesn't affect it at all.

    All the best,
    Leo.
     

  12. volodim
    Joined: Nov 2008
    Posts: 2
    Likes: 1, Points: 0, Legacy Rep: 28
    Location: France

    volodim New Member

    Okay, here is the tool attached with this post.

    1. How to install:
    Simply put automichlet.exe in michlet 8.07 folder, mlt807w.exe should be in the same directory.
    If the program tells you that some DLL are missing, it is because you don't have the .NET Framework installed on your PC, which can be found at this address:
    http://www.microsoft.com/downloads/...FamilyID=10CC340B-F857-4A14-83F5-25634C3BF043


    2. How to use:
    You have to supply your keyboard sequence to the program every time, otherwise is will just open and close. In order to avoid this inconvenience, you can create a .bat file with your desired sequence key.

    Here is an example:
    In julien's case, he wanted the sequence: 'R'-'t'-'ESC'-'ESC'-'ESC'-'y', in order to calculate the resistance and then exit. The exit sequence (esc esc esc y) is mandatory because Michlet will not write into the out file if we don't exit properly.

    This can be done by launching automichlet with:
    automichlet.exe {DELAY=500}+rt{DELAY=1500}{ESC}{DELAY=500}{ESC}{DELAY=500}{ESC}y
    Note that there is no space between the key sequence

    {DELAY=500} will make the program wait 500ms before sending the next key
    + is the SHIFT key, so +r is equal to 'R'
    r, t, y are normal keys
    {ESC} is the escape key

    in this example, after sending the 't' key, this command line will wait 1.5s so that Michlet has time to compute the Resistance. Use and abuse of the {DELAY=x} command if you experience problems :).

    The complete syntax for keys can be found here. It is the library I used to virtually send keys, though if you want to use it as well to create your own program, bear in mind that there's a bug with the ESC key.


    Edit:
    If you want to use it in Excel macro, the command to launch this tool using Julien's example would be:
    Code:
    Shell "e:\perso\michlet\automichlet.exe {DELAY=500}+rt{DELAY=1500}{ESC}{DELAY=500}{ESC}{DELAY=500}{ESC}y", 1
    However, I have tested this feature and it will not work unless you save your excel worksheet in the same directory as Michlet and automichlet.exe, there's a small directory problem in the code but I don't have time right now to solve it.
     

    Attached Files:

Loading...
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.