mitmedialab / UrbanSwarms

8 stars 3 forks source link

Errors in 1.8.2 #3

Closed edcafenet closed 3 years ago

edcafenet commented 3 years ago

When you load the this model into Gama 1.8.2, there are a couple of errors that prevent running the experiments:

agrignard commented 3 years ago

Which model (.gaml) are you refering too?

edcafenet commented 3 years ago

UrbanSwarm_main.gaml

On Oct 30, 2021, at 11:32 PM, Arnaud Grignard @.***> wrote:

Which model (.gaml) are you refering too?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mitmedialab/UrbanSwarms/issues/3#issuecomment-955596329, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETK4PAIHFIH32ZS6BZZZSTUJRXBDANCNFSM5HA3H7AA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

agrignard commented 3 years ago

It's now compiling but there is error at run time

 at cycle 0: Java error: wrong casting
ClassCastException: java.lang.Double incompatible with java.lang.Integer
java.base/java.lang.Integer.compareTo(Integer.java:64)
msi.gama.kernel.experiment.ExperimentParameter.setAndVerifyValue(ExperimentParameter.java:351)
msi.gama.kernel.experiment.ExperimentParameter.setValue(ExperimentParameter.java:429)
msi.gama.kernel.experiment.ExperimentParameter.tryToInit(ExperimentParameter.java:439)
msi.gama.kernel.experiment.ExperimentParameter.getValue(ExperimentParameter.java:688)
msi.gama.kernel.experiment.ExperimentParameter.value(ExperimentParameter.java:590)
ummisco.gama.ui.parameters.AbstractEditor.retrieveValueOfParameter(AbstractEditor.java:223)
Impossible to obtain the value of PheromoneMarkIntensity
agrignard commented 3 years ago

Runtime is ok now but the simulation goes weird

2 occurrences in 2 agents at cycle 1: Can not execute ask on a nil agent
in ask closest_to(closeTag,self)  {
    loop j from: 0 to: length(self.pheromonesToward) - 1  {
        self.pheromones[j] <- (self.pheromones[j] + myself.pheromoneToDiffuse) - ((singlePheromoneMark * evaporation) * (cycle - self.lastUpdate));
        if self.pheromones[j] < 0.001  {
            self.pheromones[j] <- 0;
        }

        if myself.carrying  {
            if self.pheromonesToward[j] = myself.source  {
                self.pheromones[j] <- self.pheromones[j] + myself.pheromoneMark;
            }

        }
edcafenet commented 3 years ago

I tried to run the code and my Mac goes crazy. I need to restart it in order to make useful again :/

agrignard commented 3 years ago

do you have the same runtime error?

edcafenet commented 3 years ago

After 10 secs of running the simulation yes!

El dom., 31 oct. 2021 21:53, Arnaud Grignard @.***> escribió:

do you have the same runtime error?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mitmedialab/UrbanSwarms/issues/3#issuecomment-955789793, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETK4PH3XOKM5PERSGAAGB3UJWUFNANCNFSM5HA3H7AA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

agrignard commented 3 years ago

We should be all set the model is rerunning as it was in 1.8.1. The syntax has been updated to run with 1.8.2

Concerning the runtime nothing has changed in the code since 2018 and 1.8.2 should be in theory faster than 1.8.1. Let me know if you still have issue on your personal computer and if yes can you share your configuration (OS, GPU, etc)

edcafenet commented 3 years ago

Thanks dude!

On Nov 3, 2021, at 11:49 AM, Arnaud Grignard @.***> wrote:

Closed #3 https://github.com/mitmedialab/UrbanSwarms/issues/3 via c069260 https://github.com/mitmedialab/UrbanSwarms/commit/c069260de820fc3f44940df60fc21a8160385e26.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mitmedialab/UrbanSwarms/issues/3#event-5561016042, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETK4PDLOZYXDNV6T3JDPBLUKEHTNANCNFSM5HA3H7AA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.