Search found 1038 matches

by bussieck
4 years ago
Forum: Syntax
Topic: Syntax Problem
Replies: 2
Views: 8842

Re: Syntax Problem

It's unclear what np is, but I assume this is an alias to n. Posting complete examples really helps. Here are two solutions. One is a direct on and the other uses more symbols but can easily serve to calculate similar sums for other nodes, not just n4: set l /L1*L6/, n /n1*n5 /, t /t1/; alias (n,np)...
by bussieck
4 years ago
Forum: Syntax
Topic: Problem maximizing a infeasible function
Replies: 4
Views: 2982

Re: Problem maximizing a infeasible function

That's obviously a weird behavior. Without more information it is hard to say what's going on.

-Michael
by bussieck
4 years ago
Forum: Modeling
Topic: Binary Variable Value
Replies: 4
Views: 5391

Re: Binary Variable Value

Solvers work with tolerances. A popular tolerance for deciding if a value is "integer" is if abs(x-round(x))<1e-5. Many solvers allow you to change such tolerances. For example, Cplex: epint (see https://www.gams.com/latest/docs/S_CPLE ... CPLEXepint).

-Michael
by bussieck
4 years ago
Forum: Tools
Topic: Encoding problem with cyrillic letters in a gdx-file
Replies: 3
Views: 3932

Re: Encoding problem with cyrillic letters in a gdx-file

I guess there is currently no other way than to create (utf-8 encoded) CSV file (from GAMS) and to load these into Excel. We (GAMS) has this on the radar and are working on this.

-Michael
by bussieck
4 years ago
Forum: Modeling
Topic: Optimal solution is solver-specific
Replies: 2
Views: 1898

Re: Optimal solution is solver-specific

Alternative optimal solutions? Both solutions have objective 2. So you get different (primal) solutions depending on pure chance. This is not uncommon. Just search the internet for "degenerate linear programs".

-Michael
by bussieck
4 years ago
Forum: Syntax
Topic: Writing model status to external file
Replies: 2
Views: 1945

Re: Writing model status to external file

Hi,

You need to understand the difference between compile and execution time in GAMS. See e.g. https://www.gams.com/latest/docs/UG_Gam ... ll_TwoPass. Creating a file at execution time is done via the put facility, see https://www.gams.com/latest/docs/UG_Put.html

-Michael
by bussieck
4 years ago
Forum: Modeling
Topic: Implementing decomposition method
Replies: 2
Views: 2171

Re: Implementing decomposition method

Hi,

back in the days (12 years ago?) I wrote a BP for the graph coloring algorithm in GAMS. This uses some advanced GAMS magic. You can freely use this, but I can't/won't support this any longer.
gc.zip
(370.9 KiB) Downloaded 321 times
-Michael
by bussieck
4 years ago
Forum: Solvers
Topic: Starting point for Barrier algorithm in CPLEX
Replies: 1
Views: 25028

Re: Starting point for Barrier algorithm in CPLEX

The barrier algorithm is notoriously difficult to restart. See https://scicomp.stackexchange.com/quest ... warm-start.

-Michael
by bussieck
4 years ago
Forum: API
Topic: Removing .dat files for Python GamsModelInstace use
Replies: 4
Views: 4734

Re: Removing .dat files for Python GamsModelInstace use

Viktor, The initialize is a costly function. It runs a GAMS process to create scratch file (the dat files) and initializes the model instance from those. Instead of breaking the sequence 5000k solves into 100k initialize/reset it might be worth seeing where the memory leak comes from. I can reproduc...
by bussieck
4 years ago
Forum: Syntax
Topic: Positive variable
Replies: 3
Views: 3077

Re: Positive variable

There are many ways how to deal with infeasibility. Bruce McCarl Newsletter vol. 40 gives good recommendations on how to deal with infeasible models (see section 3 of https://www.gams.com/fileadmin/communit ... news40.pdf).

-Michael