IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Programmation par agent Java Discussion :

Création d'un agent Jade avec Eclipse [Tutoriel]


Sujet :

Programmation par agent Java

  1. #1
    Expert éminent sénior

    Avatar de Djug
    Homme Profil pro
    Inscrit en
    Mai 2007
    Messages
    2 980
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : Algérie

    Informations forums :
    Inscription : Mai 2007
    Messages : 2 980
    Points : 17 970
    Points
    17 970
    Par défaut Création d'un agent Jade avec Eclipse
    Bonjour,
    voila je viens de terminer l'article sur la création d'un agent JADE sous eclipse

    http://djug.developpez.com/java/jade/creation-agent/

    vos remarques

  2. #2
    Membre émérite
    Avatar de xavlours
    Inscrit en
    Février 2004
    Messages
    1 832
    Détails du profil
    Informations forums :
    Inscription : Février 2004
    Messages : 1 832
    Points : 2 410
    Points
    2 410
    Par défaut
    Bonjour,

    j'ai utilisé Jade il y a un bon moment, et c'était déjà un outil très intéressant.

    Merci pour ce tutoriel, et ... vivement la suite !
    "Le bon ni le mauvais ne me feraient de peine si si si je savais que j'en aurais l'étrenne." B.V.
    Non au langage SMS ! Je ne répondrai pas aux questions techniques par MP.
    Eclipse : News, FAQ, Cours, Livres, Blogs.Et moi.

  3. #3
    Nouveau Candidat au Club
    Inscrit en
    Avril 2009
    Messages
    1
    Détails du profil
    Informations forums :
    Inscription : Avril 2009
    Messages : 1
    Points : 1
    Points
    1
    Par défaut
    j'ai essayé d'utiliser ton tuto, et d'ailleurs, je t'en remercie, il est très bien présenté, mais je n'arrive pas à créer mon agent...
    tout est bon, à part ça:
    15-Apr-2009 17:40:06 jade.core.AgentContainerImpl startBootstrapAgents
    SEVERE: Cannot create agent smith: Class firstAgent.HelloWorldAgent for agent ( agent-identifier :name smith@your-4105e587b6:1099/JADE ) not found [nested java.lang.ClassNotFoundException: firstAgent.HelloWorldAgent]
    c'est quoi l'erreur,

  4. #4
    Expert éminent sénior

    Avatar de Djug
    Homme Profil pro
    Inscrit en
    Mai 2007
    Messages
    2 980
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : Algérie

    Informations forums :
    Inscription : Mai 2007
    Messages : 2 980
    Points : 17 970
    Points
    17 970
    Par défaut
    Ce message d’erreur peut être vue suite l’utilisation non convenable de nom des package

    Apres avoir créé un nouveau projet avec eclipse on a deux choix
    Soit utiliser le package par default et y placer les classes et dans ce cas la il faut omettre le nom du package dans l’argument à passé au programme dans la fenêtre « run configuration »
    L’argument sera
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    -gui jade.boot smith:HelloWorldAgent
    Sans le “firstAgent”

    Soit créer un nouveau package et dans ce cas la utiliser le nom du package dans l’argument passé au programme dans la fenêtre « run configuration »

    Par exemple si le package est le firstAgent
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    -gui jade.boot smith:firstAgent.HelloWorldAgent
    J’espère que ceci règle ton problème

  5. #5
    Nouveau Candidat au Club
    Inscrit en
    Juin 2008
    Messages
    1
    Détails du profil
    Informations forums :
    Inscription : Juin 2008
    Messages : 1
    Points : 1
    Points
    1
    Par défaut Les arguments d'un agent mobile dans jade
    comments passea des argument pour un agent mobile est ce que j'utilise une liste ou de préference une bse de donnée..........?

  6. #6
    Expert éminent sénior

    Avatar de Djug
    Homme Profil pro
    Inscrit en
    Mai 2007
    Messages
    2 980
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : Algérie

    Informations forums :
    Inscription : Mai 2007
    Messages : 2 980
    Points : 17 970
    Points
    17 970
    Par défaut
    si tu lances l'agent à partir d'eclipse alors il suffit d'introduire les arguments juste après le nom de la classe entre (). de la manière suivante:


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    jade.Boot -gui agentName:agentClass(arg1 arg2 arg3)



    remarques bien qu'il n y a pas d'espace entre le nom de la classe et (

    sinon si tu lance l'agent à partir de l'interface graphique du jade


    voici un bout de code qui récupère les arguments d'un agent

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    import jade.core.Agent;
     
     
     
    public class agentArg extends Agent {
     
     
     
    	protected void setup(){
     
    		System.out.println("nom de l'agent"+ getLocalName());
    		Object[] args = getArguments();
    		if (args != null){
     
     
    			for (int i = 0; i < args.length; i++) {
     
    				System.out.println((String)args[i]);
    			}
     
    		}else{
    			System.out.println("pas d'arguments");
    		}
     
     
    	}
    }


    j'ai pas bien compris le rôle de la base de données et les listes dans les arguments. peux tu expliquer un peu plus ?

  7. #7
    Futur Membre du Club
    Profil pro
    Inscrit en
    Septembre 2009
    Messages
    3
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2009
    Messages : 3
    Points : 6
    Points
    6
    Par défaut communication entre agent mobile et agent PC
    Bonjour,
    Tout d'abord je vous félicite énormément pour la qualité du tutoriel que vous aviez mis en ligne, il est bien détaillé et précis comme il faut.
    En fait, je commence à travailler avec jade et je travaille sur un prototype où plusieurs agents PC communiquent entre eux mais doivent aussi communiquer avec un agent mobile. J'ai réussi à implémenter les agents PC et à faire échanger les messages entre eux, j'ai aussi réussi à créer l'agent mobile mais je n'arrive pas à savoir comment établir la communication entre cet agent mobile et le reste des agents PC.
    Après la lecture de toutes les ressources Jade et Leap, je vois que la meilleure façon et de mettre en place un Split Mode pour établir une telle communication, mais j'avoue qu'il n'existe aujourd'hui aucun tutoriel qui montre ça en détail et avec un exemple précis.
    Pour information, les agents PC sont implémentés sous Eclipse, alors que l'agent mobile je l'ai implémenté sous NetBeans (pour faciliter la création des interfaces).
    Je vous prie de bien vouloir nous montrer comment établir la communication entre un agent mobile et un agent PC, si c'est possible avec un petit exemple (un agent PC et un agent mobile avec les codes nécessaires à établir la communication). D'ailleurs ça serait vraiment très intéressant si vous arrivez à mettre en ligne un tutoriel aussi détaillé que le 1er et qui montre comment résoudre cette problématique.

    Merci d'avance

  8. #8
    Expert éminent sénior

    Avatar de Djug
    Homme Profil pro
    Inscrit en
    Mai 2007
    Messages
    2 980
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : Algérie

    Informations forums :
    Inscription : Mai 2007
    Messages : 2 980
    Points : 17 970
    Points
    17 970
    Par défaut
    mais tous d'abord que ce que vous appelez un agent mobile?

    est ce que c'est un agent qui ce déplace d'une machine à une autre sur le réseau (via l'addon Inter platform mobility service IMPS), ou un agent qui s'execute sur un appareil mobile ?

  9. #9
    Futur Membre du Club
    Profil pro
    Inscrit en
    Septembre 2009
    Messages
    3
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2009
    Messages : 3
    Points : 6
    Points
    6
    Par défaut
    Citation Envoyé par Djug Voir le message
    mais tous d'abord que ce que vous appelez un agent mobile?

    est ce que c'est un agent qui ce déplace d'une machine à une autre sur le réseau (via l'addon Inter platform mobility service IMPS), ou un agent qui s'execute sur un appareil mobile ?
    Bonjour,
    Pardonnez mon énoncé pas trop précis. En fait, il s'agit d'un agent qui doit s'éxecuter sur un tél mobile. Actuellement je l'ai implémenté sous NetBeans et je lance son éxecution dans l'émulateur SmartPhone intégré.

    Merci

  10. #10
    Expert éminent sénior

    Avatar de Djug
    Homme Profil pro
    Inscrit en
    Mai 2007
    Messages
    2 980
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : Algérie

    Informations forums :
    Inscription : Mai 2007
    Messages : 2 980
    Points : 17 970
    Points
    17 970
    Par défaut
    désolé j'ai pas encore travaillé sur ce type d'agents, j'en ai travailler -en matière de mobilité d'agent JADE - que sur la mobilité dans le sens de se déplacer d'un nœud à u autre sur un réseau

  11. #11
    Futur Membre du Club
    Profil pro
    Inscrit en
    Septembre 2009
    Messages
    3
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2009
    Messages : 3
    Points : 6
    Points
    6
    Par défaut
    Ok, je remercie votre réactivité et les réponses apportées.
    Sinon, le problème c'est qu'on ne trouve pas sur le web et dans les ressources, des exemples ou des documents qui parlent de la communication agent mobile - agent PC. J'espère que les prochaines ressources Jade en parlent.

  12. #12
    Futur Membre du Club
    Inscrit en
    Janvier 2010
    Messages
    6
    Détails du profil
    Informations forums :
    Inscription : Janvier 2010
    Messages : 6
    Points : 9
    Points
    9
    Par défaut
    Bonjour tt le monde:
    notre thème est le contour actif (snake) et en utilisant les agents (chaque agent est responsable à une point de snake) sous la plate forme jade ,le langage utilisé java ,voici notre code source:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    package info;
    //import info.Cadre1.*;
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.table.*;
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    import java.applet.*;
    import info.Cadre1.*;
    import info.FiltreSobel.*;
    import info.AvancementEvent.*;
     
    import java.util.Vector;
    public class Snake extends FiltreAvancement{
    Point tab_point[]=new Point[100];
    Point tab_vois[]=new Point[100];
    public void greedy(int Xs,int Ys,int taille_filtre,int Nb_Point,double Rayon,int criter_arret,float p_s,float coef_eng_cont,float coef_eng_cour,float coef_eng_bal,float coef_eng_gra,int seuil)  { 
    int Nb_vois=taille_filtre*taille_filtre;
    float energ_cont[]=new float[1000];
    float ener_cour[]=new float[1000];
    int ener_grad[][]=new int[1000][1000];
    float ener_ballon[]=new float[1000];
    float ener_total[]=new float[1000];
     
     
    //BufferedImage imagee[];
    File b1[]=null;
    int im=0;
    int w = Cadre1.imageF[0].getWidth(null);
    int h = Cadre1.imageF[0].getHeight(null);
    //imagee=new BufferedImage [100];
    Object [][]col=new Object[100][100];
    //String[] titreColonnes = { "Image","nb iteration", "Temps execution La Methode1"};
    //table.jTable1 = new JTable(col,titreColonnes);
    File fr=new File("Resultat Snake");
    if(fr.exists())
            {
            	b1=fr.listFiles();
            	for(int i=0;i < b1.length ;i++)
                {
            	     b1[i].delete();
            	}//fr.delete();
            }
            //	
            else fr.mkdir();
    im=0;{
    //Calendar now = Calendar.getInstance();
    //int mm = now.get(Calendar.MINUTE);
    //int hh = now.get(Calendar.SECOND);
    //int ss = now.get(Calendar.MILLISECOND);
    ///////////////////////////////////////////////////////////////////////////////////////////
    FiltreSobel s = new FiltreSobel();
    s.filtrerImage(Cadre1.image[0],true,seuil);
    for (int i = 0; i <Cadre1.image[im].getWidth(null); i++) {
    for (int j = 0; j < Cadre1.image[im].getHeight(null); j++) {
    ener_grad[i][j] =s.pf[i][j];
    }
    }
    //////////////Normalisation de gradient/////////////////////////////////////////////////////
           /* int w = Cadre1.imagee[im].getWidth(null);
            int h = Cadre1.imageFiltre_sobel[im].getHeight(null);*/
            int min_ene_grd = minimum1(ener_grad, w, h);
            int max_ene_grd = calcMaximum1(ener_grad, w, h);
            for (int i = 0; i < w; i++) {
              for (int  j = 0; j < h; j++) {
                ener_grad[i][j] = (ener_grad[i][j] - min_ene_grd)/(max_ene_grd - min_ene_grd);
              }
            }
    ///////////////////////////////////////////////////////////////////////////////////////////////
            int i, v;
            Graphics g = ContourActif.paneauImage[im].getGraphics();
            double alpha = 2 * (Math.PI) / Nb_Point;
            for (int nb = 0; nb < Nb_Point; nb++) {
              tab_point[nb] = new Point( (int) (Xs - Math.sin(alpha * (nb)) * Rayon),(int) (Ys - Math.cos(alpha * (nb)) * Rayon));
            }
     boolean check=ContourActif.jCheckBox2.isSelected();
    if(check)
    {       
    for (int nb = 0; nb < Nb_Point; nb++) {
    //if (nb % 2 == 0)
    //{
    Cadre1.imageF[im].setRGB(tab_point[nb].x, tab_point[nb].y,Color.RED.getRGB());
    tab_vois=new Point[Nb_vois+1];
    tab_vois = voisinage(nb, 3);
    for (v = 0; v < 9; v++) {
    Cadre1.imageF[im].setRGB(tab_vois[v].x, tab_vois[v].y,Color.RED.getRGB());	
    }//}
    //else
    /*{
    Cadre1.imageF[im].setRGB(tab_point[nb].x, tab_point[nb].y,Color.RED.getRGB());
    tab_vois=new Point[Nb_vois+1];
    tab_vois = voisinage(nb, 3);
    for (v = 0; v < 9; v++) {
    Cadre1.imageF[im].setRGB(tab_vois[v].x, tab_vois[v].y,Color.RED.getRGB());	
    }}*/
    }
    g.drawImage(Cadre1.imageF[im], 0, 0, null);}
    ////////////////////////////debut algo greedy1111111111111/////////////////////////////////////////////////////////////////////////////////////
     
            int iteration = 0;
            int nb1;int ps=0;
    while (iteration < criter_arret && ps<p_s/100) {
    	ps=0;
              for (nb1 = 0; nb1 < Nb_Point; nb1++) {
              	tab_vois=new Point[Nb_vois+1];
                tab_vois = voisinage(nb1, taille_filtre);
                /* for (int nb=0; nb<taille_filtre*taille_filtre; nb++) {
                 System.out.println("vois"+tab_vois[nb1]);
                 }*/
    // System.out.println("////////////////////////////////////////////////");
    ///////////////////////////////distance moyenne///////////////////////////////////////////////////////////////////////////////////
                double D_M = 0;
                int indexD, point, point_1;
                double d_m = 0;
                for (indexD = 0; indexD < Nb_Point; indexD++) {
                  if (indexD == Nb_Point - 1) {
                    point = Nb_Point - 1;
                    point_1 = 0;
                  }
                  else {
                    point = indexD;
                    point_1 = indexD + 1;
                  }
                  d_m = d_m +Math.sqrt(Math.pow( (tab_point[point].x -tab_point[point_1].x), 2) +Math.pow( (tab_point[point].y -tab_point[point_1].y), 2));
                }
                d_m = d_m / Nb_Point;
    /////////////////////////////////////Calcul des  energies/////////////////////////////////////////////////////////////////////////
    //////////////////////////////////energie de continuite///////////////////////////////////////////////////////////////////////////
                for (v = 0; v < taille_filtre * taille_filtre; v++) {
                  int point_AR; //int d=taille*taille;
                  if (nb1 == 0) {
                    point_AR = Nb_Point - 1;
                  }
                  else {
                    if (nb1 == Nb_Point - 1) {
                      point_AR = nb1 - 1;
                    }
                    else {
                      point_AR = nb1 - 1;
                    }
                  }
    //**** 0.5 (distance moyenne -la racine de [(Xi-Xi-1)2 + (Yi-Yi-1)]) *********
                   energ_cont[v] = (float) (0.5 *Math.abs(d_m -(Math.sqrt(Math.pow( (tab_point[point_AR].x - tab_vois[v].x), 2) +Math.pow( (tab_point[point_AR].y - tab_vois[v].y), 2)))));
    //System.out.println("energie continuite"+"  "+energ_cont[v]);
    ///////////////////// ///////////////////////energie courbure///////////////////////////////////////////////////////////////////////
                  int point_AV;
                  if (nb1 == 0) {
                    point_AR = Nb_Point - 1;
                    point_AV = nb1 + 1;
                  }
                  else {
                    if (nb1 == Nb_Point - 1) {
                      point_AR = nb1 - 1;
                      point_AV = 0;
                    }
                    else {
                      if (nb1 == Nb_Point - 2) {
                        point_AR = nb1 - 1;
                        point_AV = nb1 + 1;
                      }
                      else {
                        if (nb1 == 1) {
                          point_AR = nb1 - 1;
                          point_AV = nb1 + 1;
                        }
                        else {
                          point_AR = nb1 - 1;
                          point_AV = nb1 + 1;
                        }
                      }
                    }
                  }
    //****0.5[(Xi-1 -2Xi +Xi+1)  +   (Yi-1  -2Yi +Yi+1)]****
    ener_cour[v] = (float) (0.5 *(Math.pow( (tab_point[point_AR].x -2 * (tab_vois[v].x) + tab_point[point_AV].x), 2) +Math.pow(tab_point[point_AR].y -2 * tab_vois[v].y +tab_point[point_AV].y, 2)));
    //System.out.println("energie courbure"+"  "+ener_cour[v]);
    //////////////////////////////////////////energie de ballon////////////////////////////////////////////////////////////////////////
    ener_ballon[v] = (tab_vois[v].x - Xs) *(tab_vois[v].x - tab_point[nb1].x) +(tab_vois[v].y - Ys) * (tab_vois[v].y - tab_point[nb1].y);
    //System.out.println("energie ballon"+"  "+ener_ballon[v]);?????????????????????
                } //vois
    //System.out.println("//////////////////////////");
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ///////////////////Normalisation des energies/////////////////////////
                float min_eng_cont = minimum(energ_cont,taille_filtre * taille_filtre);
                float max_eng_cont = calcMaximum(energ_cont);
                float min_eng_cour = minimum(ener_cour,taille_filtre * taille_filtre);
                float max_eng_cour = calcMaximum(ener_cour);
                float min_eng_bal = minimum(ener_ballon,taille_filtre * taille_filtre);
                float max_eng_bal = calcMaximum(ener_ballon);
                for (v = 0; v < taille_filtre * taille_filtre; v++) {
                  energ_cont[v] = ( (energ_cont[v] - min_eng_cont) /(max_eng_cont - min_eng_cont));
                  ener_cour[v] = (ener_cour[v] - min_eng_cour) /(max_eng_cour - min_eng_cour);
                  ener_ballon[v] = (ener_ballon[v] - min_eng_bal) /(max_eng_bal - min_eng_bal);
                  //ener_total[v] = (coef_eng_cont * energ_cont[v]) +(coef_eng_cour * ener_cour[v]) +( (coef_eng_bal) * ener_ballon[v]) +(coef_eng_gra * ener_grad[tab_vois[v].x][tab_vois[v].y]);
                }
    ///////////////////////////////////////////////////////////////////////
    for (int v1 = 0; v1 < taille_filtre * taille_filtre; v1++) {
     
                  ener_total[v1] = (coef_eng_cont * energ_cont[v1]) +(coef_eng_cour * ener_cour[v1]) +( (coef_eng_bal) * ener_ballon[v1]) +(coef_eng_gra * ener_grad[tab_vois[v1].x][tab_vois[v1].y]);
                }
                int min = minimum2(ener_total, taille_filtre * taille_filtre);           
                    int r = (tab_vois[min].x);
                    int f = (tab_vois[min].y);
                    if (r ==tab_point[nb1].x && f ==tab_point[nb1].y ) {
    ps=ps+1;
    }else tab_point[nb1] = new Point(r, f);
    } //nb1
    ps=ps/Nb_Point;
    check=ContourActif.jCheckBox1.isSelected();
    if(check)
    {
    for (int nb = 0; nb < Nb_Point; nb++)
    {
    if (nb % 2 == 0)
    {
    Cadre1.imageF[im].setRGB(tab_point[nb].x, tab_point[nb].y,Color.red.getRGB());
    tab_vois=new Point[Nb_vois+1];
    tab_vois = voisinage(nb, 3);
    for (v = 0; v < 9; v++) {
    Cadre1.imageF[im].setRGB(tab_vois[v].x, tab_vois[v].y,Color.red.getRGB());	
    }}
    else
    {
    Cadre1.imageF[im].setRGB(tab_point[nb].x, tab_point[nb].y,Color.GREEN.getRGB());
     
    tab_vois=new Point[Nb_vois+1];
    tab_vois = voisinage(nb, 3);
    for (v = 0; v < 9; v++) {
    Cadre1.imageF[im].setRGB(tab_vois[v].x, tab_vois[v].y,Color.GREEN.getRGB());	
    }}
    }
    g.drawImage(Cadre1.imageF[im], 0, 0, null);}
    else 
    {
    if(ps >=p_s/100 || iteration==criter_arret-1)
    {
    for (int nb = 0; nb < Nb_Point; nb++)
    {
    if (nb % 2 == 0)
    {
    Cadre1.imageF[im].setRGB(tab_point[nb].x, tab_point[nb].y,Color.red.getRGB());
    tab_vois=new Point[Nb_vois+1];
    tab_vois = voisinage(nb, 3);
    for (v = 0; v < 9; v++) {
    Cadre1.imageF[im].setRGB(tab_vois[v].x, tab_vois[v].y,Color.red.getRGB());	
    }}
    else
    {
    Cadre1.imageF[im].setRGB(tab_point[nb].x, tab_point[nb].y,Color.GREEN.getRGB());
    tab_vois=new Point[Nb_vois+1];
    tab_vois = voisinage(nb, 3);
    for (v = 0; v < 9; v++) {
    Cadre1.imageF[im].setRGB(tab_vois[v].x, tab_vois[v].y,Color.GREEN.getRGB());	
    }}}}
    g.drawImage(Cadre1.imageF[im], 0, 0, null);}
    iteration++;
    } //iteration
    table.jTable1.setValueAt(im,im,0);
    table.jTable1.setValueAt(iteration,im,1);
    Calendar dateDepart = Calendar.getInstance();
    int m =  dateDepart.get (Calendar.MINUTE);
    int h1 = dateDepart.get(Calendar.SECOND);
    int s1 = dateDepart.get(Calendar.MILLISECOND);
    //String tims=Integer.toString(s1-ss);
    //String timh=Integer.toString(h1-hh);
    //String timm=Integer.toString(m-mm);
    //table.jTable1.setValueAt(timm+"M"+" - "+timh+"S"+" - "+tims+"MS",im,2);
     
    Enregistrement e=new Enregistrement(); 
                       File t=new File("Resultat methode1\\"+"image"+im+".png");                                    
                       e.enregistrer(1,Cadre1.imageF[im],t);
    }//tr2ai_image0
    int sumX=0,sumY=0;
    for (int i = 0; i < Nb_Point; i++)         
    {
    sumX=sumX+tab_point[i].x;
    sumY=sumY+tab_point[i].y;	
    }
    //Xs=sumX/Nb_Point;
    //Ys=sumY/Nb_Point;
    /*for ( im = 1; im < (Cadre1.b.length)-1; im++)
    {
    Calendar now = Calendar.getInstance();
    int mm = now.get(Calendar.MINUTE);
    int hh = now.get(Calendar.SECOND);
    int ss = now.get(Calendar.MILLISECOND);
    //imagee[im] = Cadre1.imageF[im];
    FiltreSobel s=new FiltreSobel();
    s.filtrerImage(Cadre1.imageF[im],true,seuil);
    for (int i = 0; i < w; i++) {
    for (int j = 0; j < h; j++) {
    ener_grad[i][j] = s.pf[i][j];
    //System.out.print(ener_grad1[i][j]);
    }}
    //////////////Normalisation de gradient/////////////////////////////////////////////////////
            int min_ene_grd = minimum1(ener_grad, w, h);
            int max_ene_grd = calcMaximum1(ener_grad, w, h);
            for (int i = 0; i < w; i++) {
              for (int j = 0; j < h; j++) {
                ener_grad[i][j] = (ener_grad[i][j] - min_ene_grd) /
                    (max_ene_grd - min_ene_grd);
              }
            }
    ///////////////////////////////////////////////////////////////////////////////////////////////
    int i, v;
    Graphics g1 = Cadre1.panneauImage[im].getGraphics();
    double alpha = 2 * (Math.PI) / Nb_Point;
    for (int nb = 0; nb < Nb_Point; nb++) {
    tab_point[nb] = new Point( (int) (Xs - Math.sin(alpha * (nb)) * Rayon),(int) (Ys - Math.cos(alpha * (nb)) * Rayon));
    }
    boolean check=ContourActif.jCheckBox2.isSelected();
    if(check && im!=0)
    {
    for (int nb = 0; nb < Nb_Point; nb++) {
    if (nb % 2 == 0)
    {
    Cadre1.imageF[im].setRGB(tab_point[nb].x, tab_point[nb].y,Color.BLUE.getRGB());
    tab_vois=new Point[Nb_vois+1];
    tab_vois = voisinage(nb, 3);
    for (v = 0; v < 9; v++) {
    Cadre1.imageF[im].setRGB(tab_vois[v].x, tab_vois[v].y,Color.BLUE.getRGB());	
    }}
    else
    {
    Cadre1.imageF[im].setRGB(tab_point[nb].x, tab_point[nb].y,Color.BLUE.getRGB());
    tab_vois=new Point[Nb_vois+1];
    tab_vois = voisinage(nb, 3);
    for (v = 0; v < 9; v++) {
    Cadre1.imageF[im].setRGB(tab_vois[v].x, tab_vois[v].y,Color.BLUE.getRGB());	
    }}
    }
    g1.drawImage(Cadre1.imageF[im], 0, 0, null);}
    ////////////////////////////debut algo greedy22222/////////////////////////////////////////////////////////////////////////////////////
    /*int iteration = 0;int nb1, ps=0;
    while (iteration < criter_arret && ps < p_s/100) {
    ps=0;
    for (nb1 = 0; nb1 < Nb_Point; nb1++) {
    	tab_vois=new Point[Nb_vois+1];
    tab_vois = voisinage(nb1, taille_filtre);
    /* for (int nb=0; nb<taille_filtre*taille_filtre; nb++) {
     System.out.println("vois"+tab_vois[nb1]);
      }*/
    // System.out.println("////////////////////////////////////////////////");
    ///////////////////////////////distance moyenne///////////////////////////////////////////////////////////////////////////////////
    /*double D_M = 0;
    int indexD, point, point_1;
    double d_m = 0;
    for (indexD = 0; indexD < Nb_Point; indexD++) {
    if (indexD == Nb_Point - 1) {
    point = Nb_Point - 1;
    point_1 = 0;
    }
    else {
    point = indexD;
    point_1 = indexD + 1;
    }
    d_m = d_m +
    Math.sqrt(Math.pow( (tab_point[point].x-tab_point[point_1].x), 2) +Math.pow( (tab_point[point].y -tab_point[point_1].y), 2));
    }
    d_m = d_m / Nb_Point;
    /////////////////////////////////////Calcul des  energies/////////////////////////////////////////////////////////////////////////
    //////////////////////////////////energie de continuite///////////////////////////////////////////////////////////////////////////
    for (v = 0; v < taille_filtre * taille_filtre; v++) {
    int point_AR; 
    if (nb1 == 0) {
    point_AR = Nb_Point - 1;
    }
    else {
    if (nb1 == Nb_Point - 1) {
    point_AR = nb1 - 1;
    }
    else {
    point_AR = nb1 - 1;
    }
    }
    //**** 0.5 (distance moyenne -la racine de [(Xi-Xi-1)2 + (Yi-Yi-1)]) *********
    energ_cont[v] = (float) (0.5 *Math.abs(d_m -(Math.sqrt(Math.pow( (tab_point[point_AR].x - tab_vois[v].x), 2) +Math.pow( (tab_point[point_AR].y - tab_vois[v].y), 2)))));
    //System.out.println("energie continuite"+"  "+energ_cont[v]);
    ///////////////////// ///////////////////////energie courbure///////////////////////////////////////////////////////////////////////
    int point_AV;
    if (nb1 == 0) {
    point_AR = Nb_Point - 1;
    point_AV = nb1 + 1;
    }
    else {
    if (nb1 == Nb_Point - 1) {
    point_AR = nb1 - 1;
    point_AV = 0;
    }
    else {
    if (nb1 == Nb_Point - 2) {
    point_AR = nb1 - 1;
    point_AV = nb1 + 1;
    }
    else {
    if (nb1 == 1) {
    point_AR = nb1 - 1;
    point_AV = nb1 + 1;
    }
    else {
    point_AR = nb1 - 1;
     point_AV = nb1 + 1;
     }}}}
    //****0.5[(Xi-1 -2Xi +Xi+1)  +   (Yi-1  -2Yi +Yi+1)]****
    ener_cour[v] = (float) (0.5*(Math.pow((tab_point[point_AR].x -2*(tab_vois[v].x) + tab_point[point_AV].x), 2) +Math.pow(tab_point[point_AR].y -2 * tab_vois[v].y +tab_point[point_AV].y, 2)));
    //System.out.println("energie courbure"+"  "+ener_cour[v]);
    //////////////////////////////////////////energie de ballon////////////////////////////////////////////////////////////////////////
    ener_ballon[v] = (tab_vois[v].x - Xs) *(tab_vois[v].x - tab_point[nb1].x) +(tab_vois[v].y - Ys) * (tab_vois[v].y - tab_point[nb1].y);
    //System.out.println("energie ballon"+"  "+ener_ballon[v]);
    } //vois
    //System.out.println("//////////////////////////");
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ///////////////////Normalisation des energies/////////////////////////
    float min_eng_cont = minimum(energ_cont,taille_filtre * taille_filtre);
    float max_eng_cont = calcMaximum(energ_cont);
    float min_eng_cour = minimum(ener_cour,taille_filtre * taille_filtre);
    float max_eng_cour = calcMaximum(ener_cour);
    float min_eng_bal = minimum(ener_ballon,taille_filtre * taille_filtre);
    float max_eng_bal = calcMaximum(ener_ballon);
    for (v = 0; v < taille_filtre * taille_filtre; v++) {
    energ_cont[v] = ( (energ_cont[v] - min_eng_cont) /(max_eng_cont - min_eng_cont));
    ener_cour[v] = (ener_cour[v] - min_eng_cour) /(max_eng_cour - min_eng_cour);
    ener_ballon[v] = (ener_ballon[v] - min_eng_bal) /(max_eng_bal - min_eng_bal);
    ener_total[v] = (coef_eng_cont * energ_cont[v]) +(coef_eng_cour * ener_cour[v]) +( (coef_eng_bal) * ener_ballon[v]) +(coef_eng_gra * ener_grad[tab_vois[v].x][tab_vois[v].y]);
    }
    ///////////////////////////////////////////////////////////////////////
    int min = minimum2(ener_total, taille_filtre * taille_filtre);
    int r = (tab_vois[min].x);
    int f = (tab_vois[min].y);
    if (r ==tab_point[nb1].x && f ==tab_point[nb1].y ) {
    ps=ps+1;
    }else 
    {
    if(r!=0 && f!=0 && r!=w && f!=h)
    tab_point[nb1] = new Point(r, f);}
    } //nb1
    ps=ps/Nb_Point;
     check=ContourActif.jCheckBox1.isSelected();
    if(check)
    {
    for (int nb = 0; nb < Nb_Point; nb++)
    {
    if (nb % 2 == 0)
    {
    Cadre1.imageF[im].setRGB(tab_point[nb].x, tab_point[nb].y,Color.red.getRGB());
    tab_vois=new Point[Nb_vois+1];
    tab_vois = voisinage(nb, 3);
    for (v = 0; v < 9; v++) {
    Cadre1.imageF[im].setRGB(tab_vois[v].x, tab_vois[v].y,Color.red.getRGB());	
    }}
    else
    {
    Cadre1.imageF[im].setRGB(tab_point[nb].x, tab_point[nb].y,Color.GREEN.getRGB());
    tab_vois=new Point[Nb_vois+1];
    tab_vois = voisinage(nb, 3);
    for (v = 0; v < 9; v++) {
    Cadre1.imageF[im].setRGB(tab_vois[v].x, tab_vois[v].y,Color.GREEN.getRGB());	
    }}
    }
    g1.drawImage(Cadre1.imageF[im], 0, 0, null);}
    else 
    {
    if(ps >=p_s/100 || iteration==criter_arret-1)
    {
    	for (int nb = 0; nb < Nb_Point; nb++)
    {
    if (nb % 2 == 0)
    {
    Cadre1.imageF[im].setRGB(tab_point[nb].x, tab_point[nb].y,Color.red.getRGB());
    tab_vois=new Point[Nb_vois+1];
    tab_vois = voisinage(nb, 3);
    for (v = 0; v < 9; v++) {
    Cadre1.imageF[im].setRGB(tab_vois[v].x, tab_vois[v].y,Color.red.getRGB());	
    }}
    else
    {
    Cadre1.imageF[im].setRGB(tab_point[nb].x, tab_point[nb].y,Color.GREEN.getRGB());
    tab_vois=new Point[Nb_vois+1];
    tab_vois = voisinage(nb, 3);
    for (v = 0; v < 9; v++) {
    Cadre1.imageF[im].setRGB(tab_vois[v].x, tab_vois[v].y,Color.GREEN.getRGB());	
    }}}}
    g1.drawImage(Cadre1.imageF[im], 0, 0, null);}		
    iteration++;
    } //iteration*/
    //table.jTable1.setValueAt(im,im,0);
    //table.jTable1.setValueAt(iteration,im,1);
    //Calendar dateDepart = Calendar.getInstance();
    //int m =  dateDepart.get (Calendar.MINUTE);
    //int h1 = dateDepart.get(Calendar.SECOND);
    //int s1 = dateDepart.get(Calendar.MILLISECOND);
    //String tims=Integer.toString(s1-ss);
    //String timh=Integer.toString(h1-hh);
    //String timm=Integer.toString(m-mm);
    //table.jTable1.setValueAt(timm+"M"+" - "+timh+"S"+" - "+tims+"MS",im,2);
    // sumX=0;sumY=0;
    //for ( i = 0; i < Nb_Point; i++)         
    //{
    //sumX=sumX+tab_point[i].x;
    //sumY=sumY+tab_point[i].y;	
    //}
    //Xs=sumX/Nb_Point;
    //Ys=sumY/Nb_Point;
    //Cadre1.imagee[im]=imagee[im];
     
     
    /*Enregistrement e=new Enregistrement(); 
                       File t=new File("Resultat methode1\\"+"image"+im+".png");                                    
                       e.enregistrer(1,Cadre1.imageF[im],t);
    } trai_image*/  	
    }//fin void snake
    /////////////////////////////// METHODE POUR INITIALISATION///////
    public void initialise(int Nb_point,int xc,int yc,int R)
    {Point tab_vois[]=new Point[9];
    Graphics g1 = Cadre1.panneauImage[0].getGraphics();
    double alpha = 2 * (Math.PI) / Nb_point;
    for (int nb = 0; nb < Nb_point; nb++) {
    tab_point[nb] = new Point( (int) (xc - Math.sin(alpha * (nb)) * R),(int) (yc - Math.cos(alpha * (nb)) * R));
    }
    for (int nb = 0; nb < Nb_point; nb++) {
    if (nb % 2 == 0)
    {
    Cadre1.imageF[0].setRGB(tab_point[nb].x, tab_point[nb].y,Color.BLUE.getRGB());
    tab_vois = voisinage(nb, 3);
    for (int v = 0; v < 9; v++) {
    Cadre1.imageF[0].setRGB(tab_vois[v].x, tab_vois[v].y,Color.BLUE.getRGB());	
    }}
    else
    {
    Cadre1.imageF[0].setRGB(tab_point[nb].x, tab_point[nb].y,Color.BLUE.getRGB());
    tab_vois = voisinage(nb, 3);
    for (int v = 0; v < 9; v++) {
    Cadre1.imageF[0].setRGB(tab_vois[v].x, tab_vois[v].y,Color.BLUE.getRGB());	
    }}
    }
    g1.drawImage(Cadre1.imageF[0], 0, 0, null);	
    }//////////////////////
    /*public void TempsExecution()
    {
     table  cadre2;
     
           boolean packFrame = false;
                           cadre2=new table ();
                          if (packFrame) {
                          cadre2.pack();
                                      }
                          else {cadre2.validate(); }
                                //Centrer la fentre
                          Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
                          Dimension frameSize = cadre2.getSize();
                          if (frameSize.height > screenSize.height) {
                          frameSize.height = screenSize.height;
                                                             }
                         if (frameSize.width > screenSize.width) {
                          frameSize.width = screenSize.width;
                                                           }
                          cadre2.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
                          cadre2.setVisible(true);
    }*/
    public Point []voisinage(int point,int ta){//////METHODE DE VOISINAGE
    int bix,biy,bsx,bsy,j,v = 0;
    bix = tab_point[point].x -(int)(ta/2);
    bsx =  tab_point[point].x +(int) (ta/2) ;
    Point tab_v[]=new Point[100];
    biy = tab_point[point].y - (int)(ta/2);
    bsy = tab_point[point].y +(int)(ta/2);
    for(int i = bix ; i <= bsx ; i++)
    {
    for(j = biy ; j <= bsy ; j++)
    {
    tab_v[v]=new Point(i,j);v++;
    }}return tab_v;}
    /////////////////////////////////////////////METHODE PR CALCUL MAX
    float calcMaximum(float mesnombres[])
    {float maxvaleur = 0;
    for (int ii = 0; ii < mesnombres.length; ii++)
    {if (mesnombres[ii] > maxvaleur){maxvaleur = mesnombres[ii];}
    }return maxvaleur;}
    //////////////////////////////////////////////////////////////METHODE PR CALCUL MIN------------------------------------------------------
    float minimum(float[] t,int taille) {
    float minvaleur =t[0];
    for (int i = 0; i < taille; i++)
    {
    if (t[i]<minvaleur){minvaleur = t[i];}
    }return minvaleur;}
    //////////////////////////////////////////////////////////////
    int minimum2(float[] t,int taille) {
    int indice=taille/2;;
    float minvaleur =t[indice];
    for (int i = 0; i < taille; i++)
    {
    if (t[i]<minvaleur){minvaleur = t[i];indice=i;}
    }return indice;}
    //////////////////////////////////////////////MAX DE MATRICE////////////////
    int calcMaximum1(int mesnombres[][],int w,int h)
    {int maxvaleur = 0;
    for (int ii = 0; ii < w; ii++)
    { for (int jj = 0; jj < h; jj++)
    {if (mesnombres[ii][jj] > maxvaleur){maxvaleur = mesnombres[ii][jj];}
    }}return maxvaleur;}
    ///////////////////////////////MIN DE MAT///////////////////////////////
    int minimum1(int[][] t,int taille,int taille1) {
    int minvaleur =t[0][0];
    for (int i = 0; i < taille; i++)
    {for (int j = 0; j < taille1; j++){
    if (t[i][j]<minvaleur){minvaleur = t[i][j];}
    }}return minvaleur;}
    //////////////////////////////////////////////////////////////
     
     }//fin classe snake
    merci d' avance............................

  13. #13
    Expert éminent sénior

    Avatar de Djug
    Homme Profil pro
    Inscrit en
    Mai 2007
    Messages
    2 980
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : Algérie

    Informations forums :
    Inscription : Mai 2007
    Messages : 2 980
    Points : 17 970
    Points
    17 970
    Par défaut
    qu'elle est ta question?

    en plus il faut juste mettre les quelques instructions qui causent le problème (on ne peux pas débugger tout un code de plus de 600 lignes de commandes )

  14. #14
    Futur Membre du Club
    Inscrit en
    Janvier 2010
    Messages
    6
    Détails du profil
    Informations forums :
    Inscription : Janvier 2010
    Messages : 6
    Points : 9
    Points
    9
    Par défaut
    slt,merci pr ta réponse.
    on a un code simple maintenant en va utiliser le système multi agent(jade),donc notre qs est comment faire q chaque agent est responsable sr un point de snake???????????????
    repond moi svp

  15. #15
    Candidat au Club
    Profil pro
    Inscrit en
    Mars 2010
    Messages
    2
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2010
    Messages : 2
    Points : 2
    Points
    2
    Par défaut pb avec l'exp de agent behaviour
    bonjour Djug
    suit a notre mail echanger
    j'ai essayer de refaire l'exemple de behavior simple sur eclips
    Mais pendant l'exécution j'ai ces message d'erreur sachant que j'ai suivie les meme étape pour crée un agent jade sur eclips ( les 4 lib de jade et j'ai ajouté dans le champ argument -gui jade.boot SimpleAgent
    Merci de m'aider
    "Nested Exception:
    java.rmi.AlreadyBoundException: ServiceManager
    at sun.rmi.registry.RegistryImpl.bind(RegistryImpl.java:123)
    at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
    at sun.rmi.transport.Transport$1.run(Transport.java:159)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
    at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
    at java.rmi.Naming.bind(Naming.java:111)
    at jade.imtp.rmi.RMIIMTPManager.exportPlatformManager(RMIIMTPManager.java:224)
    at jade.core.ProfileImpl.createPlatformManager(ProfileImpl.java:563)
    at jade.core.ProfileImpl.getPlatformManager(ProfileImpl.java:487)
    at jade.core.ProfileImpl.getServiceManager(ProfileImpl.java:501)
    at jade.core.AgentContainerImpl.init(AgentContainerImpl.java:342)
    at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:478)
    at jade.core.Runtime.createMainContainer(Runtime.java:148)
    at jade.Boot.<init>(Boot.java:130)
    at jade.Boot.main(Boot.java:70)
    8 mars 2010 14:21:15 jade.core.Runtime$1 run
    INFO: JADE is closing down now.

  16. #16
    Candidat au Club
    Profil pro
    Inscrit en
    Mars 2010
    Messages
    2
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2010
    Messages : 2
    Points : 2
    Points
    2
    Par défaut @override
    bonjour Djug
    j'est un autre pb pour exécuté l'exemple de séquenceur behaviour
    dans le code source vous utiliser @override
    j'au un msg d'erreur comme quoi je ne suis pas sur java 5.0 par quoi je peut remplacer cette instrucion du moment que je travail avec eclipse3.1 et sous java6 merci

  17. #17
    Expert éminent sénior

    Avatar de Djug
    Homme Profil pro
    Inscrit en
    Mai 2007
    Messages
    2 980
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : Algérie

    Informations forums :
    Inscription : Mai 2007
    Messages : 2 980
    Points : 17 970
    Points
    17 970
    Par défaut
    Citation Envoyé par nana2010 Voir le message
    slt,merci pr ta réponse.
    on a un code simple maintenant en va utiliser le système multi agent(jade),donc notre qs est comment faire q chaque agent est responsable sr un point de snake???????????????
    repond moi svp
    mais, tout dépend de votre conception,

    il faut concevoir votre solution afin qu'elle répond à vos besoin (on ne peux pas toujours commencé par un code qui fait une chose afin de le transformer en un autre code qui fait autre chose)

    @icaris:

    tu utilise quelle version de JAVA?

  18. #18
    Futur Membre du Club
    Inscrit en
    Janvier 2010
    Messages
    6
    Détails du profil
    Informations forums :
    Inscription : Janvier 2010
    Messages : 6
    Points : 9
    Points
    9
    Par défaut Djug
    slt,on travaille avec jcreator la version 1.6(la derniere version) stp si vs avez un mail pour mieux comprendre (pour t'envoyé notre application compléte)

  19. #19
    Expert éminent sénior

    Avatar de Djug
    Homme Profil pro
    Inscrit en
    Mai 2007
    Messages
    2 980
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : Algérie

    Informations forums :
    Inscription : Mai 2007
    Messages : 2 980
    Points : 17 970
    Points
    17 970
    Par défaut
    Citation Envoyé par nana2010 Voir le message
    slt,on travaille avec jcreator la version 1.6(la derniere version) stp si vs avez un mail pour mieux comprendre (pour t'envoyé notre application compléte)

    désolé je n'ai jamais utilisé jade sous Jcreator


    stp si vs avez un mail pour mieux comprendre
    les forums sont faits pour ça, n'est ce pas ?

    merci de poser vos questions sur le forum et non pas par mail

  20. #20
    Nouveau membre du Club
    Inscrit en
    Février 2010
    Messages
    14
    Détails du profil
    Informations personnelles :
    Âge : 37

    Informations forums :
    Inscription : Février 2010
    Messages : 14
    Points : 26
    Points
    26
    Par défaut capacité du container
    bonjour tout le monde
    savez vous si jade utilise des pipelines pour la gestion des messages
    (il y a accès au disque dur ou tout se passe dans la mémoire)?
    et combien de messages(en terme de taille ) le container peut supporter sans être sature si on veut simuler tout un réseau d'agents qui s'échangent des donnes en temps réel?

    merci d'avance et bonne journée

Discussions similaires

  1. Création d'un agent produit avec Jade
    Par jmyosra dans le forum Programmation par agent
    Réponses: 1
    Dernier message: 13/11/2012, 16h18
  2. Création d'un projet Maven avec Eclipse
    Par pt.forumtech dans le forum Eclipse
    Réponses: 1
    Dernier message: 10/05/2012, 02h20
  3. [Jade] Lancement d'un agent jade via eclipse
    Par manare dans le forum Programmation par agent
    Réponses: 1
    Dernier message: 20/03/2011, 08h22
  4. Réponses: 4
    Dernier message: 20/07/2004, 22h53

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo