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

[COPS] add PDE instances #3

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

[COPS] add PDE instances #3

wants to merge 3 commits into from

Conversation

frapac
Copy link
Member

@frapac frapac commented May 21, 2024

This PR adds the dirichlet, henon and lane_emden instances from the COPS benchmark. These PDE-constrained instances are the most challenging ones, and pause difficulties to the automatic differentiation.

Unfortunately, the compilation time is currently too long in ExaModels, and I was not able to solve these three instances despite trying different workarounds.

My observations with other AD backends are:

  • Ampl is able to parse the instances correctly, and is the fastest AD tool so far.
  • JuMP is also able to parse the instances, but the model evaluation is desperately slow...
  • MathOptSymbolicAD.jl is failing in the compilation (and returns a nice segfault...)

@frapac frapac requested a review from sshin23 May 21, 2024 13:32
Copy link
Contributor

@sshin23 sshin23 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @frapac!

I think the issue is coming from not using constraint!. Once we use it, I think the compilation issue will be resolved

@@ -0,0 +1,230 @@

include("shapes/circle.jl")
Copy link
Contributor

Choose a reason for hiding this comment

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

these files are not committed

for b1 in 2:dom.ELEMS+1;
lcon=-Inf,
ucon=0.0,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

These constraints can benefit significantly from constraint! if n is large.

Consider reformulating this as

c = ExaModels.constraint(
    core, 
    - z[1] for b1 in 2:dom.ELEMS+1;
    lcon=-Inf,
    ucon=0.0,
) 
ExaModels.constraint!(
    core,
    b1 -1 => integral[b1+1, e1] for b1 in 2:dom.ELEMS+1
)

frapac and others added 2 commits May 21, 2024 17:36
* solved error in pde_models

* solved constraint error in pde_models

* fixed summation problem in pde_models

* added semicolonn to scopf

* remove local test in pde_models.jl

* add catmix draft

* added  chain,methanol,minsurft and fixed catmix and pde_models

* added polygon, tetra, torison and triangle

* reduce variables integral in pde_models

* changed channel.jl from JuMP to ExaModels

* finished glider.jl

* merged conflicts in pde_models

* solved constraint error in pde_models

* solved error in pde_models

* added chain,methanol,minsurf,catmix,polygon,tetra,torison,triangle and fixed pde_models

* reduce variables integral in pde_models

* changed channel.jl from JuMP to ExaModels

* finished glider.jl

* merged conflicts in pde_models

* solved constraint error in pde_models

* add rectangular coordinates in opf.jl

* removing division in constraints

* removing division in constraints

* removing division in constraints

* solved merge issue

* fixed bounds for voltage

* fixed bounds in opf.jl

* Update bounds for voltage in opf.jl

The original constraint was not correct because it should be the square of magnitude.

* included more problems for testing

* add parameters into model to avoid testing errors

* solving input error in tetra_model

* fixed input error in pde_models

* fixed input for runtests.jl

* fixed name of the problem torsion.jl

* Delete src/torison.jl

Delete wrong name model

* Changing function names in ExaModelsExamples.jl

Torsion has replaced torsion

* added test cases to runtest.jl

* added LuksanVleckModels in the package

* changed incorrect package name and make it more accessible

* modified formulation in tetra.jl
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