-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
The attached LP file comes from a tiny case, we know why it is infeasible due to an error in the input data. The model analyser throws an error, but I can get the IIS from Gurobi. This is the code:
using JuMP
using ModelAnalyzer
using HiGHS
# Create a JuMP model from lp file from OBZ case study
model = read_from_file("tiny-infeasible-model.lp")
set_optimizer(model, HiGHS.Optimizer)
optimize!(model)
# Infeasibility analysis (if the model was infeasible)
data = ModelAnalyzer.analyze(
ModelAnalyzer.Infeasibility.Analyzer(),
model,
optimizer=HiGHS.Optimizer,
)
# print report to the screen
ModelAnalyzer.summarize(data)This is the error:
ERROR: IIS failed due numerical instability, got status DUAL_INFEASIBLE
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] iis_elastic_filter(original_model::MathOptInterface.Utilities.CachingOptimizer{…}, optimizer::Type)
@ ModelAnalyzer.Infeasibility C:\Users\tejadaarangoda\.julia\packages\ModelAnalyzer\Sta4E\src\infeasibility.jl:521
[3] analyze(::ModelAnalyzer.Infeasibility.Analyzer, model::MathOptInterface.Utilities.CachingOptimizer{…}; optimizer::Type)
@ ModelAnalyzer.Infeasibility C:\Users\tejadaarangoda\.julia\packages\ModelAnalyzer\Sta4E\src\infeasibility.jl:388
[4] analyze(analyzer::ModelAnalyzer.Infeasibility.Analyzer, model::Model; kwargs::@Kwargs{optimizer::DataType})
@ ModelAnalyzerJuMPExt C:\Users\tejadaarangoda\.julia\packages\ModelAnalyzer\Sta4E\ext\ModelAnalyzerJuMPExt\ModelAnalyzerJuMPExt.jl:18
[5] top-level scope
@ c:\Users\tejadaarangoda\OneDrive - TNO\00_Sandbox\TestModelAnalyzer\test-infesiable-model.jl:12
Some type information was truncated. Use `show(err)` to see complete types.
This is code when using Gurobi:
using Gurobi
set_optimizer(model, Gurobi.Optimizer)
optimize!(model)
compute_conflict!(model)
if get_attribute(model, MOI.ConflictStatus()) == MOI.CONFLICT_FOUND
iis_model, reference_map = copy_conflict(model)
print(iis_model)
endThis is the output:
CPU model: 12th Gen Intel(R) Core(TM) i7-1255U, instruction set [SSE2|AVX|AVX2]
Thread count: 10 physical cores, 12 logical processors, using up to 12 threads
Optimize a model with 936 rows, 396 columns and 1656 nonzeros
Model fingerprint: 0x02df7def
Coefficient statistics:
Matrix range [1e+00, 3e+02]
Objective range [4e+00, 9e+00]
Bounds range [0e+00, 0e+00]
RHS range [8e+02, 2e+03]
Presolve removed 708 rows and 276 columns
Presolve time: 0.00s
Solved in 0 iterations and 0.00 seconds (0.00 work units)
Infeasible or unbounded model
User-callback calls 36, time in user-callback 0.00 sec
Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (win64 - Windows 11.0 (26100.2))
CPU model: 12th Gen Intel(R) Core(TM) i7-1255U, instruction set [SSE2|AVX|AVX2]
Thread count: 10 physical cores, 12 logical processors, using up to 12 threads
Iteration Objective Primal Inf. Dual Inf. Time
0 handle free variables 0s
IIS computed: 6 constraints and 0 bounds
IIS runtime: 0.00 seconds (0.00 work units)
Min 3.6500000000000004 flow_(ccgt,demand),2030,1,1_1_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,2_2_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,3_3_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,4_4_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,5_5_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,6_6_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,7_7_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,8_8_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,9_9_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,10_10_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,11_11_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,12_12_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,13_13_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,14_14_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,15_15_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,16_16_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,17_17_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,18_18_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,19_19_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,20_20_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,21_21_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,22_22_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,23_23_ + 3.6500000000000004 flow_(ccgt,demand),2030,1,24_24_ + 3.6500000000000004 flow_(ccgt,hub),2030,1,1_1_ + 3.6500000000000004 flow_(ccgt,hub),2030,1,2_2_ + 3.6500000000000004 flow_(ccgt,hub),2030,1,3_3_ + 3.6500000000000004 flow_(ccgt,hub),2030,1,4_4_ + 3.6500000000000004 flow_(ccgt,hub),2030,1,5_5_ + 3.6500000000000004 flow_(ccgt,hub),2030,1,6_6_ + [[...84 terms omitted...]] + 5.4750000000000005 flow_(ccgt,demand),2030,3,19_19_ + 5.4750000000000005 flow_(ccgt,demand),2030,3,20_20_ + 5.4750000000000005 flow_(ccgt,demand),2030,3,21_21_ + 5.4750000000000005 flow_(ccgt,demand),2030,3,22_22_ + 5.4750000000000005 flow_(ccgt,demand),2030,3,23_23_ + 5.4750000000000005 flow_(ccgt,demand),2030,3,24_24_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,1_1_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,2_2_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,3_3_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,4_4_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,5_5_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,6_6_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,7_7_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,8_8_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,9_9_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,10_10_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,11_11_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,12_12_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,13_13_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,14_14_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,15_15_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,16_16_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,17_17_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,18_18_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,19_19_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,20_20_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,21_21_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,22_22_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,23_23_ + 5.4750000000000005 flow_(ccgt,hub),2030,3,24_24_
Subject to
consumer_balance_demand,2030,1,1_1_ : flow_(ccgt,demand),2030,1,1_1_ + flow_(hub,demand),2030,1,1_1_ == 949.999999755
consumer_balance_demand,2030,1,2_2_ : flow_(ccgt,demand),2030,1,2_2_ + flow_(hub,demand),2030,1,2_2_ == 869.99999967
dc_power_flow_ccgt,demand,2030,1,1_1_ : flow_(ccgt,demand),2030,1,1_1_ + 333.33333333333337 _electricity_angle_demand,2030,1,1_2_ - 333.33333333333337 _electricity_angle_ccgt,2030,1,1_2_ == 0
dc_power_flow_ccgt,demand,2030,1,2_2_ : flow_(ccgt,demand),2030,1,2_2_ + 333.33333333333337 _electricity_angle_demand,2030,1,1_2_ - 333.33333333333337 _electricity_angle_ccgt,2030,1,1_2_ == 0
dc_power_flow_hub,demand,2030,1,1_1_ : flow_(hub,demand),2030,1,1_1_ + 333.33333333333337 _electricity_angle_demand,2030,1,1_2_ - 333.33333333333337 _electricity_angle_hub,2030,1,1_2_ == 0
dc_power_flow_hub,demand,2030,1,2_2_ : flow_(hub,demand),2030,1,2_2_ + 333.33333333333337 _electricity_angle_demand,2030,1,1_2_ - 333.33333333333337 _electricity_angle_hub,2030,1,1_2_ == 0
Metadata
Metadata
Assignees
Labels
No labels