-
Notifications
You must be signed in to change notification settings - Fork 49
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_minimalsurface #182
base: main
Are you sure you want to change the base?
Add_minimalsurface #182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @indyalardjane for the PR!
I added a couple of comments.
In the functions, you don't want to convert variables with T
as it will break the derivatives. We want Julia to infer the type.
Do you have bound constraints in your model as well? I.e. constraints of the form x >= lvar
or x <= uvar
? If so, you should prepare vector lvar
and uvar
and use the following constructor
ADNLPModel(f, x0, lvar, uvar, c, lcon, ucon)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of new comments.
Could you remove the two files minimalsurface.jl ? Also, can you compare your model with the Ampl version that looks simpler for some reason? Thanks!!
using Plots | ||
using ADNLPModels, NLPModels, NLPModelsIpopt, DataFrames, LinearAlgebra, Distances, SolverCore, PyPlot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using Plots | |
using ADNLPModels, NLPModels, NLPModelsIpopt, DataFrames, LinearAlgebra, Distances, SolverCore, PyPlot |
|
||
v = vec(v_D) #convert to vector | ||
|
||
return ADNLPModel(f, v, constraints, lcon, ucon) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return ADNLPModel(f, v, constraints, lcon, ucon) | |
return ADNLPModels.ADNLPModel(f, v, constraints, lcon, ucon) |
s = hx * hy * (sqrt(1 + (gi^2) +(gj)^2)) # Approximation of the derivative with the method of rectangles | ||
S = S + s # Update the value of S |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s = hx * hy * (sqrt(1 + (gi^2) +(gj)^2)) # Approximation of the derivative with the method of rectangles | |
S = S + s # Update the value of S | |
S = S + hx * hy * (sqrt(1 + (gi^2) +(gj)^2)) # Approximation of the derivative with the method of rectangles |
nx = 20 # number of points according to the direction x | ||
ny = 20 # number of points according to the direction y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to choose 20? I suggest we do: nx = Int(round(sqrt(n)))
and ny = nx
@indyalardjane It looks like there are still a few comments to address here, please. |
No description provided.