|
@@ -15,7 +15,7 @@ public class TopologieObjectiveFunction {
|
|
|
//Parameters
|
|
|
|
|
|
//weight for f_g(H)
|
|
|
- static double w_eb = 0.2, w_max = 0.05, w_holon= 0.1, w_selection = .3, w_grid = 0.35;
|
|
|
+ static double w_eb = 0.3, w_max = 0.2, w_holon= 0.1, w_selection = .3, w_grid = 0.1;
|
|
|
|
|
|
|
|
|
//--> f_eb parameter
|
|
@@ -26,13 +26,13 @@ public class TopologieObjectiveFunction {
|
|
|
/**
|
|
|
* Maximum when all on Energie Difference(kappa)
|
|
|
*/
|
|
|
- static double k_max = 350000.f;
|
|
|
+ static double k_max = 450000.f;
|
|
|
|
|
|
//--> f_holon parameter
|
|
|
/**
|
|
|
- * maximum penalty from holon flexibilities
|
|
|
+ * maximum penalty from holon element distribution
|
|
|
*/
|
|
|
- static double k_holon= 220000;
|
|
|
+ static double k_holon= 100000;
|
|
|
|
|
|
|
|
|
//--> f_selection paramaeter;
|
|
@@ -50,13 +50,13 @@ public class TopologieObjectiveFunction {
|
|
|
/**
|
|
|
* The avergae shortest path maximum length -> kappa for the squash function
|
|
|
*/
|
|
|
- static double k_avg_shortest_path = 1650;
|
|
|
+ static double k_avg_shortest_path = 1600;
|
|
|
//Disjpijoint path cant have zero as output it starts with the value 1
|
|
|
static double centerValue_disjoint_path = 1.0;
|
|
|
static double k_disjoint_path = 2.4;
|
|
|
static double lambda_avg_shortest_path = 10;
|
|
|
static double lambda_disjoint_path = 10;
|
|
|
- static double k_grid = lambda_avg_shortest_path + lambda_disjoint_path;
|
|
|
+ static double k_grid = lambda_avg_shortest_path;// + lambda_disjoint_path;
|
|
|
|
|
|
|
|
|
|
|
@@ -129,9 +129,9 @@ public class TopologieObjectiveFunction {
|
|
|
//calculate f_holon
|
|
|
double f_holon = 0;
|
|
|
for(DecoratedNetwork net : state.getNetworkList()) {
|
|
|
- double f_elements_diviation_production = net.getDiviationInProductionInNetworkForHolonObjects();
|
|
|
- double f_elements_diviation_consumption = net.getDiviationInProductionInNetworkForHolonObjects();
|
|
|
- double f_element = f_elements_diviation_production+f_elements_diviation_consumption;
|
|
|
+ double f_elements_deviation_production = net.getDeviationInProductionInNetworkForHolonObjects();
|
|
|
+ double f_elements_deviation_consumption = net.getDeviationInConsumptionInNetworkForHolonObjects();
|
|
|
+ double f_element = f_elements_deviation_production+f_elements_deviation_consumption;
|
|
|
f_holon += f_element;
|
|
|
}
|
|
|
|
|
@@ -179,13 +179,13 @@ public class TopologieObjectiveFunction {
|
|
|
Graph G = GraphMetrics.convertDecoratedNetworkToGraph(net);
|
|
|
//We have to penalize single Networks;
|
|
|
if(G.V.length <= 1 || G.S.length <= 1) {
|
|
|
- f_grid += lambda_avg_shortest_path + lambda_disjoint_path;
|
|
|
+ f_grid += lambda_avg_shortest_path;// + lambda_disjoint_path;
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
double avgShortestPath = GraphMetrics.averageShortestDistance(G);
|
|
|
- double disjpointPaths = GraphMetrics.averageEdgeDisjointPathProblem(G);
|
|
|
- f_grid += avgShortestPathPenalty(avgShortestPath) + disjoinPathPenalty(disjpointPaths);
|
|
|
+ //double disjpointPaths = GraphMetrics.averageEdgeDisjointPathProblem(G);
|
|
|
+ f_grid += avgShortestPathPenalty(avgShortestPath);// + disjoinPathPenalty(disjpointPaths);
|
|
|
}
|
|
|
//take average to encourage splitting
|
|
|
f_grid /= state.getNetworkList().size();
|
|
@@ -193,13 +193,8 @@ public class TopologieObjectiveFunction {
|
|
|
|
|
|
|
|
|
|
|
|
- //avg disjoint path in jeden holon von jedem zu jedem element
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- printUnsquashedValues(f_eb, f_maximum, f_holon, f_selection, f_grid);
|
|
|
+ //printUnsquashedValues(f_eb, f_maximum, f_holon, f_selection, f_grid);
|
|
|
return (float) (w_eb * squash(f_eb, k_eb)
|
|
|
+ w_max * squash(f_maximum, k_max)
|
|
|
+ w_holon * squash(f_holon, k_holon)
|