Skip to content

Weighted generator and single weighted edge #221

@KristianKarl

Description

@KristianKarl

Running the model below:
java -jar graphwalker-cli-4.1.0.jar offline -g model.json

where model.json is:

{
    "name": "Default model",
    "models": [
        {
            "name": "ModelName",
            "generator": "weighted_random(vertex_coverage(100))",
            "startElementId": "v0",
            "vertices": [
                {
                    "id": "v0",
                    "name": "vertex_A"
                },
                {
                    "id": "v1",
                    "name": "vertex_B"
                }
            ],
            "edges": [
                {
                    "id": "e1",
                    "name": "edge_B",
                    "sourceVertexId": "v0",
                    "targetVertexId": "v1",
                    "weight": 0.1
                }
            ]
        }
    ]
}

Generates following error:
org.graphwalker.core.machine.MachineException: Could not calculate which weighted edge to choose from vertex: vertex_A.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions