onclave / NSGA-II

an implementation of NSGA-II in java
MIT License
44 stars 23 forks source link

I am working on my nsga2 problem #4

Open akhsa234 opened 4 years ago

akhsa234 commented 4 years ago

I should optimize my own problem. I do not how to data structure it correctly. plz, help me.

my problem has 10 different decision variables. each one has different attributes.

for example, x1 has the upper bound, lower bound, specific name, decision variable type, decision function type, decision function type parameters.

x1 variable name,upper bound, lower bound : ("quantity_A", 200, 750)

decision variable type : "quantity_A", "Real"

decision function type : triangle

decision function type parameters :{ 24, 380, 528 }

or x2 variable name,upper bound, lower bound : ("quantity_B", 200, 650)

decision variable type : "quantity_B", "Real"

decision function type : Normal

decision function type parameters :{ ,'mu',330,'sigma', 96.6 }

I think hash table is good option? what do you think?

I had decision variable class. I feel that It is better to define inner class for defining decision function class. I am confused.

thanks.

onclave commented 4 years ago

I could not understand your query. Kindly elaborate your problem statement with more details. Are you having any problem while using this package?

akhsa234 commented 4 years ago

hi. actually, I did not use your package. I working in my own code. I study some of your code because you work on general nsga2. My problem is more complex; If you can help me. I appreciate it.

I have 10 decision variable with 5 attributes. I need to store them in my decision variable class. Do you think that hash table is okay ? I work with c#.

for example I have x with x upper bound is 750 and lower bound is 200. x has Triangular distribution function with these parameters ('a',24,'b',380,'c',528); x has result at the end based of distribution function x = 320

also

y upper bound is 650 and lower bound is 200. x has Normal distribution function with these parameters ('mu',330,'sigma', 96.6); y has result at the end based of distribution function x = 440

I need to send these x.result and y.result and the others to optimization problem class to evaluate the 10 chromosomes in Arena 14 simulation and gain 2 objective function which called customer backlogged time and whole cost of production.

Did you get what I am talking about??

x = (key: x, upper _bound value:750, lower _bound value:200, Decision _Variable _Type value:Real, Distribution Function Type value:Triangular , inputs value:[ 24,380,528]) y = (key: y, upper _bound value:650, lower _bound value:200, Decision _Variable _Type value:Real, Distribution Function Type value: Normal , inputs value:[330, 96.6])

chromosome(1) ----> optimization problem[0] = (x=300, y=330 , .......) result of optimization objective function: (time= 6000 min, cost=3 m$)

you did not develop this part because you do not have actual problem.

thanks. I am looking forward to hearing from you.

bahar saremi

On Tue, Jun 2, 2020 at 10:43 AM Debabrata Acharya notifications@github.com wrote:

I could not understand your query. Kindly elaborate your problem statement with more details. Are you having any problem while using this package?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/onclave/NSGA-II/issues/4#issuecomment-637301678, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOIEUCCNUMTEXOJWFNY3473RUSJ73ANCNFSM4NN2Y3AQ .

onclave commented 4 years ago

@akhsa234 a few questions:

  1. What exactly is x and y? What do they represent in your problem?
  2. Is each chromosome considered to be a solution to a different optimization problem? Your explanation is a bit confusing to me.

Normally, no matter what problem you are trying to solve with any GA, each "chromosome" should denote "one probable solution" to your problem. GAs are really meta-heuristic problems, hence, it's generic idea is problem-independent. My advice is, how you encode your solution as a chromosome is where you should spend time first. It may be a very simple encoding, or a very complex process, depending on the problem you are solving.

Coming to the usability of this package, if you are considering NSGA-II, this package will definitely help you put together your problem. All you have to do is implement the specifics that you need constrained to your exact problem. Once you plugin the individual pieces to the package, the package shall help you run the NSGA-II algorithm no matter how you have deviced your problem.

