|
@@ -15,10 +15,12 @@ public class ObjectiveFunctionByCarlos {
|
|
static double w_eb = .3, w_state = .3, w_pro = .2, w_perf = .1, w_holon=.1;
|
|
static double w_eb = .3, w_state = .3, w_pro = .2, w_perf = .1, w_holon=.1;
|
|
|
|
|
|
//kappas for squashing function
|
|
//kappas for squashing function
|
|
-// static double k_eb = 1500000.f, k_state = 40000, k_pro = 6000, k_perf = 15000, k_holon= 400000;
|
|
|
|
- static double k_eb = 750000.f, k_state = 20000, k_pro = 3000, k_perf = 15000, k_holon= 200000;
|
|
|
|
|
|
+//
|
|
|
|
+ static double k_eb = 1050000.f, k_state = 10000, k_pro = 2000, k_perf = 11000, k_holon= 150000;
|
|
|
|
+// oversupplied
|
|
|
|
+// static double k_eb = 750000.f, k_state = 20000, k_pro = 3000, k_perf = 15000, k_holon= 200000;
|
|
|
|
|
|
-// old values
|
|
|
|
|
|
+// old values undersupplied
|
|
// static double k_eb = 1000000.f, k_state = 15000, k_pro = 2100, k_perf = 12000, k_holon= 200000;
|
|
// static double k_eb = 1000000.f, k_state = 15000, k_pro = 2100, k_perf = 12000, k_holon= 200000;
|
|
|
|
|
|
//theta for f_pro
|
|
//theta for f_pro
|
|
@@ -92,10 +94,6 @@ public class ObjectiveFunctionByCarlos {
|
|
static public float getFitnessValueForState(DecoratedState state) {
|
|
static public float getFitnessValueForState(DecoratedState state) {
|
|
|
|
|
|
//Calculate f_eb the penalty for unbalenced energy in the network
|
|
//Calculate f_eb the penalty for unbalenced energy in the network
|
|
-
|
|
|
|
- //TODO: Hier sollte zwischen den Netzwerken verschiedenen Holons unterschieden werden dies ist in den Formeln nicht wiedergegeben
|
|
|
|
- // Kann somit schlechte und gute Netzwerke ausgleichen
|
|
|
|
- // Implementierung ist wie im paper.
|
|
|
|
double f_eb = 0;
|
|
double f_eb = 0;
|
|
//sum over all objects
|
|
//sum over all objects
|
|
for(DecoratedNetwork net : state.getNetworkList()) {
|
|
for(DecoratedNetwork net : state.getNetworkList()) {
|
|
@@ -181,8 +179,8 @@ public class ObjectiveFunctionByCarlos {
|
|
double q5 = squash(f_holon, k_holon);
|
|
double q5 = squash(f_holon, k_holon);
|
|
// System.out.print( "f_eb=" + q1);
|
|
// System.out.print( "f_eb=" + q1);
|
|
// System.out.print( " f_state=" + q2);
|
|
// System.out.print( " f_state=" + q2);
|
|
-// System.out.print( " f_pro=" + q3);
|
|
|
|
-// System.out.print( " f_perf=" + q4);
|
|
|
|
|
|
+// System.out.println( " f_pro=" + q3);
|
|
|
|
+// System.out.println( " f_perf=" + q4);
|
|
// System.out.println( " f_holon=" + q5);
|
|
// System.out.println( " f_holon=" + q5);
|
|
//
|
|
//
|
|
return (float) (w_eb * q1 + w_state * q2 + w_pro * q3 + w_perf * q4 + w_holon * q5);
|
|
return (float) (w_eb * q1 + w_state * q2 + w_pro * q3 + w_perf * q4 + w_holon * q5);
|