|
@@ -45,7 +45,7 @@ public class SimplePSO {
|
|
|
* Initiate the swarm with random values depending on the type of calculate
|
|
|
* (boolean or doubles)
|
|
|
*/
|
|
|
- private void initSwarmRandom() {
|
|
|
+ /*private void initSwarmRandom() {
|
|
|
for (int i = 0; i < Constants.SWARM_SIZE; i++) {
|
|
|
Particle p = new Particle(Constants.DIMENSIONS);
|
|
|
Coordinate<Vector<Object>> tempPos = new Coordinate<Vector<Object>>();
|
|
@@ -59,7 +59,7 @@ public class SimplePSO {
|
|
|
swarm.addMember(p);
|
|
|
}
|
|
|
initCoeff();
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
private void initSwarm(Coordinate<Vector<Object>> startPos) {
|
|
|
for (int i = 0; i < Constants.SWARM_SIZE; i++) {
|
|
@@ -129,7 +129,7 @@ public class SimplePSO {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void caclNextItSimplePSO(Model model, Control control, Coordinate<Vector<Object>> startPos) {
|
|
|
+/* public void caclNextItSimplePSO(Model model, Control control, Coordinate<Vector<Object>> startPos) {
|
|
|
initSwarm(startPos);
|
|
|
runFunction(model, control);
|
|
|
evaluate();
|
|
@@ -149,7 +149,7 @@ public class SimplePSO {
|
|
|
|
|
|
evaluate();
|
|
|
iterations++;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
/**
|
|
|
* The boolean-based function to update the velocity of a particle depending on
|
|
@@ -354,7 +354,7 @@ public class SimplePSO {
|
|
|
return iterations;
|
|
|
}
|
|
|
|
|
|
- private Coordinate<Vector<Object>> updateVelAdv(Coordinate<Vector<Object>> vel, Coordinate<Vector<Object>> pos,
|
|
|
+ /*private Coordinate<Vector<Object>> updateVelAdv(Coordinate<Vector<Object>> vel, Coordinate<Vector<Object>> pos,
|
|
|
Coordinate<Vector<Object>> bestLocal, int index) {
|
|
|
Coordinate<Vector<Object>> result = new Coordinate<Vector<Object>>();
|
|
|
for (int dim = 0; dim < Constants.DIMENSIONS; dim++) {
|
|
@@ -387,9 +387,9 @@ public class SimplePSO {
|
|
|
result.setCoord(newCoord, dim);
|
|
|
}
|
|
|
return result;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
- private Coordinate<Vector<Object>> updatePosAdv(Coordinate<Vector<Object>> vel, Coordinate<Vector<Object>> pos) {
|
|
|
+ /*private Coordinate<Vector<Object>> updatePosAdv(Coordinate<Vector<Object>> vel, Coordinate<Vector<Object>> pos) {
|
|
|
Coordinate<Vector<Object>> newPos = new Coordinate<Vector<Object>>();
|
|
|
for (int dim = 0; dim < Constants.DIMENSIONS; dim++) {
|
|
|
Vector<Object> newCoord = new Vector<Object>();
|
|
@@ -408,6 +408,6 @@ public class SimplePSO {
|
|
|
newPos.setCoord(newCoord, dim);
|
|
|
}
|
|
|
return newPos;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
}
|