Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client not running with customized model #4

Closed
agrignard opened this issue Feb 21, 2023 · 2 comments
Closed

Client not running with customized model #4

agrignard opened this issue Feb 21, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@agrignard
Copy link
Member

I am trying to make the client architecture working with my own model (that use to work in the 1.8)

In order to plug it to Gama

  1. Clone this repo: https://github.com/VCityTeam/UD_ReAgent_ABM/
  2. In gama.client comment this lines:
var ABSOLUTE_PATH_TO_GAMA = '/Users/hqn88/git/';
var modelPath = ABSOLUTE_PATH_TO_GAMA + 'gama/msi.gama.models/models/Tutorials/Road Traffic/models/Model 05.gaml';
var experimentName = 'road_traffic';
var species1Name = 'people';
var attribute1Name = 'objective';
var species2Name = 'building';
var attribute2Name = 'type';

and uncomment this one (be sure it's poiting to the right folder where you have downloaded ReAgent

const modelPath = '/Users/arno/Projects/GitHub/UD_ReAgent_ABM/ReAgent/models/Gratte_Ciel_Demo.gaml';
const experimentName = 'Demo';
const species1Name = 'people';
const attribute1Name = 'type';
//const species2Name = 'building';
//const attribute2Name = 'type';
  1. run gama headless
  2. Open index.html

You should see this:
Screenshot 2023-02-21 at 11 42 22

After few iteration I have the following error in my browser console


> Error: J"... is not valid JSON
    at JSON.parse (<anonymous>)
    at Object.callback (gama_client.js:93:20)
    at wSocket.onmessage (GAMA.js:53:48)
@agrignard agrignard added the bug Something isn't working label Feb 21, 2023
@hqnghi88
Copy link
Member

It is releted with the mysterious error "Linering".... A workaround is to remove the line geometry shape<-circle(2#m) in ReAgent model. I m digging again for the error

@hqnghi88
Copy link
Member

hqnghi88 commented Mar 2, 2023

https://github.com/gama-platform/gama/issues/3639 a fix has commit from the suggestion of this issue in gama core. please try with new alpha release (1hour later)

hqnghi88 added a commit that referenced this issue Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants