Closed AlbertLee125 closed 3 months ago
The black format check failed. @AlbertLee125
The toy problem is ready to go. I changed the title to david_linan.py and changed the directory to david_linan. The spelling is failing because of the HDA_gdpopt file. Besides the hda file error, the code is ready to go.
Second thoughts: Gomez_linan is also a good name for the toy problem. They are the ones to create the given model. If you both think the title is better written as 'gomez_linan.py', please let me know.
Change all parts where it is referred to 'Toy problem'. Does this run with the ldsda implementation?
m = build_model()
pyo.SolverFactory('gdpopt.ldsda').solve(
m,
minlp_solver="gams",
minlp_solver_args=dict(solver="baron", add_options=["option optcr=0.001;"]),
tee=True,
starting_point=[5, 1],
logical_constraint_list=[m.oneY1, m.oneY2],
direction_norm='Linf',
time_limit=900
)
print("Solution: alpha=", pyo.value(m.alpha), " beta=", pyo.value(m.beta))
print("Objective function value: ", pyo.value(m.obj))
If I set the starting point at [5,1], the code could not cross the infeasible wall of the problem. However, by setting the starting point at [1,1], the code could find the global minimum. I will mention about the infeasible wall in the documentation.
I changed the title and name as Example 1 Problem of Liñán (2023).
I added the toy problem from Linan's paper to the gdplib.