JGap starting point

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

JGap starting point

cmjones
I would like to use JGap for my project and have had a look at the "makeChange" example but am unsure how to apply it to my project. I have written all the analysis side of the project and am now looking to implement GA.

I am trying to optimize the weight of a truss (example bridge). A truss can modeled as a set of nodes (points) connected together by beams.

Fitness Function:-

 weight of truss = for all bars (  length * area *density )

by varying the following parameters

 1. section sizes of bars  (discrete variables )
 2. shape of the truss ( ie move the nodes) (continous variables

with the following constraints

truss must withstand applied forces

Any suggessting are very welcome

Thanks in advance

chris

Reply | Threaded
Open this post in threaded view
|

Re: JGap starting point

Klaus Meffert-5
Chris,

You can use the mentioned example as a basis. There is a fitness function
class which you can adapt. Also, the main class which sets up the
configuration can be adapted to your needs. The structure in the example is
the right one for your project.

Best

Klaus
www.klaus-meffert.com

 

> -----Original Message-----
> From: cmjones [mailto:[hidden email]]
> Sent: Monday, December 07, 2009 6:45 PM
> To: [hidden email]
> Subject: [jgap-users] JGap starting point
>
>
> I would like to use JGap for my project and have had a look
> at the "makeChange" example but am unsure how to apply it to
> my project. I have written all the analysis side of the
> project and am now looking to implement GA.
>
> I am trying to optimize the weight of a truss (example
> bridge). A truss can modeled as a set of nodes (points)
> connected together by beams.
>
> Fitness Function:-
>
>  weight of truss = for all bars (  length * area *density )
>
> by varying the following parameters
>
>  1. section sizes of bars  (discrete variables )  2. shape of
> the truss ( ie move the nodes) (continous variables
>
> with the following constraints
>
> truss must withstand applied forces
>
> Any suggessting are very welcome
>
> Thanks in advance
>
> chris
>


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|

Re: JGap starting point

cmjones
Klaus thanks for your reply,

I have done what you said but I am not getting the desired outcome at all. Below is the approach I have taken

I have made integer genes for each bar representing a particular Bar section
I have made integer genes representing the x and y cordinates of each node

I want the shape of the truss to evlove into the most efficient shape while still being able to resist the applied forces. Thus I have done the follwoing

fitness += (currentTrussWeight  /  originalTrussWeight) * 100;

for all bars{

   if( bar can withstand internal force){
      fitness += ( barInternalForce  /   allowableForce )  * 100
   }

}


Any more suggestions


Thanks in advance

Chris
Reply | Threaded
Open this post in threaded view
|

Re: JGap starting point

Klaus Meffert-5
Chris,

could you exactly describe your problem?
Alternatively: Maybe is it possible to get your source code (or at least a
simplified version of it that shows the problem)?

Best

Klaus
www.klaus-meffert.com

 

> -----Original Message-----
> From: cmjones [mailto:[hidden email]]
> Sent: Friday, December 11, 2009 11:07 AM
> To: [hidden email]
> Subject: Re: [jgap-users] JGap starting point
>
>
> Klaus thanks for your reply,
>
> I have done what you said but I am not getting the desired
> outcome at all.
> Below is the approach I have taken
>
> I have made integer genes for each bar representing a
> particular Bar section I have made integer genes representing
> the x and y cordinates of each node
>
> I want the shape of the truss to evlove into the most
> efficient shape while still being able to resist the applied
> forces. Thus I have done the follwoing
>
> fitness += (currentTrussWeight  /  originalTrussWeight) * 100;
>
> for all bars{
>
>    if( bar can withstand internal force){
>       fitness += ( barInternalForce  /   allowableForce )  * 100
>    }
>
> }
>
>
> Any more suggestions
>
>
> Thanks in advance
>
> Chris
> --
> View this message in context:
> http://old.nabble.com/JGap-starting-point-tp26678997p26741639.html
> Sent from the jgap-users mailing list archive at Nabble.com.
>
>
> --------------------------------------------------------------
> ----------------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> _______________________________________________
> jgap-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jgap-users


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users