Skip to content

Don't get TSP example why there are update to cost/distance? #13

@bronzels

Description

@bronzels

I tried to write a problem myself by referring to TSP as it is easier to understand, but don't get what this function is for.

To me distance/cost is fixed to TSP problem, only variables for permutation to change as solution to evaluate the by 2 object, this update function is called for what reason and when?

jmetalsp-problem\src\main\java\org\uma\jmetalsp\problem\tsp\DynamicMultiobjectiveTSP.java

@OverRide
public void update(Observable<ObservedValue> observable, ObservedValue data) {
if (data!=null && data.getValue().getMatrixIdentifier() == "COST") {
updateCostValue(data.getValue().getX(),data.getValue().getY(),data.getValue().getValue());
} else if(data!=null && data.getValue().getMatrixIdentifier() == "VALUE"){
updateDistanceValue(data.getValue().getX(),data.getValue().getY(),data.getValue().getValue());
}
}

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