swarm-support
[Top][All Lists]
Advanced

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

Serialization: where eagles dare! Or, what about arguments?


From: Paul Johnson
Subject: Serialization: where eagles dare! Or, what about arguments?
Date: Fri, 15 Mar 2002 02:55:29 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020212

In my effort to learn about serialization, I'm developing some working examples that I'll be able to share with everybody some day. For now, I'm still trying to understand the full magnitude of the problem.

I now confront this question: what about serializing Swarm's "arguments" object. Is there any reason why one should not be able to archive arguments and then use the archiver to read in values and create a new arguments object?

I have found that, after many seg faults, I am able to save arguments! I was getting crashes because one of its IVARS was not set, the Makefile did not have a value for
address@hidden
so that was empty and lisp archiver hates empty strings

So when I bring the simulation back to life, is there any danger in just overwriting

arguments = [archiver getObject: "arguments"];

??

I'm a bit cautious because of the way the arguments data is written out. There are many variables saved in there that I was not aware of, such as the app path. If I moved the saved .scm file to another system or sent it to a coauthor and he restarted the simulation, these path and executable names here would not cause a big fit, would they?


pj
(make-instance 'MyArguments #:argc 1 #:applicationName "opinion" #:executablePath "/home/pauljohn/swarm/PJProjects/valinux/OpinionFormation/MultiOccupancy/opinion" #:appModeString "default" #:version "2.1.1" #:bugAddress "address@hidden" #:inhibitArchiverLoadFlag #f #:inhibitExecutableSearchFlag #f #:batchModeFlag #f #:varySeedFlag #f #:fixedSeedFlag #f #:fixedSeed 0 #:verboseFlag #f #:showCurrentTimeFlag #f #:swarmHome "/usr/" #:defaultAppConfigPath "./" #:defaultAppDataPath "./" #:ignoringEnvFlag #t #:lastArgIndex 1 #:run -1 #:pplPerCell 1 #:worldXSize 10 #:worldYSize 10 #:numFeatures 5 #:numTraits 3 #:numWorkplaces 1 #:workXSize 5 #:workYSize 5 #:parochialism 0.500000D0 #:memDecay 1.000000D0 #:randomSeed -1 #:variableCellSize #f #:randomizeCitizenUpdateOrder #t #:oneAtATime #f #:wrapAround #f #:onlySelfAdjusts #t #:onlyOneAdjusts #t #:consistentAdjustment #t #:numNeighborhoods 1 #:modelType 2 #:similarityModel 0 #:persuasionModel 0 #:dayLength 10 #:homeProb 0.500000D0 #:colemanQ 0.000000D0 #:charDate "Fri_Mar_15_02h44m42_2002" #:archiver nil))


--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700


                 ==================================
  Swarm-Support is for discussion of the technical details of the day
  to day usage of Swarm.  For list administration needs (esp.
  [un]subscribing), please send a message to <address@hidden>
  with "help" in the body of the message.



reply via email to

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