swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] Problems creating input object from .scm


From: David Camacho Trujillo
Subject: Re: [Swarm-Support] Problems creating input object from .scm
Date: Thu, 23 Feb 2006 16:57:18 +0100 (CET)
User-agent: IMP/PHP IMAP webmail program 2.2.8

Many thanks for fast the response.
Well, I am sure that the serialization part is some thing I want to implement
soon or late in my model, but by now it is not the point.
Sorry, seems to me that I explain my self wrong. 
My problem is not related to any Output, but the other way around, with the
“Input”. (I just called here so a class that import data form a .txt table)
The mention of the Output was just trying to explain, in my concepts (very
likely wrong) the “position” on the Hierarchy of this “Input” class I create.

I will try in other words to explain my self better. 
For my problem, apart from some parameters, my model has to:
Open a file (HERE is the problem, but JUST when I try to utilize replicator2)
Read the data into the file (a table)
Perform an interpolation of that data
stored the interpolated data into an object
be able to pass this last interpolated data to the agents created by the
“modelSwarm” class.

And every thing goes fine. It is just that when trying to run this (changing
systematically some parameters) utilizing replicator2, that so called by me
“Input” class, could not open the file and the program exit.
(I hope this time it is more clear my simple problem)
many thanks in advance!
David



Mensaje citado por: Paul Johnson <address@hidden>:

> It is not clear what you are trying to do. The question refers to input 
> object from scm, but the comment in the file is about creating output 
> files. And you don't say if you mean output as a summary of results or 
> output as a snapshot of the condition of the agents.
> 
> If you mean you want to save the state of your simulation into an scm 
> file and then restart the simulation using those values, I have a couple
> 
> of complete working examples you can look at. The newest 
> ArtificialStockMarket does serialization, and the public opinion model 
> does that too.  I believe I put in pretty much commentary in the readme 
> files.
> 
> http://pj.freefaculty.org/Swarm/MySwarmCode/OpinionFormation/Opinion-2.0.1.tar.gz
> http://ArtStkMkt.sourceforge.net
> 
> There are some examples on Lisp output in the WorkingExample directory 
> as well:
> 
> http://pj.freefaculty.org/SwarmFaq/WorkingExampleCode/objc/LispSaveOutput.txt
> http://pj.freefaculty.org/SwarmFaq/WorkingExampleCode/objc/LispInDoubles.txt
> 
> You choose lispOutDeep or lispOutShallow, depending on if you need to 
> try to force a recursive search of an object and all the objects inside 
> it, or just a set of IVARs (doubles, int, BOOL, like that).  Then in the
> 
> classes you intend to save, you can write customized methods to override
> 
> the default lispOutXXX methods. 
> 
> I wrote up a slide show about this topic, which we were calling 
> Serialization. 
> 
>
http://pj.freefaculty.org/Papers/Presentations/SwarmFest03/Sfest03_serialization.pdf
> 
> It is difficult to admit this, but when I was "knee deep" in this, it 
> all seemed perfectly obvious to me. But, after not doing it for a year 
> or so, I can see it requires some concentration.  I wish there were more
> 
> personal payoff in writing up documentation, but there just isn't.
> 
> If you find broken links in my web pages, please let me know. I've been 
> forced to migrate out of KU service altogether and bought space on 
> Dreamhost.com.  Currently old links are redirecting, but you can go 
> directly to http://pj.freefaculty.org.
> 
> pj
> 
> David Camacho Trujillo wrote:
> 
> >Hi dear Swarm community,
> >
> >My model runs fine under GUI and Batch mode, but I it can not open an
> external
> >file (to read some data) utilizing "replicator2.pl",  (there are no
> crash, it
> >just simply do not open the file and terminate).
> >
> >Usually to open that external file, (and to perform something on those
> data) I
> >utilize a another object, from a separate class named "Input". I have
> try to
> >create this class, similarly to the "Output" class from the tutorial.
> (the idea
> >behind was that this "Input" class should be at a similar level into
> the whole
> >model structure related to the dependencies ).  Therefore, this
> "Input-object"
> >is created in the "buildObjects" method from the "modelSwarm".
> >
> >I have already try to create this class in a superior class than the
> >"modelSwarm", so I try with on the "buildObjects" from the Batch and
> Observer
> >classes, and same result: runs fine for GUI and Batch but not with
> replicator2.pl
> >
> >In  "Parameter" class we do not have "buildObjects", and from the "
> .scm" file I
> >have no idea how to call this class or pass the info.
> >How to solve this?
> >I work under suse 9.2, objective-c
> >
> >David
> >
> >
> >
> >
> >_______________________________________________
> >Support mailing list
> >address@hidden
> >http://www.swarm.org/mailman/listinfo/support
> >  
> >
> 
> 
> -- 
> Paul E. Johnson                       email: address@hidden
> Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
> 1541 Lilac Lane, Rm 504                              
> University of Kansas                  Office: (785) 864-9086
> Lawrence, Kansas 66044-3177           FAX: (785) 864-5700
> 
> _______________________________________________
> Support mailing list
> address@hidden
> http://www.swarm.org/mailman/listinfo/support
> 



David Camacho Ph.D. Student
Intelligent Bioinformatics Systems
German Cancer Research Center - DKFZ - TP3
www.dkfz.de
Im Neuenheimer Feld 580
69120 Heidelberg
DKFZPhone: +49 (0) 6221 42 2720
Fax:       +49 (0) 6221 42-3620 




reply via email to

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