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 syntax for Parameter #3443

Merged
merged 7 commits into from
Aug 25, 2023
Merged

Add syntax for Parameter #3443

merged 7 commits into from
Aug 25, 2023

Conversation

odow
Copy link
Member

@odow odow commented Aug 7, 2023

Still a WIP. Got distracted by #3442

Part of #1185

@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (27213d3) 97.99% compared to head (71b3f5f) 98.00%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3443      +/-   ##
==========================================
+ Coverage   97.99%   98.00%   +0.01%     
==========================================
  Files          36       36              
  Lines        5041     5068      +27     
==========================================
+ Hits         4940     4967      +27     
  Misses        101      101              
Files Changed Coverage Δ
src/macros.jl 98.67% <100.00%> (+<0.01%) ⬆️
src/sets.jl 100.00% <100.00%> (ø)
src/variables.jl 99.00% <100.00%> (+0.03%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/sets.jl Outdated Show resolved Hide resolved
src/sets.jl Outdated Show resolved Hide resolved
@joaquimg
Copy link
Member

joaquimg commented Aug 7, 2023

What about a macro:
@parameter(model, x == 2)

It would be more natural for beginners to create a parameter instead of a variable constrained in the parameter set.

src/variables.jl Outdated Show resolved Hide resolved
@blegat
Copy link
Member

blegat commented Aug 7, 2023

It would be more natural for beginners to create a parameter instead of a variable constrained in the parameter set.

We already have @variable(model, x in ComplexPlane()) and no @complex(model, x). Using the @variable macro might be more consistent with the rest.

test/test_variable.jl Outdated Show resolved Hide resolved
src/variables.jl Outdated Show resolved Hide resolved
src/variables.jl Outdated Show resolved Hide resolved
@odow odow changed the title WIP: add syntax for MOI.Parameter Add syntax for Parameter Aug 9, 2023
src/variables.jl Outdated Show resolved Hide resolved
src/variables.jl Outdated Show resolved Hide resolved
src/macros.jl Outdated Show resolved Hide resolved
@odow
Copy link
Member Author

odow commented Aug 15, 2023

Any other comments?

@odow odow merged commit 9bb61c2 into master Aug 25, 2023
11 checks passed
@odow odow deleted the od/parameter branch August 25, 2023 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants