Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
the problem that I have face is from the beginning how to assign an empty solution to each bee .
I have a table pf packet(pid, sn_type , sn_value )
I want that each bee have a field from that table and by applying a fitness value that will discover which packet need to be sent first to be seen by doctors .

What I have tried:

package hadi;
public class Packet {
	
	private static final int D = 0;
	public int PAID;//* packet id */
	public int PID;/* patient id */
	public int SN_ID; /* sensor node id*/
	public String SN_type;/* sensor node type */
	public double SN_value; /* sensor node value */

	//Constructor  Packet

	public Packet(int PAID, int PID, int SN_ID, String SN_type, double SN_value) {
	this.PAID=PAID;
	this.PID=PID;
	this.SN_ID= SN_ID;
	this.SN_type=SN_type;
	this.SN_value=SN_value;
	}
public void display() {
System.out.println( "packet_id  =" + this.PAID +
    " , patient_id  = " + this.PID +
    " , sensor_node_id = " + this.SN_ID+
",sensor_node_type  : "+this.SN_type+
",sensor_node_value :  "+this.SN_value);

}
void init(int index)
{
   int j;
   for (j=0;j<D;j++)
		{
        double r = ((double)Math.random()*32767 / ((double)32767+(double)(1)) );
        tab[index][j]=r*(ub-lb)+lb;
		solution[j]=tab[index][j];
		}
	
}

}
Posted
Updated 15-Apr-18 3:43am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900