There are already a few complex problems I'm solving using this package (the reason behind writing this package) and I'm quite confident of its ability to be customized to any use case.

That said, if you do find some aspect that cannot be implemented with the package, do let me know, and I'll be happy to add support for it.

If you are confused about how to use this package, you can come up with the rough sketch of how you intend to solve your problem using GA, like, how to encode your chromosome, what objective functions you intend to use, how to take your dataset as input, etc., and then I can help you with how to use this package around your problem.

Thanks!

akhsa234 commented 4 years ago
  1. What exactly is x and y? What do they represent in your problem?

    in real world, each chromosome can be static or dynamic. in my problem set, there are 10 chromosome. they are not static such as 20 or 1000, or so on. they produce from distribution function. Do you know about distribution function? such as normal ,... in my case each chromosome before produced should be called decision variable. each decision variable has different fields, as I explain it before.

x is one of 10 decision variable. x ---> [200,750] distribution function : x~N(mu: 330, sigma: 96.6) each problem has their own type in operation research such as Real, integer, linear, ...... If you pass static or operation research; you can get what I am saying.

nsga2 and other meta-heuristic algorithms are used to solved complex operation research problems.

so I need to store each of decision variables before produced chromosome. x: decision variable one is the result of x~N(mu: 330, sigma: 96.6) = 340. for example, my chromosome set is [x1= 340, x2=400,x3=500,x4=440, x5=600, r1=900,r2=1100,r3=1020, r4= 1153,r5= 1200]

I optimize the stochastic problem the whole cost production and the backlogged time of costumers of one automation company. they-chromosomes- are not static they are stochastic.

I could not use your package because I am working on simulation optimization problem. In real world, If you study statistic you know each population has their own distribution function.

Did you get what I am talking about???🤔

  1. Is each chromosome considered to be a solution to a different optimization problem?

I do have 10 chromosomes with 2 results which are called objective functions in operation research.

[x1= 340, x2=400,x3=500,x4=440, x5=600, r1=900,r2=1100,r3=1020, r4= 1153,r5= 1200] ---->[ Total cost = 351311521.6468 , wating Time= 4809.9083 s]

I coded this problem with Matlab last year; I working to make it more efficient with c#.

If i make you confused, I am sorry. I just ask you to help me to correct these 2 classes- decision variable class and optimization problem class- which you called chromosome.

thanks. I am looking forward to hearing from you.

On Fri, Jun 5, 2020 at 5:37 AM Debabrata Acharya notifications@github.com wrote:

@akhsa234 https://github.com/akhsa234 a few questions:

  1. What exactly is x and y? What do they represent in your problem?
  2. Is each chromosome considered to be a solution to a different optimization problem? Your explanation is a bit confusing to me.

Normally, no matter what problem you are trying to solve with any GA, each "chromosome" should denote "one probable solution" to your problem. GAs are really meta-heuristic problems, hence, it's generic idea is problem-independent. My advice is, how you encode your solution as a chromosome is where you should spend time first. It may be a very simple encoding, or a very complex process, depending on the problem you are solving.

Coming to the usability of this package, if you are considering NSGA-II, this package will definitely help you put together your problem. All you have to do is implement the specifics that you need constrained to your exact problem. Once you plugin the individual pieces to the package, the package shall help you run the NSGA-II algorithm no matter how you have deviced your problem.

There are already a few complex problems I'm solving using this package (the reason behind writing this package) and I'm quite confident of its ability to be customized to any use case.

That said, if you do find some aspect that cannot be implemented with the package, do let me know, and I'll be happy to add support for it.

If you are confused about how to use this package, you can come up with the rough sketch of how you intend to solve your problem using GA, like, how to encode your chromosome, what objective functions you intend to use, how to take your dataset as input, etc., and then I can help you with how to use this package around your problem.

Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/onclave/NSGA-II/issues/4#issuecomment-639198604, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOIEUCD3532DPMBIQ5CDDOLRVBALZANCNFSM4NN2Y3AQ .