Closed plopezmp closed 6 years ago
testing with
ifeq ($(origin JAVA_HOME), undefined) JAVA_HOME=/usr endif
ifeq ($(origin NETLOGO), undefined) NETLOGO=/Applications/NetLogo\\ 6.0.2 endif
ifneq (,$(findstring CYGWIN,$(shell uname -s))) COLON=\; JAVA_HOME :=
cygpath -up "$(JAVA_HOME)"
else COLON=: endifSRCS=$(wildcard src/main/java/time/.java src/main/java/time//*.java)
time.jar time.jar.pack.gz: $(SRCS) manifest.txt mkdir -p classes $(JAVA_HOME)/bin/javac -g -encoding us-ascii -source 1.8 -target 1.8 -classpath $(NETLOGO)/Java/netlogo-6.0.2.jar:joda-time-2.2.jar -d classes $(SRCS) jar cmf manifest.txt time.jar -C classes . pack200 --modification-time=latest --effort=9 --strip-debug --no-keep-file-order --unknown-attribute=strip time.jar.pack.gz time.jar
time.zip: time.jar rm -rf time mkdir time cp -rp time.jar time.jar.pack.gz README.md Makefile src manifest.txt time zip -rv time time rm -rf time
works fine
Thank you
I have build the extension but it gives me errors when executing code:
extensions [time]
globals[dt] to setup clear-all set dt time:create "2000/01/01 10:00" end
to go create-turtles 5
time:schedule-event turtles ([ [] -> fd 10]) 100 time:schedule-event (turtle 1) ([ [] -> fd 3]) 50 time:go end
the error message is:
java.lang.IllegalAccessError: tried to access field org.nlogo.agent.World.tickCounter from class time.datatypes.LogoSchedule at time.datatypes.LogoSchedule.getTickCounter(LogoSchedule.java:135) at time.datatypes.LogoSchedule.performScheduledTasks(LogoSchedule.java:156) at time.datatypes.LogoSchedule.performScheduledTasks(LogoSchedule.java:140) at time.primitives.DiscreteEventSchedulerPrimitives$Go.perform(DiscreteEventSchedulerPrimitives.java:78) at org.nlogo.prim._extern.perform(_extern.java:36) at org.nlogo.nvm.Context.stepConcurrent(Context.java:107) at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.scala:65) at org.nlogo.job.JobThread.runPrimaryJobs(JobThread.scala:133) at org.nlogo.job.JobThread.$anonfun$run$1(JobThread.scala:68) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) at scala.util.control.Exception$Catch.apply(Exception.scala:224) at org.nlogo.api.Exceptions$.handling(Exceptions.scala:41) at org.nlogo.job.JobThread.run(JobThread.scala:66)
NetLogo 6.0.2 main: org.nlogo.app.AppFrame thread: AWT-EventQueue-0 Java HotSpot(TM) 64-Bit Server VM 1.8.0_141 (Oracle Corporation; 1.8.0_141-b15) operating system: Mac OS X 10.11.6 (x86_64 processor) Scala version 2.12.2 JOGL: (3D View not initialized) OpenGL Graphics: (3D View not initialized) model: time-test
07:46:55.898 AddJobEvent (org.nlogo.app.common.CommandLine) AWT-EventQueue-0 07:46:55.897 OutputEvent (org.nlogo.app.common.CommandLine) AWT-EventQueue-0 07:46:55.897 CompiledEvent (org.nlogo.window.CompilerManager) AWT-EventQueue-0 07:46:55.880 CompileMoreSourceEvent (org.nlogo.app.common.CommandLine) AWT-EventQueue-0 07:46:55.849 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0 07:46:55.643 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0 07:46:55.439 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0 07:46:55.236 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0 07:46:55.034 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0 07:46:54.833 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
Hi,
I have been trying to build the Makefile of the time extension in my system. I have written the Netlogo 6.0.2 path in the Makefile like this
but it does not work. The output of the building is long:
Can you help me to have the time extension working in my computer. Thank you very much