Skip to content

Commit 3fd850d

Browse files
author
Ayan Acharya
committed
order of local and global budgets got reversed in the initialization of constrained matching solver, fixing that issue
1 parent a1224c9 commit 3fd850d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

dualip/src/main/scala/com/linkedin/dualip/problem/ConstrainedMatchingSolver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ConstrainedMatchingSolverDualObjectiveFunction(
3636
enableHighDimOptimization: Boolean,
3737
numLambdaPartitions: Option[Int]
3838
)(implicit spark: SparkSession) extends
39-
DistributedRegularizedObjective(BSV(budget.budgetLocal.toArray ++ budget.budgetGlobal.toArray), gamma,
39+
DistributedRegularizedObjective(BSV(budget.budgetGlobal.toArray ++ budget.budgetLocal.toArray), gamma,
4040
enableHighDimOptimization, numLambdaPartitions) with Serializable {
4141

4242
import spark.implicits._

dualip/src/test/scala/com/linkedin/dualip/problem/ConstrainedMatchingSolverTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class ConstrainedMatchingSolverTest {
8383
val initialValueDualsBSV: BSV[Double] = BSV(initialValuesGlobalDuals.toArray ++ initialValuesLocalDuals.toArray)
8484

8585
// expected values for this problem were computed with SCS
86-
val expectedDualObjective: Double = -32.470503
86+
val expectedDualObjective: Double = -34.81553
8787
val localDuals: BSV[Double] = BSV(Array(3.991200, 2.252802))
8888
val globalDuals: BSV[Double] = BSV(Array(2.320209))
8989
val duals: ConstrainedMatchingDualsBSV = ConstrainedMatchingDualsBSV(localDuals, globalDuals)

0 commit comments

Comments
 (0)