swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swarm-Support] Solution to EZgraph line colors and a question


From: Dinis Gökaydin
Subject: [Swarm-Support] Solution to EZgraph line colors and a question
Date: Fri, 19 Aug 2005 03:20:08 +0100
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Hello again Swarm Support,

First I would like to share with the Java users the (almost) heuristically found solution to the EZgraph colors problem I had posted previously. The problem is that Java users like myself don't have a clue to what createBegin() and createEnd() are. Reading some previous posts and noticing by chance that the two aforementioned methods still existed in SwarmJava I came up with this. Dunno if it's the best way to do it but it works.

-------------------------------------------------------
String[] colors = {"color_1","color_2"};

name_of_your_graph = new EZGraphImpl();
        
_whatever_= new EZGraphCImpl(name_of_your_graph);
                
_whatever_.createBegin(getZone());
_whatever_.setAxisLabelsX$Y("x_label","y_label");
_whatever_.setColors$count(colors,2);
_whatever_.setGraphics(true);
_whatever_.setTitle("name_of_your_graph");
_whatever_.createEnd(); 
-------------------------------------------------------

I also have a question. Taking advantage of dynamic scheduling I came up with a way to speed up my program considerably.

I was happy about myself for a while, but then I encountered a problem. My scheme demads a first scheduling step for every agent with at$createActionTo$message() at time 0. I was handling 10000 agents then, and it takes 20sec to build and schedule them. Great - I thought to myself - then 100000 will take 200sec, or 3min20sec. Nope... It takes 26min42sec!! My deep mathematical insight tells me this is not linearly increasing :-)

By the way,it takes (cough) one second to build 100000 agents without the at$createActionTo$message() step. Anyone has any idea why this is happening and has a simple solution before I start creating multiple 10000 schedules? This would a real problem since I am aiming for 1000000 agents. I don't even know if swarm can handle 1exp6 agents...

Thank you very much,

Dinis Gökaydin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]