Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GA features update - Having multi-objective optimization (NSGA-II ) #2326

Open
wants to merge 128 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
061058e
NSGA-II implementation with properly printing optimal solutions at th…
JunyungKim Feb 19, 2023
ab4315c
Unnecessary changes in DataSet.py have been removed.
JunyungKim Feb 19, 2023
8b7f5d3
Unnecessary changes in DataSet.py have been removed.
JunyungKim Feb 19, 2023
3fcde82
ZDT test is added.
JunyungKim Feb 22, 2023
15debe4
Optimizer.py and RavenSampled.py are updated after having regression …
JunyungKim Feb 24, 2023
64510df
minor update on Optimizer.py
JunyungKim Feb 24, 2023
b1f0c3f
temporary fix, not the way I want
Jimmy-INL Mar 11, 2023
52389c3
NSGA-II testing fiels (multiSum wConstratint and ZDT1) are added.
JunyungKim Mar 13, 2023
391b9c3
moving models, xmls, and trying to resolve GD after converting object…
Jimmy-INL Mar 14, 2023
da9e0dd
fixing simulated annealing to accept a list of objectives
Jimmy-INL Mar 21, 2023
1fd2175
fixing rook to compare infs
Jimmy-INL Mar 22, 2023
7cedf83
Merge branch 'junyung-Mohammad-NSGAII' into JunyungKim-junyung-Mohamm…
Jimmy-INL Mar 22, 2023
305c2ac
making one mod in RAVENSAmpled
Jimmy-INL Apr 1, 2023
c820eea
making self._minMax a list
Jimmy-INL Apr 3, 2023
21bf42d
erroring out if type is not in ['min', 'max']
Jimmy-INL Apr 3, 2023
e639803
updating HERON to b316024
Jimmy-INL Apr 3, 2023
12e11f0
Merge branch 'devel' into enablingMinMaxList
Jimmy-INL Apr 3, 2023
be64a4d
updating dependencies
Jimmy-INL Apr 4, 2023
ccde4d9
Merge branch 'enablingMinMaxList' of github.com:Jimmy-INL/raven into …
Jimmy-INL Apr 4, 2023
95682a1
removing a trailing space
Jimmy-INL Apr 4, 2023
c3688e2
removing windows line endings
Jimmy-INL Apr 4, 2023
e25cc37
change to unix ending
Jimmy-INL Apr 5, 2023
f0d1412
adding the zdt_model.py
Jimmy-INL Apr 5, 2023
c2ca46e
converting zdt to unix line endings
Jimmy-INL Apr 5, 2023
1f1b969
Juan's change to simulateData for the interface
Jimmy-INL Apr 6, 2023
c7aebf3
resolving diff based on different batch Size, thanks @wangcj05
Jimmy-INL Apr 6, 2023
64e97a9
converting SimukateData.py to unix line endings
Jimmy-INL Apr 8, 2023
b29661b
regolding to print all batches in MOO
Jimmy-INL Apr 11, 2023
9626956
slight mods
Jimmy-INL Apr 12, 2023
34d5cb2
regolding and reverting inf in fitness
Jimmy-INL Apr 12, 2023
e0df314
trying to add all outputs to the rlz
Jimmy-INL Apr 12, 2023
c0476f7
adding everything to bestPoint
Jimmy-INL Apr 13, 2023
81dc580
chenging type==str to len(self._objectVar) == 1
Jimmy-INL Apr 13, 2023
3f27965
removing unnecessary if statement, this needs revisiting
Jimmy-INL Apr 18, 2023
facf74e
modifying reverting cycle length to its value not the inverse
Jimmy-INL Apr 20, 2023
a92049c
simulateData updating cost model.
Jun 12, 2023
0faeb9c
minor change is made in ZDT1 test.
JunyungKim Jul 15, 2023
e9ea9a2
Merge branch 'enablingMinMaxList' of https://github.com/Jimmy-INL/rav…
JunyungKim Jul 17, 2023
dbad22c
myConstraints for MultiSum is updated.
JunyungKim Jul 27, 2023
699b3de
Two issues are resolved: population and objective value mismatch, min…
JunyungKim Aug 8, 2023
8cffedb
minor things are corrected. Nothing important.
JunyungKim Aug 8, 2023
9f4eecd
Additional minor changes are made. Nothing important.
JunyungKim Aug 8, 2023
2487621
Additional minor change is made. Nothing important.
JunyungKim Aug 8, 2023
3657634
fitness data structure is changed from data xarray to dataSet. It wor…
Aug 30, 2023
285575f
single objective optimization works well with three different types o…
Aug 31, 2023
7707f67
NSGA-II improvement is in progress.
Sep 4, 2023
a32a45c
fitness-based NSGA-II is in progress. min-min is working well with to…
Sep 6, 2023
a9577f4
NSGA-II fitness-based rank and CD calcuration is completed. Temporary…
Sep 7, 2023
9b42d7d
minor bugs are fixed.
Sep 10, 2023
f6ecb5f
Every type of fitness is now working with newly updated GA interface …
Sep 17, 2023
8a26285
multi-objective optimization using invLinear and logistics now works.
Sep 21, 2023
51eb867
constraint handling for single and multi objective optimization in _u…
Sep 21, 2023
061c3bc
1. If-else statement for survivorSelection in _useRealization is remo…
Sep 25, 2023
59d43e1
1. Mohammad's comments are reflected; 2. Unneccesary if-else statemen…
Sep 26, 2023
8fb32c3
1. missing descriptions of self are added.
Sep 26, 2023
4dc0e57
tournamentSelection method in parentSelectors.py is enhanced followin…
JunyungKim Oct 14, 2023
4f457fe
tournamemntSelection for multi-objective is completed. RouletteWheel …
JunyungKim Oct 15, 2023
9d27568
simpleKnapsackTournament optOut file is regoldened. Final solution is…
JunyungKim Oct 15, 2023
255b58f
Comments from Mohammad are reflected.
JunyungKim Jan 29, 2024
f1ad2b3
Minor fixes to the fitness though a list of objective and penalty wei…
Jimmy-INL Jan 29, 2024
fae31be
Merge branch 'Junyung-Jimmy-enablingMinMaxList' into JunyungLatest-en…
JunyungKim Jan 29, 2024
ea59893
Merge pull request #3 from Jimmy-INL/JunyungLatest-enablingMinMaxList
JunyungKim Jan 29, 2024
d23ef44
test file for multi-objective optimization changed: the number of ite…
JunyungKim Jan 29, 2024
df6b98d
Junyung-Jimmy-enablingMinMaxList_vf_desk is merged to most-updated de…
Feb 26, 2024
f564f29
devel is merged with enabling MinMaxList_vf_desk.
Mar 4, 2024
02a961e
Modifications are done: All unit tests and GeneticAlgorithms-related …
JunyungKim Mar 6, 2024
ed460f9
SimulateData.py is now identical with the one from devel branch.
JunyungKim Mar 6, 2024
f339bf3
GeneticAlgorithm.py is updated. new file beale_flipped2.py is added. …
JunyungKim Mar 6, 2024
261799a
Issues that RAVEN could not catch error when non-rankNCrowdingBased s…
JunyungKim Mar 20, 2024
677b474
RAVEN Manual related changes only are made.
JunyungKim Apr 2, 2024
cf67660
Minor changes are made. Functionally identical, just for readibility …
JunyungKim Apr 2, 2024
916eda0
two methods related to survivorSelectors are moved to survivorSelecto…
JunyungKim Apr 2, 2024
366974e
Some comments are left in fitness.py for future reference. invLinear …
JunyungKim Apr 2, 2024
ceb701d
Some comments are left in fitness.py for future reference. invLinear …
JunyungKim Apr 2, 2024
35e65e7
Some comments are added/deleted.
JunyungKim Apr 2, 2024
c8ac5c9
some files in NSGAII folder which are already relocated to other fold…
JunyungKim Apr 2, 2024
ce0aaad
commentations and code cleaning is dnoe in GeneticAlgorithm.py. Funct…
JunyungKim Apr 2, 2024
cfd5b31
rlzDict in def _resolveNewGenerationMulti is updated to avoid SIMULAT…
JunyungKim Apr 3, 2024
9d8941c
user manual related update - Equation correction
JunyungKim Apr 3, 2024
a055d68
Merge branch 'devel' into Junyung-Jimmy-NSGAII-ManualUpdate-DefectsFix
JunyungKim Apr 3, 2024
580cad8
user manual related update - Equation correction
JunyungKim Apr 3, 2024
06f4a46
very minor change made for user manuel.
JunyungKim Apr 3, 2024
a903939
survivorSelection.py is created.
JunyungKim Apr 3, 2024
8482a39
contaminated HERON and TEAL is now back to RAVEN.
May 23, 2024
97a20bc
the branch, Junyung-Jimmy-NSGAII-ManualUpdate-DefectsFix, is now merg…
May 23, 2024
372f384
trailing whitespaces are removed.
May 23, 2024
289094e
Issues created due to having objective variable type be List are part…
May 23, 2024
7b66055
MultiObjective_Beale-Bealeflipped is added.
May 23, 2024
a255665
adding gold files and initial fix in RavenSampled.py
Jimmy-INL Jun 4, 2024
52717ae
relaxing image rel error for one test and changing setuptools in the …
Jimmy-INL Jun 4, 2024
0abf956
readding TEAL to .gitmodules
Jimmy-INL Jun 7, 2024
5e3d977
resolving dependencies conflict
Jimmy-INL Jun 7, 2024
460b79b
adding missing dockstrings
Jimmy-INL Jun 8, 2024
7916f3a
removing adaptive mutation and crossover
Jimmy-INL Jun 8, 2024
b5c7e02
adding __init__.py for the pip install
Jimmy-INL Jun 10, 2024
bc9ab9f
updating xarray version to 2024
Jimmy-INL Jun 10, 2024
f9272a4
updating xarray version to 2023.12
Jimmy-INL Jun 11, 2024
beaba5a
updating xarray version to 2023.12
Jimmy-INL Jun 11, 2024
163eb87
updating xarray version to 2023.12
Jimmy-INL Jun 11, 2024
eadd2d4
relaxing images rel error
Jimmy-INL Jun 12, 2024
bfc0157
trying to make it print first iteration after moving function in surv…
Jimmy-INL Jun 19, 2024
ca2bd63
pushing the gold files for a new test
Jimmy-INL Jun 19, 2024
e52c609
removing commented lines and relaxing image tolerance
Jimmy-INL Jun 20, 2024
66822ee
removing a white space
Jimmy-INL Jun 20, 2024
729187c
relaxing image diff
Jimmy-INL Jun 20, 2024
ba8fc08
writing only final result for beale
Jimmy-INL Jul 12, 2024
9f77186
writing only final result for beale
Jimmy-INL Jul 14, 2024
bce105e
Merge branch 'idaholab:devel' into Junyung-Jimmy-NSGAII-ManualUpdate-…
JunyungKim Sep 9, 2024
3706ddd
Comments from Diego and Conjian are addressed.
JunyungKim Sep 9, 2024
d20eee8
dependencies.xml is updated.
JunyungKim Sep 9, 2024
b2cd4b7
additional Congjian's comment is addressed.
JunyungKim Sep 9, 2024
014dae4
dependencies.xml is updated - it is identical with Devel.
JunyungKim Sep 10, 2024
d6c84de
NSGA-II branch is merged to up-to-date devel branch.
JunyungKim Sep 17, 2024
730d7a4
white spacing in those two files are removed.
JunyungKim Sep 18, 2024
2598e56
adding a multiobjective optimation example to the manual
Jimmy-INL Oct 2, 2024
6f0cc9e
Merge branch 'devel' into Junyung-Jimmy-NSGAII-ManualUpdate-DefectsFi…
alfoa Oct 4, 2024
e7ec6b9
addressing comments related to fitness.py
Jimmy-INL Oct 14, 2024
2f5b3e6
combining constraint Handling and regolding some tests
Jimmy-INL Oct 15, 2024
789baea
removing commented lines
Jimmy-INL Oct 15, 2024
ae71e15
Adding xml files for logistic to reflect scale and shift parameters
Jimmy-INL Oct 16, 2024
945505c
regolding
Jimmy-INL Oct 29, 2024
8307dd1
regolding
Jimmy-INL Nov 15, 2024
4089ffd
modifying unit test
Jimmy-INL Nov 16, 2024
e49f166
shortening a test so as not to timeout
Jimmy-INL Nov 16, 2024
9154004
regolding PARCS
Jimmy-INL Nov 16, 2024
6f3e814
modifying and adding dockstrings to constraintHandleing.py
Jimmy-INL Nov 17, 2024
89ce09e
adding scale and shift to fitness schema in genetic algorithms
Jimmy-INL Nov 17, 2024
42fa539
asking multiobjective to print only final. Currently it prints it sev…
Jimmy-INL Nov 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Note all install methods after "main" take
<scikit-learn>1.0</scikit-learn>
<pandas/>
<!-- Note most versions of xarray work, but some (such as 0.20) don't -->
<xarray>2023</xarray>
<xarray>2023.12</xarray>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to change to this specific version?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, @joshua-cogliati-inl suggested this as it was causing diffs in the tests

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, you may check PR #2365 (review) for library changes and try to avoid conflicts.

<netcdf4 source="pip">1.6</netcdf4>
<matplotlib>3.5</matplotlib>
<statsmodels>0.13</statsmodels>
Expand Down Expand Up @@ -106,4 +106,4 @@ Note all install methods after "main" take
<python>remove</python>
<nomkl>remove</nomkl>
</alternate>
</dependencies>
</dependencies>
2 changes: 2 additions & 0 deletions developer_tools/XSDSchemas/Optimizers.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@
<xsd:all>
<xsd:element name="a" type="xsd:float" minOccurs="0" maxOccurs='1'/>
<xsd:element name="b" type="xsd:float" minOccurs="0" maxOccurs='1'/>
<xsd:element name="scale" type="xsd:float" minOccurs="0" maxOccurs='1'/>
<xsd:element name="shift" type="xsd:float" minOccurs="0" maxOccurs='1'/>
</xsd:all>
<xsd:attribute name="type" type="xsd:string" />
</xsd:complexType>
Expand Down
112 changes: 105 additions & 7 deletions doc/user_manual/generated/generateOptimizerDoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def insertSolnExport(tex, obj):
</samplerInit>

<GAparams>
<populationSize>20</populationSize>
<populationSize>10</populationSize>
Jimmy-INL marked this conversation as resolved.
Show resolved Hide resolved
<parentSelection>rouletteWheel</parentSelection>
<reproduction>
<crossover type="onePointCrossover">
Expand All @@ -177,32 +177,32 @@ def insertSolnExport(tex, obj):

