Fix some merge issues

akazachk/formulations
Alinson S. Xavier 5 years ago
parent ba9e086bea
commit 675143967f

@ -265,8 +265,8 @@ INSTANCES_TEJADA19 := \
tejada19/UC_168h_131g \ tejada19/UC_168h_131g \
tejada19/UC_168h_199g tejada19/UC_168h_199g
SOLUTIONS_ORLIB := $(foreach s,$(SAMPLES),$(addprefix results/,$(addsuffix .$(s).sol.json,$(INSTANCES_ORLIB)))) SOLUTIONS_ORLIB := $(foreach s,$(SAMPLES),$(addprefix $(results_dir)/,$(addsuffix .$(s).sol.json,$(INSTANCES_ORLIB))))
SOLUTIONS_TEJADA19 := $(foreach s,$(SAMPLES),$(addprefix results/,$(addsuffix .$(s).sol.json,$(INSTANCES_TEJADA19)))) SOLUTIONS_TEJADA19 := $(foreach s,$(SAMPLES),$(addprefix $(results_dir)/,$(addsuffix .$(s).sol.json,$(INSTANCES_TEJADA19))))
all: matpower pglib orlib tejada19 all: matpower pglib orlib tejada19
@ -288,10 +288,10 @@ clean:
@rm -rf tables/benchmark* tables/compare* $(results_dir) @rm -rf tables/benchmark* tables/compare* $(results_dir)
clean-mps: clean-mps:
@rm -fv results/*/*.mps.gz results/*/*/*.mps.gz @rm -fv $(results_dir)/*/*.mps.gz results/*/*/*.mps.gz
clean-sol: clean-sol:
@rm -rf results/*/*.sol.* results/*/*/*.sol.* @rm -rf $(results_dir)/*/*.sol.* results/*/*/*.sol.*
save: save:
mkdir -p "runs/$(TIMESTAMP)" mkdir -p "runs/$(TIMESTAMP)"

@ -77,7 +77,7 @@ function add_required_constraints_default(c::UCComponent,
# TODO check what happens with these variables when exporting the model # TODO check what happens with these variables when exporting the model
# (can a binary variable have bounds x = 0?) # (can a binary variable have bounds x = 0?)
#eqs.shutdown_limit[gi, 0] = @constraint(mip, vars.switch_off[gi, 1] <= 0) #eqs.shutdown_limit[gi, 0] = @constraint(mip, vars.switch_off[gi, 1] <= 0)
fix(vars.switch_off[gi, 1], 0.; force = true) fix(model.vars.switch_off[gi, 1], 0.; force = true)
end end
end # known_initial_conditions end # known_initial_conditions

@ -16,9 +16,9 @@ LOG_LEVEL = 1
@testset "Model" begin @testset "Model" begin
@testset "Run" begin @testset "Run" begin
#instance = UnitCommitment.read_benchmark("test/case14") instance = UnitCommitment.read_benchmark("test/case14")
#instance = UnitCommitment.read_benchmark("matpower/case3375wp/2017-02-01") #instance = UnitCommitment.read_benchmark("matpower/case3375wp/2017-02-01")
instance = UnitCommitment.read_benchmark("matpower/case1888rte/2017-02-01") #instance = UnitCommitment.read_benchmark("matpower/case1888rte/2017-02-01")
for line in instance.lines, t in 1:4 for line in instance.lines, t in 1:4
line.normal_flow_limit[t] = 10.0 line.normal_flow_limit[t] = 10.0
end end
@ -34,7 +34,7 @@ LOG_LEVEL = 1
model = build_model(instance=instance, model = build_model(instance=instance,
optimizer=optimizer, optimizer=optimizer,
variable_names=true, variable_names=true,
components=formulation) formulation=formulation)
JuMP.write_to_file(model.mip, "test.mps") JuMP.write_to_file(model.mip, "test.mps")

Loading…
Cancel
Save