Closed trivedymk closed 6 years ago
In the current form, this package does not support constraints. In the standard form of complementarity problems, there are no constraints. You will have to either reformulate your problem as a standard form problem or develop an algorithm that solves standard-form complementarity problems iteratively. Unfortunately, I'm not an expert in this area.
Does this apply to the NLexpression macro as well?
@mapping
is in fact an alias for @NLexpression
.
That makes a bit more sense
I was trying to use NLexpression to create a substitution variable (similar to a GAMS macro) but it looks like I'm back to the drawing board... any thoughts?
Hi again. I posted this on the discourse JULIA forum and was told it could be a bug with this package.
I am trying to set some constraints on some of my variables and get an error message.
This is a highly reduced version of the code to only one variable (doesnt make physical sense but gives same error message).
Without this constraints loop, the model solves.
Including the loop setting the constraints, causes this error message:
BoundsError: attempt to access 4-element Array{Float64,1} at index [5] in solveMCP at Complementarity\src\mcp.jl:52 in #solveMCP#1 at Complementarity\src\mcp.jl:53 in at base\<missing> in #_solve_path#3 at Complementarity\src\mcp.jl:138 in solveMCP at PATHSolver\src\PATHSolver.jl:56 in f_user_wrap at PATHSolver\src\PATHSolver.jl:124 in FunctionWrapper at FunctionWrappers\src\FunctionWrappers.jl:106 in do_ccall at FunctionWrappers\src\FunctionWrappers.jl:91 in macro expansion at FunctionWrappers\src\FunctionWrappers.jl:100 in at FunctionWrappers\src\FunctionWrappers.jl:49 in myfunc at Complementarity\src\mcp.jl:82 in eval_g at JuMP\src\nlp.jl:557
Here's the post I made on discourse: https://discourse.julialang.org/t/newbie-looking-for-help-with-constraints-in-jump/12200