Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add toy problem README with problem details #38

Merged
merged 9 commits into from
Aug 19, 2024
Merged

Add toy problem README with problem details #38

merged 9 commits into from
Aug 19, 2024

Conversation

AlbertLee125
Copy link
Member

I added the toy problem from Linan's paper to the gdplib.

@ZedongPeng
Copy link
Member

The black format check failed. @AlbertLee125

@AlbertLee125
Copy link
Member Author

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.

Copy link
Member

@bernalde bernalde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change all parts where it is referred to 'Toy problem'.
Does this run with the ldsda implementation?

gdplib/david_linan/README.md Outdated Show resolved Hide resolved
gdplib/david_linan/README.md Outdated Show resolved Hide resolved
gdplib/david_linan/README.md Outdated Show resolved Hide resolved
gdplib/david_linan/david_linan.py Outdated Show resolved Hide resolved
@AlbertLee125
Copy link
Member Author

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.

gdplib/ ex1_linan_2023/README.md Outdated Show resolved Hide resolved
gdplib/ ex1_linan_2023/README.md Outdated Show resolved Hide resolved
@AlbertLee125
Copy link
Member Author

I changed the title and name as Example 1 Problem of Liñán (2023).

@bernalde bernalde merged commit 04968a0 into main Aug 19, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants