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

Problem with JuMP.fix command #30

Closed
trivedymk opened this issue Jun 22, 2018 · 4 comments
Closed

Problem with JuMP.fix command #30

trivedymk opened this issue Jun 22, 2018 · 4 comments

Comments

@trivedymk
Copy link

Hi,

I've been working on a complementarity model and it involves fixing some variables. To do this in JuMP i've attempted to use

for i in suppliers, s in seasons, t in timeperiods JuMP.fix(s_contract["EU","UK",i,s,t],0) JuMP.fix(s_spot["EU","UK",i,s,t],0) end

However, when I run this with complementarity I get the error

"setvalue for fixed variables is no longer supported. Use JuMP.fix instead.".

setvalue(mcp_data[i].var, z[mcp_data[i].lin_idx])

So setvalue here needs to be changed to JuMP.fix to reflect the updated jump build I think.

@chkwon
Copy link
Owner

chkwon commented Jun 23, 2018

Thanks for the update. I'll take a look surely. By the way, i don't think I can work on it sometime soon as I am in an international travel.

@chkwon
Copy link
Owner

chkwon commented Aug 7, 2018

I don't understand what fixing a variable in a complementarity problem means. Does your complementarity problem have multiple solutions?

Does the PATH solver or other complementarity problem solvers (if any) support such variable fixing functionality?

@boxblox
Copy link

boxblox commented Dec 6, 2018

I am also getting this JuMP.fix error... I believe trivedymk might be right that setvalue has been deprecated. Any solver should be able to handle this type of fixing... an equivalent statement would be to say that JuMP.fix(x, 5) or 5 <= x <=5. In a GAMS environment you can do this with PATH.

@chkwon
Copy link
Owner

chkwon commented Jan 26, 2021

Closing for the new version of PATHSolver.jl chkwon/PATHSolver.jl#44

@chkwon chkwon closed this as completed Jan 26, 2021
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

No branches or pull requests

3 participants