Search found 286 matches

by bussieck
3 days ago
Forum: Syntax
Topic: Violated BCH-generated cuts
Replies: 3
Views: 78

Re: Violated BCH-generated cuts

Yes, in bchtsp we add the constraint as a cut but also do a check on the incumbent via userincbcall. Using a lazy constraint callback might be better, but that is currently not implemented in BCH/Cplex

-Michael
by bussieck
4 days ago
Forum: Syntax
Topic: Violated BCH-generated cuts
Replies: 3
Views: 78

Re: Violated BCH-generated cuts

Yes this is possible behavior. The cuts are used to eliminate fractional solution, never integer solutions. So you don't provide "cuts" you provide constraints and the BCH facility is not designed to do this. I am not saying that Cplex does not allow an orchestration of callbacks to accomplish what ...
by bussieck
3 weeks ago
Forum: Tools
Topic: How to calculate the total solver resource usage time
Replies: 3
Views: 249

Re: How to calculate the total solver resource usage time

Sorry, I meant mymodel.resUsd (not resLim). -Michael
by bussieck
3 weeks ago
Forum: Syntax
Topic: 1/0 notation
Replies: 2
Views: 78

Re: 1/0 notation

Hmmm, this looks like on old way to trigger an execution error if the data is too bad (the SAM is too imbalanced) to run the model. Nowadays, we would do things like this: Parameter SAMGAPCUTOFF 'max acceptable abs gap bt model SAM row and col totals' ERRSAMBAL(AC) 'the absolute imbalance for AC exc...
by bussieck
3 weeks ago
Forum: Modeling
Topic: Print intermediate values when solving a model
Replies: 1
Views: 63

Re: Print intermediate values when solving a model

There is no such thing. The solve statement is supposed to be a black box. Check the model and solve status and see if what is returned is actually classified as a solution, or in the status tells you some other story (infeasible, ...).

-Michael
by bussieck
3 weeks ago
Forum: Tools
Topic: How to calculate the total solver resource usage time
Replies: 3
Views: 249

Re: How to calculate the total solver resource usage time

After the solve mymodel.resLim returns the time (in seconds) the solver reports. The attributes .etSolve and .etSolver report times independently measured by GAMS. etSolver and resLim should be pretty close. etSolve contains the model generation time. Details here: https://www.gams.com/latest/docs/U...
by bussieck
3 weeks ago
Forum: Syntax
Topic: retrieve the lower bound
Replies: 1
Views: 85

Re: retrieve the lower bound

Correct, obj.l or modelname.objval return the incumbent and hence an upper bound on the global optimum (for minimization problems). modelname.objest (see https://www.gams.com/latest/docs/UG_ModelSolve.html?search=objest) give you the lower bound returned by Baron (and many other solvers that work wi...
by bussieck
1 month ago
Forum: Archive Google Group
Topic: How can I make this set?
Replies: 2
Views: 115

Re: How can I make this set?

Here is the code: set s /1*200/, j /1*100/; parameter d(s,j); d(s,j)$(uniform(0,1)<0.05) = uniformInt(1,10); *W(s)=the subset of Network Nodes which d(s,j)<>0. *W'(s)= the subset of W(s) such that d(s,j)<>d(s,j') , for all j,j' belong to W'(s). set W(s,j), Wuniq(s,j); W(s,j) = d(s,j); Wuniq(s,j) = W...
by bussieck
1 month ago
Forum: Modeling
Topic: Change of solution without changing code
Replies: 1
Views: 82

Re: Change of solution without changing code

This is an NLP and perhaps a non-convex NLP with many local solution. You can try to run a global solver (Antigone, Baron, Couenne, Lindo, Scip) to find the global optimum. Don't forget to set the optimality tolerance to 0: transport.optCR=0; If this doesn't do it there must some logical issue and t...
by bussieck
1 month ago
Forum: Syntax
Topic: Error 171: Domain violation for set
Replies: 4
Views: 135

Re: Error 171: Domain violation for set

There are big differences in the algebra in your write-up and the GAMS model, e.g. equation 6. I think I understand what the math does, but your equation does not implement the math and you try to make some arguments why the GAMS algebra also prevents crossing (true or not) but it does not implement...