<variable name="x1">
<distribution>uniform_dist_woRepl_1</distribution>
<initial>1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20</initial>
<initial>1,2,3,4,5,6,7,8,9,10</initial>
</variable>

<variable name="x2">
<distribution>uniform_dist_woRepl_1</distribution>
<initial>2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1</initial>
<initial>2,3,4,5,6,7,8,9,10,1</initial>
</variable>

<variable name="x3">
<distribution>uniform_dist_woRepl_1</distribution>
<initial>3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2</initial>
<initial>3,4,5,6,7,8,9,10,1,2</initial>
</variable>

<variable name="x4">
<distribution>uniform_dist_woRepl_1</distribution>
<initial>4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3</initial>
<initial>4,5,6,7,8,9,10,1,2,3</initial>
</variable>

<variable name="x5">
<distribution>uniform_dist_woRepl_1</distribution>
<initial>5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4</initial>
<initial>5,6,7,8,9,10,1,2,3,4</initial>
</variable>

<variable name="x6">
<distribution>uniform_dist_woRepl_1</distribution>
<initial>6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5</initial>
<initial>6,7,8,9,10,1,2,3,4,5</initial>
</variable>

<objective>ans</objective>
Expand All @@ -212,6 +212,104 @@ def insertSolnExport(tex, obj):
</Optimizers>
\end{lstlisting}

