From 18735abcbdb3112526e578ee2f6baa46a27b4185 Mon Sep 17 00:00:00 2001
From: "americo.cunhajr@gmail.com"
<36556019+americocunhajr@users.noreply.github.com>
Date: Mon, 2 Dec 2024 01:28:05 -0300
Subject: [PATCH] Upload Case02
---
FraCTune-1.0/Case2-EnergyHarvester/.DS_Store | Bin 0 -> 6148 bytes
.../Case2-EnergyHarvester/Basinofattraction.m | 82 ++
FraCTune-1.0/Case2-EnergyHarvester/CEopt.m | 1216 +++++++++++++++++
.../FOSMCControllerEH.slx | Bin 0 -> 125251 bytes
.../MainCEoptCase2_FOSMC.m | 109 ++
.../MainCEoptCase2_SMC.m | 103 ++
.../MainGAoptCase2_FOSMC.m | 122 ++
.../MainGAoptCase2_SMC.m | 115 ++
.../Results_and_Plots/.DS_Store | Bin 0 -> 6148 bytes
.../Results_and_Plots/Basin_CE_FOSMC.mat | Bin 0 -> 1581 bytes
.../Results_and_Plots/Basin_CE_SMC.mat | Bin 0 -> 337 bytes
.../Results_and_Plots/Basin_GA_FOSMC.mat | Bin 0 -> 257 bytes
.../Results_and_Plots/Basin_GA_SMC.mat | Bin 0 -> 337 bytes
.../Results_and_Plots/FOSMC_GA/GA_FOSMC.mat | Bin 0 -> 1333 bytes
.../FOSMC_GA/funcaoobjetivo_per_generations.m | 88 ++
.../Results_and_Plots/FOSMC_GA/gen_0000.mat | Bin 0 -> 4781 bytes
.../Results_and_Plots/FOSMC_GA/gen_0001.mat | Bin 0 -> 3872 bytes
.../Results_and_Plots/FOSMC_GA/gen_0002.mat | Bin 0 -> 3341 bytes
.../Results_and_Plots/FOSMC_GA/gen_0003.mat | Bin 0 -> 2955 bytes
.../Results_and_Plots/FOSMC_GA/gen_0004.mat | Bin 0 -> 2574 bytes
.../Results_and_Plots/FOSMC_GA/gen_0005.mat | Bin 0 -> 2413 bytes
.../Results_and_Plots/FOSMC_GA/gen_0006.mat | Bin 0 -> 2225 bytes
.../Results_and_Plots/FOSMC_GA/gen_0007.mat | Bin 0 -> 2083 bytes
.../Results_and_Plots/FOSMC_GA/gen_0008.mat | Bin 0 -> 1950 bytes
.../Results_and_Plots/FOSMC_GA/gen_0009.mat | Bin 0 -> 1902 bytes
.../Results_and_Plots/FOSMC_GA/gen_0010.mat | Bin 0 -> 1866 bytes
.../Results_and_Plots/FOSMC_GA/gen_0011.mat | Bin 0 -> 1811 bytes
.../Results_and_Plots/FOSMC_GA/gen_0012.mat | Bin 0 -> 1713 bytes
.../Results_and_Plots/FOSMC_GA/gen_0013.mat | Bin 0 -> 1634 bytes
.../Results_and_Plots/FOSMC_GA/gen_0014.mat | Bin 0 -> 1493 bytes
.../Results_and_Plots/FOSMC_GA/gen_0015.mat | Bin 0 -> 1462 bytes
.../Results_and_Plots/FOSMC_GA/gen_0016.mat | Bin 0 -> 1459 bytes
.../Results_and_Plots/FOSMC_GA/gen_0017.mat | Bin 0 -> 1463 bytes
.../Results_and_Plots/FOSMC_GA/gen_0018.mat | Bin 0 -> 1392 bytes
.../Results_and_Plots/FOSMC_GA/gen_0019.mat | Bin 0 -> 1261 bytes
.../Results_and_Plots/FOSMC_GA/gen_0020.mat | Bin 0 -> 1264 bytes
.../Results_and_Plots/FOSMC_GA/gen_0021.mat | Bin 0 -> 1286 bytes
.../Results_and_Plots/FOSMC_GA/gen_0022.mat | Bin 0 -> 1296 bytes
.../Results_and_Plots/FOSMC_GA/gen_0023.mat | Bin 0 -> 1281 bytes
.../Results_and_Plots/FOSMC_GA/gen_0024.mat | Bin 0 -> 1292 bytes
.../Results_and_Plots/FOSMC_GA/gen_0025.mat | Bin 0 -> 1278 bytes
.../Results_and_Plots/FOSMC_GA/gen_0026.mat | Bin 0 -> 1367 bytes
.../Results_and_Plots/FOSMC_GA/gen_0027.mat | Bin 0 -> 1442 bytes
.../Results_and_Plots/FOSMC_GA/gen_0028.mat | Bin 0 -> 1397 bytes
.../Results_and_Plots/FOSMC_GA/gen_0029.mat | Bin 0 -> 1384 bytes
.../Results_and_Plots/FOSMC_GA/gen_0030.mat | Bin 0 -> 1357 bytes
.../Results_and_Plots/FOSMC_GA/gen_0031.mat | Bin 0 -> 1343 bytes
.../Results_and_Plots/FOSMC_GA/gen_0032.mat | Bin 0 -> 1303 bytes
.../Results_and_Plots/FOSMC_GA/gen_0033.mat | Bin 0 -> 1291 bytes
.../Results_and_Plots/FOSMC_GA/gen_0034.mat | Bin 0 -> 1315 bytes
.../Results_and_Plots/FOSMC_GA/gen_0035.mat | Bin 0 -> 1265 bytes
.../Results_and_Plots/FOSMC_GA/gen_0036.mat | Bin 0 -> 1227 bytes
.../Results_and_Plots/FOSMC_GA/gen_0037.mat | Bin 0 -> 1150 bytes
.../Results_and_Plots/FOSMC_GA/gen_0038.mat | Bin 0 -> 1152 bytes
.../Results_and_Plots/FOSMC_GA/gen_0039.mat | Bin 0 -> 1162 bytes
.../Results_and_Plots/FOSMC_GA/gen_0040.mat | Bin 0 -> 1123 bytes
.../Results_and_Plots/FOSMC_GA/gen_0041.mat | Bin 0 -> 1083 bytes
.../Results_and_Plots/FOSMC_GA/gen_0042.mat | Bin 0 -> 1050 bytes
.../Results_and_Plots/FOSMC_GA/gen_0043.mat | Bin 0 -> 1042 bytes
.../Results_and_Plots/FOSMC_GA/gen_0044.mat | Bin 0 -> 1048 bytes
.../Results_and_Plots/FOSMC_GA/gen_0045.mat | Bin 0 -> 1119 bytes
.../Results_and_Plots/FOSMC_GA/gen_0046.mat | Bin 0 -> 1101 bytes
.../Results_and_Plots/FOSMC_GA/gen_0047.mat | Bin 0 -> 1107 bytes
.../Results_and_Plots/FOSMC_GA/gen_0048.mat | Bin 0 -> 1119 bytes
.../Results_and_Plots/FOSMC_GA/gen_0049.mat | Bin 0 -> 1096 bytes
.../Results_and_Plots/FOSMC_GA/gen_0050.mat | Bin 0 -> 1135 bytes
.../Results_and_Plots/FOSMC_GA/gen_0051.mat | Bin 0 -> 1149 bytes
.../Results_and_Plots/FOSMC_GA/gen_0052.mat | Bin 0 -> 1150 bytes
.../Results_and_Plots/FOSMC_GA/gen_0053.mat | Bin 0 -> 1199 bytes
.../Results_and_Plots/FOSMC_GA/gen_0054.mat | Bin 0 -> 1191 bytes
.../Results_and_Plots/FOSMC_GA/gen_0055.mat | Bin 0 -> 1206 bytes
.../Results_and_Plots/FOSMC_GA/gen_0056.mat | Bin 0 -> 1192 bytes
.../Results_and_Plots/FOSMC_GA/gen_0057.mat | Bin 0 -> 1147 bytes
.../Results_and_Plots/FOSMC_GA/gen_0058.mat | Bin 0 -> 1210 bytes
.../Results_and_Plots/FOSMC_GA/gen_0059.mat | Bin 0 -> 1115 bytes
.../Results_and_Plots/FOSMC_GA/gen_0060.mat | Bin 0 -> 1054 bytes
.../Results_and_Plots/FOSMC_GA/gen_0061.mat | Bin 0 -> 1078 bytes
.../Results_and_Plots/FOSMC_GA/gen_0062.mat | Bin 0 -> 1099 bytes
.../Results_and_Plots/FOSMC_GA/gen_0063.mat | Bin 0 -> 1164 bytes
.../Results_and_Plots/FOSMC_GA/gen_0064.mat | Bin 0 -> 1260 bytes
.../Results_and_Plots/FOSMC_GA/gen_0065.mat | Bin 0 -> 1393 bytes
.../Results_and_Plots/GA_FOSMC.mat | Bin 0 -> 1333 bytes
.../Results_and_Plots/GA_SMC.mat | Bin 0 -> 793 bytes
.../Plot_Basins_of_attraction.m | 34 +
.../Results_and_Plots/Plot_Results_EH.m | 333 +++++
.../Results_and_Plots/Results_CE_FOSMC.mat | Bin 0 -> 24661 bytes
.../Results_and_Plots/Results_CE_SMC.mat | Bin 0 -> 13788 bytes
.../Results_and_Plots/Results_GA_FOSMC.mat | Bin 0 -> 28379 bytes
.../Results_and_Plots/Results_GA_SMC.mat | Bin 0 -> 27682 bytes
.../Results_and_Plots/SMC_GA/GA_SMC.mat | Bin 0 -> 793 bytes
.../SMC_GA/funcaoobjetivo_per_generations.m | 88 ++
.../Results_and_Plots/SMC_GA/gen_0000.mat | Bin 0 -> 2163 bytes
.../Results_and_Plots/SMC_GA/gen_0001.mat | Bin 0 -> 1900 bytes
.../Results_and_Plots/SMC_GA/gen_0002.mat | Bin 0 -> 1682 bytes
.../Results_and_Plots/SMC_GA/gen_0003.mat | Bin 0 -> 1359 bytes
.../Results_and_Plots/SMC_GA/gen_0004.mat | Bin 0 -> 1238 bytes
.../Results_and_Plots/SMC_GA/gen_0005.mat | Bin 0 -> 1111 bytes
.../Results_and_Plots/SMC_GA/gen_0006.mat | Bin 0 -> 1060 bytes
.../Results_and_Plots/SMC_GA/gen_0007.mat | Bin 0 -> 1022 bytes
.../Results_and_Plots/SMC_GA/gen_0008.mat | Bin 0 -> 894 bytes
.../Results_and_Plots/SMC_GA/gen_0009.mat | Bin 0 -> 951 bytes
.../Results_and_Plots/SMC_GA/gen_0010.mat | Bin 0 -> 891 bytes
.../Results_and_Plots/SMC_GA/gen_0011.mat | Bin 0 -> 855 bytes
.../Results_and_Plots/SMC_GA/gen_0012.mat | Bin 0 -> 1010 bytes
.../Results_and_Plots/SMC_GA/gen_0013.mat | Bin 0 -> 994 bytes
.../Results_and_Plots/SMC_GA/gen_0014.mat | Bin 0 -> 976 bytes
.../Results_and_Plots/SMC_GA/gen_0015.mat | Bin 0 -> 1005 bytes
.../Results_and_Plots/SMC_GA/gen_0016.mat | Bin 0 -> 981 bytes
.../Results_and_Plots/SMC_GA/gen_0017.mat | Bin 0 -> 982 bytes
.../Results_and_Plots/SMC_GA/gen_0018.mat | Bin 0 -> 1033 bytes
.../Results_and_Plots/SMC_GA/gen_0019.mat | Bin 0 -> 1079 bytes
.../Results_and_Plots/SMC_GA/gen_0020.mat | Bin 0 -> 1105 bytes
.../Results_and_Plots/SMC_GA/gen_0021.mat | Bin 0 -> 1112 bytes
.../Results_and_Plots/SMC_GA/gen_0022.mat | Bin 0 -> 1067 bytes
.../Results_and_Plots/SMC_GA/gen_0023.mat | Bin 0 -> 1051 bytes
.../Results_and_Plots/SMC_GA/gen_0024.mat | Bin 0 -> 950 bytes
.../Results_and_Plots/SMC_GA/gen_0025.mat | Bin 0 -> 931 bytes
.../Results_and_Plots/SMC_GA/gen_0026.mat | Bin 0 -> 957 bytes
.../Results_and_Plots/SMC_GA/gen_0027.mat | Bin 0 -> 909 bytes
.../Results_and_Plots/SMC_GA/gen_0028.mat | Bin 0 -> 852 bytes
.../Results_and_Plots/SMC_GA/gen_0029.mat | Bin 0 -> 804 bytes
.../Results_and_Plots/SMC_GA/gen_0030.mat | Bin 0 -> 725 bytes
.../Results_and_Plots/SMC_GA/gen_0031.mat | Bin 0 -> 814 bytes
.../Results_and_Plots/SMC_GA/gen_0032.mat | Bin 0 -> 845 bytes
.../Results_and_Plots/SMC_GA/gen_0033.mat | Bin 0 -> 849 bytes
.../Results_and_Plots/SMC_GA/gen_0034.mat | Bin 0 -> 833 bytes
.../Results_and_Plots/SMC_GA/gen_0035.mat | Bin 0 -> 971 bytes
.../Results_and_Plots/SMC_GA/gen_0036.mat | Bin 0 -> 1068 bytes
.../Results_and_Plots/SMC_GA/gen_0037.mat | Bin 0 -> 1064 bytes
.../Results_and_Plots/SMC_GA/gen_0038.mat | Bin 0 -> 1009 bytes
.../Results_and_Plots/SMC_GA/gen_0039.mat | Bin 0 -> 1010 bytes
.../Results_and_Plots/SMC_GA/gen_0040.mat | Bin 0 -> 962 bytes
.../Results_and_Plots/SMC_GA/gen_0041.mat | Bin 0 -> 932 bytes
.../Results_and_Plots/SMC_GA/gen_0042.mat | Bin 0 -> 856 bytes
.../Results_and_Plots/SMC_GA/gen_0043.mat | Bin 0 -> 883 bytes
.../Results_and_Plots/SMC_GA/gen_0044.mat | Bin 0 -> 883 bytes
.../Results_and_Plots/SMC_GA/gen_0045.mat | Bin 0 -> 907 bytes
.../Results_and_Plots/SMC_GA/gen_0046.mat | Bin 0 -> 868 bytes
.../Results_and_Plots/SMC_GA/gen_0047.mat | Bin 0 -> 830 bytes
.../Results_and_Plots/SMC_GA/gen_0048.mat | Bin 0 -> 816 bytes
.../Results_and_Plots/SMC_GA/gen_0049.mat | Bin 0 -> 898 bytes
.../Results_and_Plots/SMC_GA/gen_0050.mat | Bin 0 -> 920 bytes
.../FOSMCControllerEH/checksumOfCache.mat | Bin 0 -> 392 bytes
.../tmwinternal/simulink_cache.xml | 6 +
.../varcache/FOSMCControllerEH/varInfo.mat | Bin 0 -> 5944 bytes
.../SMCControllerEH/checksumOfCache.mat | Bin 0 -> 392 bytes
.../tmwinternal/simulink_cache.xml | 6 +
.../sim/varcache/SMCControllerEH/varInfo.mat | Bin 0 -> 4888 bytes
.../Case2-EnergyHarvester/SMCControllerEH.slx | Bin 0 -> 109310 bytes
.../Case2-EnergyHarvester/ga_save_each_gen.m | 7 +
.../FOSMCControllerEH/checksumOfCache.mat | Bin 0 -> 392 bytes
.../tmwinternal/simulink_cache.xml | 6 +
.../varcache/FOSMCControllerEH/varInfo.mat | Bin 0 -> 5944 bytes
.../SMCControllerEH/checksumOfCache.mat | Bin 0 -> 392 bytes
.../tmwinternal/simulink_cache.xml | 6 +
.../sim/varcache/SMCControllerEH/varInfo.mat | Bin 0 -> 4888 bytes
156 files changed, 2321 insertions(+)
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/.DS_Store
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Basinofattraction.m
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/CEopt.m
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/FOSMCControllerEH.slx
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/MainCEoptCase2_FOSMC.m
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/MainCEoptCase2_SMC.m
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/MainGAoptCase2_FOSMC.m
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/MainGAoptCase2_SMC.m
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/.DS_Store
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/Basin_CE_FOSMC.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/Basin_CE_SMC.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/Basin_GA_FOSMC.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/Basin_GA_SMC.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/GA_FOSMC.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/funcaoobjetivo_per_generations.m
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0000.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0001.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0002.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0003.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0004.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0005.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0006.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0007.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0008.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0009.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0010.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0011.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0012.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0013.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0014.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0015.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0016.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0017.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0018.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0019.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0020.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0021.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0022.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0023.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0024.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0025.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0026.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0027.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0028.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0029.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0030.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0031.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0032.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0033.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0034.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0035.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0036.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0037.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0038.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0039.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0040.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0041.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0042.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0043.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0044.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0045.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0046.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0047.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0048.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0049.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0050.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0051.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0052.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0053.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0054.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0055.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0056.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0057.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0058.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0059.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0060.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0061.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0062.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0063.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0064.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/FOSMC_GA/gen_0065.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/GA_FOSMC.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/GA_SMC.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/Plot_Basins_of_attraction.m
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/Plot_Results_EH.m
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/Results_CE_FOSMC.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/Results_CE_SMC.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/Results_GA_FOSMC.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/Results_GA_SMC.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/GA_SMC.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/funcaoobjetivo_per_generations.m
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0000.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0001.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0002.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0003.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0004.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0005.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0006.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0007.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0008.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0009.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0010.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0011.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0012.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0013.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0014.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0015.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0016.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0017.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0018.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0019.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0020.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0021.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0022.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0023.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0024.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0025.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0026.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0027.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0028.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0029.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0030.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0031.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0032.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0033.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0034.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0035.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0036.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0037.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0038.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0039.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0040.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0041.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0042.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0043.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0044.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0045.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0046.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0047.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0048.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0049.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/SMC_GA/gen_0050.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/slprj/sim/varcache/FOSMCControllerEH/checksumOfCache.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/slprj/sim/varcache/FOSMCControllerEH/tmwinternal/simulink_cache.xml
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/slprj/sim/varcache/FOSMCControllerEH/varInfo.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/slprj/sim/varcache/SMCControllerEH/checksumOfCache.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/slprj/sim/varcache/SMCControllerEH/tmwinternal/simulink_cache.xml
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/Results_and_Plots/slprj/sim/varcache/SMCControllerEH/varInfo.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/SMCControllerEH.slx
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/ga_save_each_gen.m
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/slprj/sim/varcache/FOSMCControllerEH/checksumOfCache.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/slprj/sim/varcache/FOSMCControllerEH/tmwinternal/simulink_cache.xml
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/slprj/sim/varcache/FOSMCControllerEH/varInfo.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/slprj/sim/varcache/SMCControllerEH/checksumOfCache.mat
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/slprj/sim/varcache/SMCControllerEH/tmwinternal/simulink_cache.xml
create mode 100644 FraCTune-1.0/Case2-EnergyHarvester/slprj/sim/varcache/SMCControllerEH/varInfo.mat
diff --git a/FraCTune-1.0/Case2-EnergyHarvester/.DS_Store b/FraCTune-1.0/Case2-EnergyHarvester/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..75c4407cfb1980d76cb5aa0b951fba29546b197f
GIT binary patch
literal 6148
zcmeHKK~BR!4D^;D1-O(O;
`wtsCdPm<
zU<_;=1E|?7>7JmC#(*(k3@jMn?}LXjW{N>DemXG3766#Q90hakB{;?_W{N=&D-b84
zKnZo)VmJwh-K$@w7z8DpoHid$cXryLxVSss@1r}pOwdMSz!>N
zdol)$fq%t-OY(6(#FezRE?tgmt%qJfS=cWKEg=`2L6 0.01647*0.98
+ valid_xdisp0 = [valid_xdisp0; xdisp0]; % Store xdisp0 in degrees
+ valid_dxdisp0 = [valid_dxdisp0; dxdisp0]; % Store dxdisp0 in rad/s
+ end
+ end
+end
+
+% Save the results
+ save('Basin_GA_SMC.mat' , 'valid_xdisp0', 'valid_dxdisp0');
+% save('Basin_CE_SMC.mat' , 'valid_xdisp0', 'valid_dxdisp0');
+% save('Basin_GA_FOSMC.mat', 'valid_xdisp0', 'valid_dxdisp0');
+% save('Basin_CE_FOSMC.mat', 'valid_xdisp0', 'valid_dxdisp0');
+
+ % Plot the valid initial conditions
+figure(1);
+plot(valid_xdisp0, valid_dxdisp0,'or','MarkerFaceColor','red','MarkerSize',12);
diff --git a/FraCTune-1.0/Case2-EnergyHarvester/CEopt.m b/FraCTune-1.0/Case2-EnergyHarvester/CEopt.m
new file mode 100644
index 0000000..3b4286a
--- /dev/null
+++ b/FraCTune-1.0/Case2-EnergyHarvester/CEopt.m
@@ -0,0 +1,1216 @@
+% -----------------------------------------------------------------
+% CEopt.m
+% -----------------------------------------------------------------
+% programmer: Americo Cunha Jr
+% americo.cunhajr@gmail.com
+%
+% Originally programmed in: Jun 18, 2021
+% Last updated in: Apr 02, 2024
+% -----------------------------------------------------------------
+% This routine employs the Cross-entropy (CE) method to solve the
+% following optimization problem:
+%
+% Xopt = arg min F(x)
+%
+% subject to
+%
+% lb <= x <= ub
+% g(x) <= 0
+% h(x) = 0
+% where:
+% - F : R^Nvars -> R is a given scalar objective function
+% - lb : (1 x Nvars) vector of lower bounds for the decision variables
+% - ub : (1 x Nvars) vector of upper bounds for the decision variables
+% - g(x): R^Nvars -> R^m is a vector of m inequality constraint functions
+% - h(x): R^Nvars -> R^p is a vector of p equality constraint functions
+%
+% The goal is to minimize the scalar objective function F(x) defined
+% within a known rectangular domain (feasible region), while also
+% satisfying the given equality and inequality constraints. The feasible
+% region is further defined by the constraints g(x) <= 0 and h(x) = 0,
+% in addition to the bounds lb <= x <= ub.
+%
+% The algorithm samples the feasible region using a truncated Gaussian
+% distribution and updates its parameters with the aid of an elite set
+% (defined by the better samples), aiming to transform this Gaussian
+% distribution into a Dirac distribution centered at the global optimum.
+% For constrained optimization problems, the CE method integrates a
+% mechanism for handling the constraints, such as the augmented
+% Lagrangian method, to incorporate the effects of constraints into the
+% optimization process.
+%
+% Input:
+% fun - Function handle for the objective function. This function
+% must accept a 1 x Nvars row vector (representing a single
+% sample) or an M x Nvars matrix (representing M samples with
+% variables in columns) as input and return a scalar value or
+% a row vector of M scalar values (for vectorized operations)
+% respectively.
+% xmean0 - (1 x Nvars) initial mean
+% sigma0 - (1 x Nvars) intial standard deviation
+% lb - (1 x Nvars) lower bound
+% ub - (1 x Nvars) upper bound
+% nonlcon - nonlinear constraint function
+% CEobj - Struct containing parameters and settings for the CE method.
+%
+% CEobj fields include:
+% * Verbose : boolean flag to enable/disable screem output
+% * isConstrained : boolean flag to indicate a constrained problem
+% * isVectorized : boolean flag to indicate a vectorized function
+% * Nvars : number of design variables in x
+% * EliteFactor : proportion of samples for the elite set
+% * Nsamp : number of samples to draw per iteration
+% * MaxIter : maximum number of iterations
+% * MaxStall : maximum number of stall iterations
+% * MaxFcount : maximum number of objective function evaluations
+% * MinFval : minimum admissible value for objective function
+% * TolAbs : absolute tolerance
+% * TolRel : relative tolerance
+% * TolCon : constraint violation tolerance
+% * TolFun : function value change tolerance
+% * alpha : smoothing parameter for the mean update
+% * beta : smoothing parameter for the std. dev. update
+% * q : exponent in dynamic smoothing parameter
+% * NonlconAlgorithm : algorithm to handle nonlinear constraints
+% * InitialPenalty : initial penalty value for the augmented Lagrangian
+% * PenaltyFactor : factor by which the penalty parameter is increased
+% * xmean : history of mean value over iterations
+% * xmedian : history of median over iterations
+% * xbest : history of best sample point over iterations
+% * Fmean : history of objective function mean over elite set
+% * Fmedian : history of objective function median over elite set
+% * Fbest : history of objective function best value found
+% * sigma : history of standard deviation over iterations
+% * ErrorS : history of standard deviation error
+% * ErrorC : history of constraint violation error (for constrained problems)
+% * iter : total number of iterations performed
+% * stall : number of iterations without significant progress
+% * Fcount : total number of function evaluations performed
+% * ConvergenceStatus: boolean flag indicating if the algorithm converged
+% (true) or not (false).
+%
+% This struct can also include additional fields for customized behavior
+% or extensions of the CE method.
+%
+% Output:
+% Xopt - (1 x Nvars) optimal point
+% Fopt - scalar optimal value
+% ExitFlag - Flag indicating the reason for algorithm termination:
+% 0 - algorithm is running or has not been initialized
+% 1 - maximum number of iterations reached
+% 2 - no significant change in objective function (stalled)
+% 3 - maximum number of function evaluations reached
+% 4 - function change and constranint error smaller than tolerance
+% 5 - std dev and constraint errors smaller than tolerance
+% 6 - minimum function value criterion met
+% CEobj - The updated Cross-Entropy object struct containing the final
+% state of the algorithm and possibly additional diagnostic
+% information.
+%
+% Reference:
+% Reuven Y. Rubinstein, Dirk P. Kroese
+% The Cross-Entropy Method: A Unified Approach to Combinatorial
+% Optimization, Monte-Carlo Simulation, and Machine Learning
+% Springer-Verlag, 2004.
+% -----------------------------------------------------------------
+function [Xopt,Fopt,ExitFlag,CEobj] = ...
+ CEopt(fun,xmean0,sigma0,lb,ub,nonlcon,CEobj)
+
+ % check number of arguments
+ if nargin < 5
+ error('Too few inputs.')
+ elseif nargin > 7
+ error('Too many inputs.')
+ end
+
+ % consistency check for the mandatory inputs parameters
+ [lb,ub,xmean0,sigma0,Nvars] = CheckInput(lb,ub,xmean0,sigma0);
+
+ % check if CEobj is not provided or is empty
+ if nargin < 7 || isempty(CEobj)
+ CEobj = struct();
+ end
+
+ % set the default parameters for CEobj (if necessary)
+ CEobj = InitializeCEobj(CEobj,Nvars);
+
+ % consistency check for CEobj parameters
+ CheckCEobj(CEobj);
+
+ % check if nonlcon is not provided or is empty
+ if nargin < 6 || isempty(nonlcon)
+ CEobj.isConstrained = false;
+
+ % objective function
+ ObjFun = @(x) fun(x);
+ else
+ CEobj.isConstrained = true;
+
+ % objective function
+ if strcmp(CEobj.NonlconAlgorithm,'AugLagrLog')
+ ObjFun = @(x,Lg,Lh,p) AugLagrangian1(x,fun,nonlcon,Lg,Lh,p);
+ else
+ ObjFun = @(x,Lg,Lh,p) AugLagrangian2(x,fun,nonlcon,Lg,Lh,p);
+ end
+ end
+
+ % decide the appropriate optimization solver
+ if ~CEobj.isConstrained
+
+ % CE solver for an unconstrained problem
+ [Xopt,Fopt,ExitFlag,CEobj] = ...
+ UnconstrSolverCE(ObjFun,Nvars,xmean0,sigma0,lb,ub,CEobj);
+ else
+
+ % CE solver for a constrained problem
+ [Xopt,Fopt,ExitFlag,CEobj] = ...
+ ConstrSolverCE(ObjFun,Nvars,xmean0,sigma0,lb,ub,nonlcon,CEobj);
+ end
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% CheckInput - verify input parameters for possibles errors
+% -----------------------------------------------------------------
+function [lb,ub,xmean0,sigma0,Nvars] = ...
+ CheckInput(lb,ub,xmean0,sigma0)
+
+ % ensure lb and ub are row vectors
+ lb = lb(:)';
+ ub = ub(:)';
+
+ % check if lb and ub are empty
+ if isempty(lb) || isempty(ub)
+ error('lb and ub must be non-empty')
+ end
+
+ % number of variables
+ Nvars = length(lb);
+
+ % check for consistency in lb and ub
+ if Nvars ~= length(ub)
+ error('lb and ub must have the same dimension')
+ end
+ if any(isnan(lb)) || any(isnan(ub))
+ error('lb and ub cannot have a NaN components')
+ end
+ if any(lb >= ub)
+ error('lb < ub for all components')
+ end
+
+ % define xmean0 (if necessary)
+ if isempty(xmean0)
+ xmean0 = (ub+lb)/2;
+ xmean0(isinf(xmean0)) = 0.0;
+ xmean0(isnan(xmean0)) = 0.0;
+ end
+
+ % define sigma0 (if necessary)
+ if isempty(sigma0)
+ sigma0 = (ub-lb)/sqrt(12);
+ sigma0(isinf(sigma0)) = 1.0;
+ sigma0(isnan(sigma0)) = 1.0;
+ end
+
+ % ensure xmean0 and sigma0 are row vectors
+ xmean0 = xmean0(:)';
+ sigma0 = sigma0(:)';
+
+ % check for consistency in xmean0 and sigma0
+ if size(xmean0) ~= size(sigma0)
+ error('xmean0 and sigma0 must have the same dimensions')
+ end
+ if any(isnan(xmean0)) || any(isnan(sigma0))
+ error('xmean0 and sigma0 cannot have a NaN components')
+ end
+ if any(isinf(xmean0)) || any(isinf(sigma0))
+ error('xmean0 and sigma0 cannot have a Inf components')
+ end
+ if any(xmean0 < lb) || any(xmean0 > ub)
+ error('xmean0 must be in [lb,ub] interval')
+ end
+ if any(sigma0 <= 0.0)
+ error('All components of sigma0 must be positive')
+ end
+
+ % check for dimension consistency in xmean0
+ if length(xmean0) ~= Nvars
+ error('xmean0 must be a 1 x Nvars vector')
+ end
+
+ % check for dimension consistency in sigma0
+ if length(sigma0) ~= Nvars
+ error('sigma0 must be a 1 x Nvars vector')
+ end
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% InitializeCEobj - initialize and set default parameters for CEobj
+% -----------------------------------------------------------------
+function CEobj = InitializeCEobj(CEobj,Nvars)
+
+ % names and values for default fields of CEobj
+ DefaultParams = struct( ...
+ 'Verbose' ,true , ...
+ 'isConstrained' ,false , ...
+ 'isVectorized' ,false , ...
+ 'Nvars' ,Nvars , ...
+ 'EliteFactor' ,0.05 , ...
+ 'Nsamp' ,100 , ...
+ 'MaxIter' ,100*Nvars , ...
+ 'MaxStall' ,50 , ...
+ 'MaxFcount' ,+Inf , ...
+ 'MinFval' ,-Inf , ...
+ 'TolAbs' ,1.0e-6 , ...
+ 'TolRel' ,1.0e-3 , ...
+ 'TolCon' ,1.0e-3 , ...
+ 'TolFun' ,1.0e-3 , ...
+ 'alpha' ,0.4 , ...
+ 'beta' ,0.4 , ...
+ 'q' ,10 , ...
+ 'NonlconAlgorithm','AugLagLog', ...
+ 'InitialPenalty' ,10 , ...
+ 'PenaltyFactor' ,100 ...
+ );
+
+ % assign values for undefined fields in CEobj
+ DefaultFields = fieldnames(DefaultParams);
+ for i = 1:numel(DefaultFields)
+ if ~isfield(CEobj, DefaultFields{i})
+ CEobj.(DefaultFields{i}) = DefaultParams.(DefaultFields{i});
+ end
+ end
+
+ % get the strange fields in CEobj
+ StrangeFields = rmfield(CEobj,DefaultFields);
+
+ % remove the strange fields from CEobj
+ CEobj = rmfield(CEobj,fieldnames(StrangeFields));
+
+ % order the default fields in CEobj
+ CEobj = orderfields(CEobj,DefaultParams);
+
+ % preallocate memory or initiate objects
+ CEobj.xmean = NaN*ones(CEobj.MaxIter,Nvars);
+ CEobj.xmedian = NaN*ones(CEobj.MaxIter,Nvars);
+ CEobj.xbest = NaN*ones(CEobj.MaxIter,Nvars);
+ CEobj.Fmean = NaN*ones(CEobj.MaxIter,1 );
+ CEobj.Fmedian = NaN*ones(CEobj.MaxIter,1 );
+ CEobj.Fbest = NaN*ones(CEobj.MaxIter,1 );
+ CEobj.sigma = NaN*ones(CEobj.MaxIter,Nvars);
+ CEobj.ErrorS = NaN*ones(CEobj.MaxIter,1 );
+ CEobj.ErrorC = NaN*ones(CEobj.MaxIter,1 );
+ CEobj.iter = 0;
+ CEobj.stall = 0;
+ CEobj.Fcount = 0;
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% CheckCEobj - check parameters consistency for CEobj
+% -----------------------------------------------------------------
+function CheckCEobj(CEobj)
+
+ % flag to show output on screem
+ if mod(CEobj.Verbose,1) ~= 0
+ error('Verbose must be integer')
+ end
+
+ % elite samples percentage
+ if ~isnumeric(CEobj.PenaltyFactor) || ...
+ CEobj.EliteFactor <= 0 || ...
+ CEobj.EliteFactor > 1
+ error('EliteFactor must be such that 0 < EliteFactor <= 1')
+ end
+
+ % number of samples
+ if ~isnumeric(CEobj.Nsamp) || CEobj.Nsamp <= 1
+ error('Nsamp must be greather than 1')
+ end
+
+ % maximum number of iterations
+ if mod(CEobj.MaxIter,1) ~= 0 || CEobj.MaxIter < 1
+ error('MaxIter must be a positive integer')
+ end
+
+ % maximum number of stall iterations
+ if mod(CEobj.MaxStall,1) ~= 0 || CEobj.MaxStall < 1
+ error('MaxStall must be a positive integer')
+ end
+
+ % maximum number of function evaluations
+ if (mod(CEobj.MaxFcount,1) == 0 && CEobj.MaxFcount < 1) || ...
+ (mod(CEobj.MaxFcount,1) ~= 0 && CEobj.MaxFcount ~= Inf)
+ error('MaxFcount must be a positive integer or infinity')
+ end
+
+ % minimum function value
+ if ~isnumeric(CEobj.MinFval)
+ error('MinFval must be numeric')
+ end
+
+ % absolute tolerance
+ if ~isnumeric(CEobj.TolAbs) || any(CEobj.TolAbs <= 0.0)
+ error('TolAbs must be positive real')
+ end
+
+ % relative tolerance
+ if ~isnumeric(CEobj.TolRel) || CEobj.TolRel < 0.0
+ error('TolRel must be non-negative real')
+ end
+
+ % constraint tolerance
+ if ~isnumeric(CEobj.TolCon) || CEobj.TolCon < 0.0
+ error('TolCon must be non-negative real')
+ end
+
+ % function tolerance
+ if ~isnumeric(CEobj.TolFun) || CEobj.TolFun < 0.0
+ error('TolFun must be non-negative')
+ end
+
+ % smoothing parameter (0 < alpha <= 1)
+ if ~isnumeric(CEobj.alpha) || CEobj.alpha <= 0 || CEobj.alpha > 1
+ error('alpha must be such that 0 < alpha <= 1')
+ end
+
+ % dynamic smoothing parameter
+ if ~isnumeric(CEobj.beta) || CEobj.beta <= 0
+ error('beta must be non-negative')
+ end
+
+ % dynamic smoothing parameter
+ if ~isnumeric(CEobj.q) || CEobj.q <= 0
+ error('q must be non-negative')
+ end
+
+ % nonlinear constraint algorithm
+ if ~ischar(CEobj.NonlconAlgorithm) || ...
+ (~strcmp(CEobj.NonlconAlgorithm,'AugLagLog') && ...
+ ~strcmp(CEobj.NonlconAlgorithm,'AugLagMax'))
+ error('Unknown option for NonlconAlgorithm')
+ end
+
+ % initial penalty
+ if ~isnumeric(CEobj.InitialPenalty) || CEobj.InitialPenalty <= 0
+ error('InitialPenalty must be must be non-negative')
+ end
+
+ % penalty factor
+ if ~isnumeric(CEobj.PenaltyFactor) || CEobj.PenaltyFactor <= 1
+ error('PenaltyFactor must be greather than 1')
+ end
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% UnconstrSolverCE - solve an unconstrained optimization problem
+% -----------------------------------------------------------------
+function [Xopt,Fopt,ExitFlag,CEobj] = ...
+ UnconstrSolverCE(fun,Nvars,xmean0,sigma0,lb,ub,CEobj)
+
+ % initialize parameters
+ t = 0; % iteration counter
+ stall = 0; % stall iterations counter
+ Fcount = 0; % function evaluation counter
+ EliteFactor = CEobj.EliteFactor; % elite factor
+ Nsamp = CEobj.Nsamp; % total number of samples
+ Nelite = EliteFactor*Nsamp; % number of elite samples
+ MaxIter = CEobj.MaxIter; % maximum of iterations
+ TolAbs = CEobj.TolAbs; % absolute tolerance
+ TolRel = CEobj.TolRel; % relative tolerance
+ alpha = CEobj.alpha; % smoothing parameter for mean
+ beta = CEobj.beta; % smoothing parameter for std. dev.
+ q = CEobj.q; % dynamic update parameter
+ Xopt = NaN*xmean0; % optimal point
+ Fopt = +Inf; % optimal value
+ ExitFlag = 0; % termination condition flag
+
+ % preallocate memory for design variables samples
+ X = zeros(Nsamp,Nvars);
+
+ % preallocate memory for objective function (if necessary)
+ if ~CEobj.isVectorized
+ F = NaN*ones(Nsamp,1);
+ end
+
+ % loop to sample the domain and update the distribution
+ while ExitFlag == 0 && t <= MaxIter
+
+ % update level counter
+ t = t + 1;
+
+ % sample the domain from a truncated Gaussian distribution
+ X = DomainSampling(xmean0,sigma0,lb,ub,Nvars,Nsamp,X);
+
+ % evaluate objective function
+ if ~CEobj.isVectorized
+ % case where fun is not a vectorized function
+ for n = 1:Nsamp
+ F(n) = fun(X(n,:));
+ end
+ else
+ % case where fun is a vectorized function
+ F = fun(X);
+ end
+
+ % update function evalution counter
+ Fcount = Fcount + Nsamp;
+
+ % define elite samples set
+ EliteSetId = DefineEliteSet(F,Nelite);
+
+ % update the distribution parameters
+ [xmean,xmedian,xbest,Fmean,Fmedian,Fbest,sigma] = ...
+ UpdateDistribution(F,X,EliteSetId,xmean0,sigma0,alpha,beta,q,t);
+
+ % update standard deviation error
+ [ErrorS,SmallErrorS] = ComputeErrorS(sigma,sigma0,TolAbs,TolRel);
+
+ % update old parameters
+ xmean0 = xmean;
+ sigma0 = sigma;
+
+ % update the optimum
+ if Fbest < Fopt
+ Xopt = xbest;
+ Fopt = Fbest;
+ stall = 0;
+ else
+ % stall iterations counter
+ stall = stall + 1;
+ end
+
+ % update optimization process history
+ CEobj.iter = t;
+ CEobj.stall = stall;
+ CEobj.Fcount = Fcount;
+ CEobj.xmean(t,:) = xmean;
+ CEobj.xmedian(t,:) = xmedian;
+ CEobj.xbest(t,:) = xbest;
+ CEobj.Fmean(t) = Fmean;
+ CEobj.Fmedian(t) = Fmedian;
+ CEobj.Fbest(t) = Fbest;
+ CEobj.sigma(t,:) = sigma;
+ CEobj.ErrorS(t) = ErrorS;
+
+ % print iteration progress on the screen
+ if CEobj.Verbose
+ PrintProgress(t,Nvars,CEobj);
+ end
+
+ % check the convergence
+ ExitFlag = CheckConv(Fopt,SmallErrorS,[],CEobj);
+ end
+
+ % convergence check and update of 'Convergenobjatus' field
+ if ExitFlag > 0
+ CEobj.ConvergenceStatus = true;
+ else
+ CEobj.ConvergenceStatus = false;
+ end
+
+ % print resume
+ if CEobj.Verbose
+ PrintEnd(Xopt,Fopt,ExitFlag,CEobj);
+ end
+
+ % delete empty entries from sampling records
+ CEobj = DeleteEmptyEntries(t,CEobj);
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% ConstrSolverCE - solve a constrained optimization problem
+% -----------------------------------------------------------------
+function [Xopt,Fopt,ExitFlag,CEobj] = ...
+ ConstrSolverCE(fun,Nvars,xmean0,sigma0,lb,ub,nonlcon,CEobj)
+
+ % initialize parameters
+ t = 0; % iteration counter
+ stall = 0; % stall iterations counter
+ Fcount = 0; % function evaluation counter
+ EliteFactor = CEobj.EliteFactor; % elite factor
+ Nsamp = CEobj.Nsamp; % total number of samples
+ Nelite = EliteFactor*Nsamp; % number of elite samples
+ MaxIter = CEobj.MaxIter; % maximum of iterations
+ TolAbs = CEobj.TolAbs; % absolute tolerance
+ TolRel = CEobj.TolRel; % relative tolerance
+ TolCon = CEobj.TolCon; % constraint tolerance
+ alpha = CEobj.alpha; % smoothing parameter for mean
+ beta = CEobj.beta; % smoothing parameter for std. dev.
+ q = CEobj.q; % dynamic update parameter
+ Xopt = NaN*xmean0; % optimal point
+ Fopt = +Inf; % optimal value
+ ExitFlag = 0; % termination condition flag
+
+ % initialize penalty parameters
+ Penalty = CEobj.InitialPenalty;
+ PenaltyFactor = CEobj.PenaltyFactor;
+
+ % initialize Lagrange multipliers
+ [G0,H0] = nonlcon(xmean0);
+ if isempty(G0), G0 = 0.0; end
+ if isempty(H0), H0 = 0.0; end
+ lambdaG = zeros(size(G0));
+ lambdaH = zeros(size(H0));
+
+ % preallocate memory for design variables samples
+ X = zeros(Nsamp,Nvars);
+
+ % preallocate memory for objective function (if necessary)
+ if ~CEobj.isVectorized
+ F = NaN*ones(Nsamp,1);
+ end
+
+ % loop to sample the domain and update the distribution
+ while ExitFlag == 0 && t <= MaxIter
+
+ % update level counter
+ t = t + 1;
+
+ % sample the domain from a truncated Gaussian distribution
+ X = DomainSampling(xmean0,sigma0,lb,ub,Nvars,Nsamp,X);
+
+ % evaluate augmented Lagrangian
+ if ~CEobj.isVectorized
+ % case where fun is not a vectorized function
+ for n = 1:Nsamp
+ F(n) = fun(X(n,:),lambdaG,lambdaH,Penalty);
+ end
+ else
+ % case where fun is a vectorized function
+ F = fun(X,lambdaG,lambdaH,Penalty);
+ end
+
+ % update function evalution counter
+ Fcount = Fcount + Nsamp;
+
+ % define elite samples set
+ EliteSetId = DefineEliteSet(F,Nelite);
+
+ % update the distribution parameters
+ [xmean,xmedian,xbest,Fmean,Fmedian,Fbest,sigma] = ...
+ UpdateDistribution(F,X,EliteSetId,xmean0,sigma0,alpha,beta,q,t);
+
+ % standard deviation error
+ [ErrorS,SmallErrorS] = ComputeErrorS(sigma,sigma0,TolAbs,TolRel);
+
+ % update Lagrange multipliers
+ [lambdaG,lambdaH,G,H] = ...
+ UpdateLagrangeMult(xbest,nonlcon,lambdaG,lambdaH,Penalty);
+
+ % constraint error
+ [ErrorC,SmallErrorC] = ...
+ ComputeErrorC(G,H,lambdaG,lambdaH,Penalty,TolCon);
+
+ % update pentalty parameter
+ Penalty = UpdatePenalty(Penalty,PenaltyFactor,SmallErrorC);
+
+ % update old parameters
+ xmean0 = xmean;
+ sigma0 = sigma;
+
+ % update the optimum
+ if Fbest < Fopt
+ Xopt = xbest;
+ Fopt = Fbest;
+ stall = 0;
+ else
+ % stall iterations counter
+ stall = stall + 1;
+ end
+
+ % update optimization process history
+ CEobj.iter = t;
+ CEobj.stall = stall;
+ CEobj.Fcount = Fcount;
+ CEobj.xmean(t,:) = xmean;
+ CEobj.xmedian(t,:) = xmedian;
+ CEobj.xbest(t,:) = xbest;
+ CEobj.Fmean(t) = Fmean;
+ CEobj.Fmedian(t) = Fmedian;
+ CEobj.Fbest(t) = Fbest;
+ CEobj.sigma(t,:) = sigma;
+ CEobj.ErrorS(t) = ErrorS;
+ CEobj.ErrorC(t) = ErrorC;
+
+ % print iteration progress on the screen
+ if CEobj.Verbose
+ PrintProgress(t,Nvars,CEobj);
+ end
+
+ % check the convergence
+ ExitFlag = CheckConv(Fopt,SmallErrorS,SmallErrorC,CEobj);
+ end
+
+ % convergence check and update of 'ConvergenceStatus' field
+ if ExitFlag > 0
+ CEobj.ConvergenceStatus = true;
+ else
+ CEobj.ConvergenceStatus = false;
+ end
+
+ % print resume
+ if CEobj.Verbose
+ PrintEnd(Xopt,Fopt,ExitFlag,CEobj);
+ end
+
+ % delete empty entries from sampling records
+ CEobj = DeleteEmptyEntries(t,CEobj);
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% AugLagrangian1 - augmented Lagrangian function (log formulation)
+% -----------------------------------------------------------------
+function [AL,F,G,H] = ...
+ AugLagrangian1(x,fun,nonlcon,lambdaG,lambdaH,Penalty)
+
+ % objetive function
+ F = fun(x);
+
+ % nonlinear constraints
+ [G,H] = nonlcon(x);
+ if isempty(G), G = 0.0; end
+ if isempty(H), H = 0.0; end
+
+ % shift
+ s = lambdaG/Penalty;
+
+ % augmented Lagrangian function
+ AL = F - sum((s.*lambdaG).*log(s-G+eps),2) + ...
+ H*(lambdaH')+ 0.5*Penalty*sum(H.^2,2);
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% AugLagrangian2 - augmented Lagrangian function (max formulation)
+% -----------------------------------------------------------------
+function [AL,F,G,H] = AugLagrangian2(x,fun,nonlcon,...
+ lambdaG,lambdaH,Penalty)
+
+ % objetive function
+ F = fun(x);
+
+ % nonlinear constraints
+ [G,H] = nonlcon(x);
+ if isempty(G), G = 0.0; end
+ if isempty(H), H = 0.0; end
+
+ % shifted equality constraint
+ H_s = H + lambdaH/Penalty;
+
+ % shifted inequality constraint
+ G_s = G + lambdaG/Penalty;
+
+ % augmented Lagrangian function
+ AL = F + 0.5*Penalty*(sum(H_s.^2,2) + sum(max(0,G_s).^2,2));
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% DefineEliteSet - define elite samples set
+% -----------------------------------------------------------------
+function EliteSetId = DefineEliteSet(F,Nelite)
+
+ % sort ObjFunc evaluations (order statistics)
+ [Fsort,Isort] = sort(F);
+
+ % elite samples indices
+ EliteSetId = Isort(1:Nelite);
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% UpdateDistribution - update distribution parameters
+% -----------------------------------------------------------------
+function [xmean,xmedian,xbest,Fmean,Fmedian,Fbest,sigma] = ...
+ UpdateDistribution(F,X,EliteSetId,xmean0,sigma0,alpha,beta,q,t)
+
+ % elite samples and values
+ Felite = F(EliteSetId);
+ Xelite = X(EliteSetId,:);
+
+ % estimators for the ObjFunc minimum point
+ xmean = mean(Xelite);
+ xmedian = median(Xelite);
+ xbest = Xelite(1,:);
+
+ % estimators for the ObjFunc minimum value
+ Fmean = mean(Felite);
+ Fmedian = median(Felite);
+ Fbest = Felite(1);
+
+ % estimator for the standard deviation
+ sigma = std(Xelite);
+
+ % smoothing the mean
+ xmean = Smoothing(xmean,xmean0,alpha);
+
+ % dynamic smoothing parameter
+ beta_t = beta*(1 - (1-1/t)^q);
+
+ % smoothing the standard deviation
+ sigma = Smoothing(sigma,sigma0,beta_t);
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% Smoothing - smoothing scheme for variable update
+% -----------------------------------------------------------------
+function xnew = Smoothing(xnew,xold,s)
+
+ % apply a smoothing scheme based on the parameter s
+ xnew = s*xnew + (1-s)*xold;
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% ComputeErrorS - compute standard deviation error
+% -----------------------------------------------------------------
+function [ErrorS,SmallErrorS] = ...
+ ComputeErrorS(sigma,sigma0,TolAbs,TolRel)
+
+ % error weigths vector
+ ewt = ErrorWeights(sigma,TolAbs,TolRel);
+
+ % standard devition error
+ ErrorS = wrmsNorm(sigma-sigma0,ewt);
+
+ % convergence metric based on standard deviation
+ SmallErrorS = ErrorS <= 1.0;
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% ErrorWeights - vector with the error weights
+% -----------------------------------------------------------------
+function w = ErrorWeights(x,TolAbs,TolRel)
+
+ % error weights vector
+ w = 1./(TolAbs + abs(x)*TolRel);
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% wrmsNorm - weigthed root-mean-square norm
+% -----------------------------------------------------------------
+function wnorm = wrmsNorm(v,w)
+
+ % weighted-root-mean-square norm
+ wnorm = norm(v.*w/length(v));
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% UpdateLagrangeMult - update Lagrange multipliers
+% -----------------------------------------------------------------
+function [lambdaG,lambdaH,G,H] = ...
+ UpdateLagrangeMult(x,nonlcon,lambdaG,lambdaH,Penalty)
+
+ % nonlinear constraints at x
+ [G,H] = nonlcon(x);
+ if isempty(G), G = 0.0; end
+ if isempty(H), H = 0.0; end
+
+ % update Lagrange multipliers for equality constraints
+ lambdaH = lambdaH + Penalty*H;
+
+ % update Lagrange multipliers for inequality constraints
+ lambdaG = max(0,lambdaG + Penalty*G);
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% ComputeErrorC - compute constraint error
+% -----------------------------------------------------------------
+function [ErrorC,SmallErrorC] = ...
+ ComputeErrorC(G,H,lambdaG,lambdaH,Penalty,TolCon)
+
+ % constraints violation metrics
+ ViolationEq = max(abs(H));
+ ViolationIn = max(min(-G,lambdaG/Penalty));
+
+ % constraints violation error
+ ErrorC = max(ViolationIn,ViolationEq);
+
+ % convergence indicator for constraint violation
+ SmallErrorC = abs(ErrorC) <= TolCon;
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% UpdatePenalty - update penalty parameter
+% -----------------------------------------------------------------
+function Penalty = UpdatePenalty(Penalty,PenaltyFactor,SmallErrorC)
+
+ % update penalty parameter
+ if ~SmallErrorC
+ Penalty = PenaltyFactor*Penalty;
+ end
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% CheckConv - verify the convergence
+% -----------------------------------------------------------------
+function ExitFlag = CheckConv(Fopt,SmallErrorS,SmallErrorC,CEobj)
+
+ % check if SmallErrorC is empty
+ if isempty(SmallErrorC)
+ SmallErrorC = true;
+ end
+
+ % default exit flag
+ ExitFlag = 0;
+
+ % check if maximum of iterations is reached
+ if CEobj.iter >= CEobj.MaxIter
+ ExitFlag = 1;
+ return
+ end
+
+ % check if maximum of stall iterations is reached
+ if CEobj.stall >= CEobj.MaxStall
+ ExitFlag = 2;
+ return
+ end
+
+ % check if the maximum of function evaluations is reached
+ if CEobj.Fcount >= CEobj.MaxFcount
+ ExitFlag = 3;
+ return
+ end
+
+ % check if both the function change and constraint error are small
+ if CEobj.iter >= CEobj.MaxStall
+
+ Idx1 = CEobj.iter;
+ Idx0 = CEobj.iter - CEobj.MaxStall + 1;
+
+ if range(CEobj.Fbest(Idx0:Idx1)) <= CEobj.TolFun && SmallErrorC
+ ExitFlag = 4;
+ return
+ end
+ end
+
+ % check if standard devition and constraint errors are small
+ if SmallErrorS && SmallErrorC
+ ExitFlag = 5;
+ return
+ end
+
+ % check if the admissible minimum is reached
+ if Fopt <= CEobj.MinFval
+ ExitFlag = 6;
+ return
+ end
+
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% PrintProgress - print iteration progress on the screen
+% -----------------------------------------------------------------
+function PrintProgress(t,Nvars,CEobj)
+
+ % print header in the first level
+ if t == 1 && Nvars <= 5
+ if CEobj.isConstrained
+ MyHeader = ['\n iter func value error std dev',...
+ ' error constr design variable(s) \n'];
+ else
+ MyHeader = ['\n iter func value error std dev',...
+ ' design variable(s) \n'];
+ end
+ fprintf(MyHeader);
+ elseif t == 1 && Nvars > 5
+ MyHeader = ['It is not possible to print more than',...
+ ' 5 design variables on the screen \n'];
+ fprintf(MyHeader);
+ if CEobj.isConstrained
+ MyHeader = ['\n iter func value error std dev',...
+ ' error constr \n'];
+ else
+ MyHeader = '\n iter func value error std dev \n';
+ end
+ fprintf(MyHeader);
+ end
+
+ % initial string with (t, F, Error)
+ if CEobj.isConstrained
+ MyString = '\n %5g %+.9E %.9E %.9E';
+ else
+ MyString = '\n %5g %+.9E %.9E';
+ end
+
+ % print values on screen
+ if Nvars <= 5
+ % string with (t, F, err, x)
+ for i=1:Nvars
+ MyString = strcat(MyString,' %+.6E');
+ end
+ % values with x
+ if CEobj.isConstrained
+ fprintf(MyString,t,CEobj.Fmean(t) ,...
+ CEobj.ErrorS(t),...
+ CEobj.ErrorC(t),...
+ CEobj.xmean(t,:));
+ else
+ fprintf(MyString,t,CEobj.Fmean(t) ,...
+ CEobj.ErrorS(t),...
+ CEobj.xmean(t,:));
+ end
+ else
+ % values without x
+ if CEobj.isConstrained
+ fprintf(MyString,t,CEobj.Fmean(t),CEobj.ErrorS(t),CEobj.ErrorC(t));
+ else
+ fprintf(MyString,t,CEobj.Fmean(t),CEobj.ErrorS(t));
+ end
+ end
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% PrintEnd - Display a summary of the optimization results
+% -----------------------------------------------------------------
+function PrintEnd(Xopt, Fopt, ExitFlag, CEobj)
+
+ % Interpret ExitFlag and display appropriate message
+ switch ExitFlag
+ case 1
+ Msg = 'Maximum number of iterations reached. ';
+ case 2
+ Msg = ['Solution stalled: no significant change in ', ...
+ 'objective function over a set number of iterations.'];
+ case 3
+ Msg = 'Maximum number of function evaluations reached.';
+ case 4
+ Msg = ['Objective function range has not changed significantly ', ...
+ 'after many iterations. '];
+ if CEobj.isConstrained
+ Msg = [Msg, 'Additionally, constraint violations are small ,', ...
+ 'indicating a potential solution. '];
+ end
+ case 5
+ Msg = ['Standard deviation variation is small, suggesting ', ...
+ 'convergence towards a solution. '];
+ if CEobj.isConstrained
+ Msg = [Msg,'Constraint violations are also small, ', ...
+ 'indicating satisfactory adherence to constraints. '];
+ end
+ case 6
+ Msg = 'Minimum function value criterion met. ';
+ otherwise
+ Msg = 'Unknown termination reason. ';
+ end
+ fprintf('\n\n%s\n',Msg);
+
+ % Provide warnings or recommendations based on ExitFlag
+ if ExitFlag == 1 || ExitFlag == 3
+ Msg = ['\nConsider increasing the maximum number of iterations ',...
+ 'or function evaluations.'];
+ fprintf(Msg);
+ elseif ExitFlag == 2 || ExitFlag == 4 || ExitFlag == 5
+ Msg = '\nSolution appears to be optimal within specified tolerances.';
+ fprintf(Msg);
+ elseif ExitFlag == 6
+ Msg = ['\nOptimization successfully found a solution meeting ',...
+ 'the minimum function value criterion.'];
+ fprintf(Msg);
+ end
+
+ disp(' ');
+ disp(' ');
+ disp('--------------------------------------------------------');
+ disp(' Summary of the Optimization Process with the CE method ');
+ disp('--------------------------------------------------------');
+
+ % Display the optimal value found
+ fprintf('Optimal Value Found: %+.6E\n', Fopt);
+
+ % Display the optimal point found
+ fprintf('Optimal Point Found: [');
+ for i = 1:length(Xopt)
+ fprintf('%+.6E ', Xopt(i));
+ if mod(i, 5) == 0 && i ~= length(Xopt)
+ % Break line for readability
+ fprintf('...\n ');
+ end
+ end
+ fprintf(']\n');
+
+ % Display the number of iterations performed
+ fprintf('Iterations Performed: %d\n', CEobj.iter);
+
+ % Display the number of stall iterations
+ fprintf('Iterations on Stall: %d\n', CEobj.stall);
+
+ % Display the total number of function evaluations
+ fprintf('Function Evaluations: %d\n', CEobj.Fcount);
+ disp('--------------------------------------------------------');
+end
+
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% DeleteEmptyEntries - delete empty entries from sampling records
+% -----------------------------------------------------------------
+function CEobj = DeleteEmptyEntries(t,CEobj)
+
+ if t < CEobj.MaxIter
+ CEobj.xmean = CEobj.xmean(1:t,:);
+ CEobj.xmedian = CEobj.xmedian(1:t,:);
+ CEobj.xbest = CEobj.xbest(1:t,:);
+ CEobj.Fmean = CEobj.Fmean(1:t,1);
+ CEobj.Fmedian = CEobj.Fmedian(1:t,1);
+ CEobj.Fbest = CEobj.Fbest(1:t,1);
+ CEobj.sigma = CEobj.sigma(1:t,:);
+ CEobj.ErrorS = CEobj.ErrorS(1:t,1);
+ CEobj.ErrorC = CEobj.ErrorC(1:t,1);
+ end
+ if ~CEobj.isConstrained
+ CEobj.ErrorC = [];
+ end
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% DomainSampling - sample from truncated Gaussian distribution
+% -----------------------------------------------------------------
+function X = DomainSampling(mu,sigma,lb,ub,Nvars,Ns,X)
+
+ % limit vectors for standard truncated Gaussian
+ l = ones(Ns,1)*((lb - mu)./sigma);
+ u = ones(Ns,1)*((ub - mu)./sigma);
+
+ % generate samples from truncated Gaussian distribution
+ for n=1:Nvars
+ X(:,n) = mu(n) + sigma(n)*trandn(l(:,n),u(:,n));
+ end
+end
+% -----------------------------------------------------------------
+
+% -----------------------------------------------------------------
+% trandn
+% -----------------------------------------------------------------
+% This function is an efficient generator of a random vector of
+% dimension length(l) = length(u) from the standard multivariate
+% normal distribution, truncated over the region [l,u]. Infinite
+% values for bounds 'u' and 'l' are accepted.
+%
+% Remark:
+% If you wish to simulate a random variable 'Z' from the
+% non-standard Gaussian N(m,s^2) conditional on l < Z < u, then
+% first simulate X = trandn((l-m)/s,(u-m)/s) and set Z = m + s*X.
+%
+% Input:
+% l - (Nvars x 1) lower bound
+% u - (Nvars x 1) upper bound
+%
+% Output:
+% x - (Nvars x 1) random vector with multiv. distribution N(0,1)
+%
+% References:
+% Botev, Z. I. (2016). "The normal law under linear restrictions:
+% simulation and estimation via minimax tilting". Journal of the
+% Royal Statistical Society: Series B (Statistical Methodology).
+% https://doi.org/10.1111/rssb.12162
+%
+% MATLAB Central File Exchange:
+% Z. Botev, Truncated Normal Generator
+% shorturl.at/hntuB
+% -----------------------------------------------------------------
+function x = trandn(l,u)
+ l = l(:); u = u(:); % make 'l' and 'u' column vectors
+ if length(l)~=length(u)
+ error('Truncation limits have to be vectors of the same length')
+ end
+ x = NaN(size(l));
+ a = .66; % treshold for switching between methods
+ % threshold can be tuned for maximum speed for each Matlab version
+ % three cases to consider:
+ % case 1: a < l < u
+ I = l > a;
+ if any(I)
+ tl = l(I); tu = u(I); x(I) = ntail(tl,tu);
+ end
+ % case 2: l < u < -a
+ J = u < -a;
+ if any(J)
+ tl=-u(J); tu = -l(J); x(J) = -ntail(tl,tu);
+ end
+ % case 3: otherwise use inverse transform or accept-reject
+ I = ~(I|J);
+ if any(I)
+ tl = l(I); tu = u(I); x(I) = tn(tl,tu);
+ end
+end
+
+% --- ntail ---
+% This function samples a column vector of dimension
+% length=length(l)=length(u) from the standard multivariate
+% normal distribution, truncated over the region [l,u], where
+% l > 0 and l and u are column vectors. It uses a sampling
+% algorithm based on acceptance-rejection from a Rayleigh
+% distribution similar to Marsaglia (1964).
+function x = ntail(l,u)
+ c = l.^2/2; n = length(l); f = expm1(c-u.^2/2);
+ x = c - reallog(1+rand(n,1).*f); % sample using Rayleigh
+ % keep list of rejected
+ I = find(rand(n,1).^2.*x>c); d = length(I);
+ while d > 0 % while there are rejections
+ cy = c(I); % find the thresholds of rejected
+ y = cy - reallog(1+rand(d,1).*f(I));
+ idx = rand(d,1).^2.*y tol, uses accept-reject from randn
+ I = abs(u-l) > tol; x = l;
+ if any(I)
+ tl = l(I); tu = u(I); x(I) = trnd(tl,tu);
+ end
+ % case: abs(u-l) < tol, uses inverse-transform
+ I = ~I;
+ if any(I)
+ tl = l(I); tu = u(I);
+ pl = erfc(tl/sqrt(2))/2; pu = erfc(tu/sqrt(2))/2;
+ x(I) = sqrt(2)*erfcinv(2*(pl-(pl-pu).*rand(size(tl))));
+ end
+end
+
+% --- trnd ---
+% This function uses an acceptance-rejection sampling strategy
+% to simulate from truncated normal.
+function x = trnd(l,u)
+ x = randn(size(l)); % sample normal
+ % keep list of rejected
+ I = find(x < l | x > u); d=length(I);
+ while d>0 % while there are rejections
+ ly = l(I); % find the thresholds of rejected
+ uy = u(I);
+ y = randn(size(ly));
+ idx = y > ly & y < uy; % accepted
+ x(I(idx)) = y(idx); % store the accepted
+ I = I(~idx); % remove accepted from list
+ d = length(I); % number of rejected
+ end
+end
+% -----------------------------------------------------------------
\ No newline at end of file
diff --git a/FraCTune-1.0/Case2-EnergyHarvester/FOSMCControllerEH.slx b/FraCTune-1.0/Case2-EnergyHarvester/FOSMCControllerEH.slx
new file mode 100644
index 0000000000000000000000000000000000000000..254c4accc574e2f41d24484cf4bc7d6d21ab46f9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