Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public SolverResource(FacilityLocationProblemRepository repository,

private Status statusFromSolution(FacilityLocationProblem solution) {
return new Status(solution,
solutionManager.analyze(solution).summarize(),
solverManager.getSolverStatus(PROBLEM_ID));
}
Comment thread
triceo marked this conversation as resolved.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@

class Status {
public final FacilityLocationProblem solution;
public final String scoreExplanation;
public final boolean isSolving;

Status(FacilityLocationProblem solution, String scoreExplanation, SolverStatus solverStatus) {
Status(FacilityLocationProblem solution, SolverStatus solverStatus) {
this.solution = solution;
this.scoreExplanation = scoreExplanation;
this.isSolving = solverStatus != SolverStatus.NOT_SOLVING;
}
Comment thread
triceo marked this conversation as resolved.
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const getFacilityMarker = ({id, location}) => {
return marker;
};

const showProblem = ({solution, scoreExplanation, isSolving}) => {
const showProblem = ({solution, isSolving}) => {
if (!initialized) {
initialized = true;
map.fitBounds(solution.bounds);
Expand Down Expand Up @@ -166,7 +166,6 @@ style="background-color: ${colorIfUsed}; display: inline-block; width: 1rem; hei
$('#cost').text(longCostFormat.format(solution.totalCost));
$('#cost-percentage').text(Math.round(solution.totalCost * 1000 / solution.potentialCost) / 10);
$('#distance').text(solution.totalDistance);
$('#scoreInfo').text(scoreExplanation);
updateSolvingStatus(isSolving);
};

Expand Down
Loading