\hspace{24pt}
Multiobjective optimization: Non Dominating Sorting GA (NSGA-II) Example:

\begin{lstlisting}[style=XML]
<Optimizers>
<GeneticAlgorithm name="GAopt">
<samplerInit>
<limit>15</limit>
<initialSeed>42</initialSeed>
<writeSteps>every</writeSteps>
<type>min,min</type>
</samplerInit>

<GAparams>
<populationSize>10</populationSize>
<parentSelection>tournamentSelection</parentSelection>
<reproduction>
<crossover type="twoPointsCrossover">
<crossoverProb>1.0</crossoverProb>
</crossover>
<mutation type="randomMutator">
<mutationProb>1.0</mutationProb>
</mutation>
</reproduction>
<fitness type="feasibleFirst">
</fitness>
<survivorSelection>rankNcrowdingBased</survivorSelection>
</GAparams>

<convergence>
<AHDp>0.0</AHDp>
</convergence>

<variable name="x1">
<distribution>unifDist</distribution>
</variable>
<variable name="x2">
<distribution>unifDist</distribution>
</variable>
<variable name="x3">
<distribution>unifDist</distribution>
</variable>
<objective>obj1, obj2 </objective>
<TargetEvaluation class="DataObjects" type="PointSet">optOut</TargetEvaluation>
<Sampler class="Samplers" type="MonteCarlo">MC_samp</Sampler>
</GeneticAlgorithm>
</Optimizers>
\end{lstlisting}
"""

minimalGeneticAlgorithmMultiObjective = r"""
\hspace{24pt}
Genetic Algorithm Example:
\begin{lstlisting}[style=XML]
<Optimizers>
<GeneticAlgorithm name="GAopt">
<samplerInit>
<limit>15</limit>
<initialSeed>42</initialSeed>
<writeSteps>every</writeSteps>
<type>min,min</type>
</samplerInit>

<GAparams>
<populationSize>10</populationSize>
<parentSelection>tournamentSelection</parentSelection>
<reproduction>
<crossover type="twoPointsCrossover">
<crossoverProb>1.0</crossoverProb>
</crossover>
<mutation type="randomMutator">
<mutationProb>1.0</mutationProb>
</mutation>
</reproduction>
<fitness type="feasibleFirst">
</fitness>
<survivorSelection>rankNcrowdingBased</survivorSelection>
</GAparams>

<convergence>
<AHDp>0.0</AHDp>
</convergence>

<variable name="x1">
<distribution>unifDist</distribution>
</variable>
<variable name="x2">
<distribution>unifDist</distribution>
</variable>
<variable name="x3">
<distribution>unifDist</distribution>
</variable>
<objective>obj1, obj2 </objective>
<TargetEvaluation class="DataObjects" type="PointSet">optOut</TargetEvaluation>
<Sampler class="Samplers" type="MonteCarlo">MC_samp</Sampler>
</GeneticAlgorithm>
</Optimizers>
\end{lstlisting}
"""

minimalBayesianOptimizer = r"""
Expand Down
Loading