X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?p=clnl;a=blobdiff_plain;f=src%2Fmain%2Fmain.lisp;h=b6cce463cf762402adfa246bbdad7c6959a67ef0;hp=70be24dfa7f0f2beafe2ce72ab7ae5fdc35f72b5;hb=81d51af;hpb=75a961089cba4b6aa4a3e947616ee4026ec3b057 diff --git a/src/main/main.lisp b/src/main/main.lisp index 70be24d..b6cce46 100644 --- a/src/main/main.lisp +++ b/src/main/main.lisp @@ -43,7 +43,12 @@ DESCRIPTION: is set so that multiple runs will evaluate to the same. When FILE is not provided, a default model is used." - (eval (model->lisp (if file (with-open-file (str file) (clnl-model:read-from-nlogo str)) (clnl-model:default-model))))) + (let + ((netlogoed-lisp + (model->lisp + (if file (with-open-file (str file) (clnl-model:read-from-nlogo str)) (clnl-model:default-model)))) + (*package* (find-package :cl))) + (eval netlogoed-lisp))) (defun run-commands (cmds) "RUN-COMMANDS CMDS => RESULT @@ -79,5 +84,5 @@ DESCRIPTION: (defun model->lisp (model) `(progn (clnl-random:set-seed 15) ; should the seed always be 15? - (clnl-nvm:create-world ,model) - (clnl-interface:initialize ,model))) + (clnl-nvm:create-world :dims ',(clnl-model:world-dimensions model)) + (clnl-interface:initialize :dims ',(clnl-model:world-dimensions model))))