Skip to content

Help with MILP formulation.  #80

@JavalVyas2000

Description

@JavalVyas2000

I am trying to formulate a QUBO for a MILP scheduling problem which has 3 equations and an objective function. The model is formulated as

RTN=Model(Gurobi.Optimizer)
@constraint(RTN, Balance[r in R, t in T1],
X[r,t] -
(X[r,t-1]
+ ∑(
μ[i,r,θ] * N[i,t-θ]
+ ν[i,r,θ] * ξ[i,t-θ]
for i in Ir[r], θ in 0:max_tau if θ ≤ tau[i] && t-θ ≥ 1
)
+ Π[r,t])==0
)
@constraint(RTN, ResourceLB[r in R, t in T1],
X[r,t]-Xmin[r]>=0
)
@constraint(RTN, ResourceUB[r in R, t in T1],
Xmax[r]-X[r,t]>=0
)
@constraint(RTN, BatchLB[i in I, t in T1],
ξ[i,t]- ( Vmin[i] * N[i,t])>=0
)
@constraint(RTN, BatchUB[i in I, t in T1],
Vmax[i] * N[i,t]-ξ[i,t]>=0
)
@objective(RTN,
Min,
∑(N[i,t] for i in I, t in T1)
)

Here, N[i,t] is a binary variable, X[r,t] and ξ[i,t] are continous variables, rest all are parameters. I am able to solve this model with gurobi to an objective value of 5 in under a second (which it should be), but when I use the TOQUBO.jl to reformulate it as a QUBO and solve the problem my objective value reached in the range of 1e16 and takes around 300+ seconds.

To convert to QUBO, I implement the model as
RTN=Model(() -> ToQUBO.Optimizer(DWaveNeal.Optimizer))
And then write the above constraints and objective.

Am I missing something? Kindly help me with this implementation.

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