Quantcast

a problem about the Object2DGrid

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

a problem about the Object2DGrid

zhaolin
        hi,everybody. I encounter some problem when i used the "uchicago.src.sim.space.Object2DGrid". i hope i could find some help here.
        i wonder if there any limitatins for the size of an spaceobject -"Object2DGrid" ?
  The concerned codes is as follows:

  public class MyModel : SimpleModel
  {  
   //Initialization
        private Object2DGrid world;
        private int worldXSize=6500;
        private int worldYSize=2;
    private DisplaySurface displaySurface;
   
    //Display the "world"
        world=new Object2DGrid(worldXSize,worldYSize);
        displaySurface = new DisplaySurface(this,this.Name);
        Object2DDisplay agentDisplay =new Object2DDisplay(world);
        displaySurface.addDisplayable(agentDisplay,"Agents ");
        }
 
      when i set the  worldXSize larger than  about 6500 ,the program will throw an exception  "System.ArgumentException”in
"system.windows.forms.dll".
       the system i used is: Repast.net (in repast 3.0 suite)+vs.net 2003+ win Xp(sp2).

Any words will be helpful .3x for your attention.

           

          jerry
        [hidden email]
          2005-09-14
HS^甸��X��'��u�jg并贻z鳐����!jY^���+a����z�'�j���鳙�'����阻���y┹m绉店�v�0�v岗�Z�f��颌觑z绩�t�+f=#�'$�贽�ek(m����q玷��z哙z�'�j)��^カ-�{^��-�ē�x%��Qz���)�z番�X�端(悍~��zw���i���l��q玷��z咤��l�X��)撸�蕙�-�{^��-
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: a problem about the Object2DGrid

jerry.vos@gmail.com
Hello,
I looked into this and the exception is being thrown inside Painter
(which is used by the display surface) when it tries to make a Bitmap to
back the display. I did a bit of searching around on the net and it
seems that there's a maximum size of a Bitmap that may be caused by the
video card drivers or windows itself (depending on where you look).

Here's one of the more informative pages I could find regarding this:
http://www.efg2.com/Lab/Graphics/VeryLargeBitmap.htm

There may be a solution (namely backing the grid by a grid of Bitmaps),
but this'll be something that'll require some more thought and
investigation.

So the problem isn't directly the size of the Object2DGrid, but with
trying to display it. If you'd like please file a bug report on this at
http://sourceforge.net/tracker/?atid=101703&group_id=1703&func=browse to
sort of centralize any activity about this.

Thanks for pointing this out,
Jerry



----- Original Message -----
*From:* "zhaolin" <[hidden email]>
*To:* "[hidden email]"
<[hidden email]>
*Sent:* Tuesday, September 13, 2005 10:44:45 PM
*Subject:* [Repast-interest] a problem about the Object2DGrid


> hi,everybody. I encounter some problem when i used the "uchicago.src.sim.space.Object2DGrid". i hope i could find some help here.
> i wonder if there any limitatins for the size of an spaceobject -"Object2DGrid" ?
>  The concerned codes is as follows:
>
>  public class MyModel : SimpleModel
>  {  
>   //Initialization
> private Object2DGrid world;
> private int worldXSize=6500;
> private int worldYSize=2;
>    private DisplaySurface displaySurface;
>  
>    //Display the "world"
> world=new Object2DGrid(worldXSize,worldYSize);
> displaySurface = new DisplaySurface(this,this.Name);
> Object2DDisplay agentDisplay =new Object2DDisplay(world);
> displaySurface.addDisplayable(agentDisplay,"Agents ");
> }
>  
>      when i set the  worldXSize larger than  about 6500 ,the program will throw an exception  "System.ArgumentException”in
>"system.windows.forms.dll".
>       the system i used is: Repast.net (in repast 3.0 suite)+vs.net 2003+ win Xp(sp2).
>
>Any words will be helpful .3x for your attention.
>
>            
>
>          jerry
>        [hidden email]
>          2005-09-14
>HS^甸��X��'��u�jg并贻z鳐����!jY^���+a����z�'�j
>


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Loading...