Gurobi version 9

254 views
Skip to first unread message

hosein.h...@gmail.com

unread,
Nov 30, 2019, 8:03:45 AM11/30/19
to AMPL Modeling Language
hello,
I wanted to update my gurobi solver to the new release 9. but it was not available yet. Can you please tell me when it is going to be available?

AMPL Google Group

unread,
Dec 1, 2019, 7:54:08 PM12/1/19
to AMPL Modeling Language
We are actively working on updating the AMPL solver interface to Gurobi release 9, but we do not have a definite date for release as yet.


--
Robert Fourer
am...@googlegroups.com
{#HS:1019856070-61673#}

hosein.h...@gmail.com

unread,
Dec 3, 2019, 6:12:32 AM12/3/19
to AMPL Modeling Language
hi
thank you. how one would become aware of this updated version of AMPL? will it be posted on this forum? 

AMPL Google Group

unread,
Dec 4, 2019, 6:37:15 AM12/4/19
to AMPL Modeling Language
When Gurobi 9.0 for AMPL becomes available, we will announce it on this forum, and also on our Twitter feed and under What's New on our homepage.


--
Robert Fourer
am...@googlegroups.com
{#HS:1019856070-61673#}
On Tue, Dec 3, 2019 at 11:12 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hi
thank you. how one would become aware of this updated version of AMPL? will
it be posted on this forum?

On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, hosein....@gmail.com

On Mon, Dec 2, 2019 at 12:53 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
We are actively working on updating the AMPL solver interface to Gurobi release 9, but we do not have a definite date for release as yet.


--
Robert Fourer
am...@googlegroups.com

AMPL Google Group

unread,
Dec 7, 2019, 9:18:10 PM12/7/19
to AMPL Modeling Language
Gurobi 9.0 for AMPL is now available.
See https://groups.google.com/d/msg/ampl/Q-a5YaD5_VI/LZRNmzNGAwAJ.


--
Robert Fourer
am...@googlegroups.com
{#HS:1019856070-61673#}
On Wed, Dec 4, 2019 at 11:36 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
When Gurobi 9.0 for AMPL becomes available, we will announce it on this forum, and also on our Twitter feed and under What's New on our homepage.


--
Robert Fourer
am...@googlegroups.com
On Tue, Dec 3, 2019 at 11:12 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hi
thank you. how one would become aware of this updated version of AMPL? will
it be posted on this forum?

On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, hosein....@gmail.com

On Mon, Dec 2, 2019 at 12:53 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
We are actively working on updating the AMPL solver interface to Gurobi release 9, but we do not have a definite date for release as yet.


--
Robert Fourer
am...@googlegroups.com

Hossein Haghighat

unread,
Dec 9, 2019, 1:18:50 AM12/9/19
to AMPL Modeling Language
hi,
regarding the new feature for handling bilinear terms, I model a term like z * y in the objective function where z is a sign-free variable and y a bounded variable. 
when I solve with gurobi 9, I get the error below:

Gurobi 9.0.0: quadratic objective is not positive definite
No basis.

why this happens, as we expect the new version handles it. 

Hossein Haghighat

unread,
Dec 9, 2019, 1:32:27 AM12/9/19
to AMPL Modeling Language
here is the model:

var x; var y;
var u >= 0; var v >= 0;
var r; var s; var t;

minimize obj: u+v + u * x;

s.t. C1: r^2+s^2 <= u^2;
s.t. C2_1: t <= v;
s.t. C2_2: t >= -v;
s.t. C3: x+2 = r;
s.t. C4: y+1 = s;
s.t. C5: x+y = t;

if we remove u * x it is solved. otherwise not. 

On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat wrote:

AMPL Google Group

unread,
Dec 9, 2019, 8:33:55 PM12/9/19
to AMPL Modeling Language
It is important to consider the new options in Gurobi 9.0, particularly the new option nonconvex:

   nonconvex    How to handle non-convex quadratic objectives and constraints:
                     -1 = default choice (currently the same as 1)
                      0 = complain about non-convex quadratic terms
                      1 = complain if Gurobi's presolve cannot discard or
                             eliminate nonquadratic terms
                      2 = translate quadratic forms to bilinear form and use
                             spatial branching.

To get Gurobi to accept nonconvex terms, you need to specify "option gurobi_options 'nonconvex=2';" (or add nonconvex=2 to a gurobi_options string that you are already specifying).


--
Robert Fourer
am...@googlegroups.com
{#HS:1019856070-61673#}
On Mon, Dec 9, 2019 at 6:32 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
here is the model:

var x; var y;
var u >= 0; var v >= 0;
var r; var s; var t;

minimize obj: u+v + *u * x*;


s.t. C1: r^2+s^2 <= u^2;
s.t. C2_1: t <= v;
s.t. C2_2: t >= -v;
s.t. C3: x+2 = r;
s.t. C4: y+1 = s;
s.t. C5: x+y = t;

if we remove u * x it is solved. otherwise not.

On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat
On Mon, Dec 9, 2019 at 6:19 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hi,
regarding the new feature for handling bilinear terms, I model a term like
z * y in the objective function where z is a sign-free variable and y a
bounded variable.
when I solve with gurobi 9, I get the error below:

Gurobi 9.0.0: quadratic objective is not positive definite
No basis.

why this happens, as we expect the new version handles it.




On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat
On Sun, Dec 8, 2019 at 2:17 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
Gurobi 9.0 for AMPL is now available.
See https://groups.google.com/d/msg/ampl/Q-a5YaD5_VI/LZRNmzNGAwAJ.


--
Robert Fourer
am...@googlegroups.com
On Wed, Dec 4, 2019 at 11:36 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
When Gurobi 9.0 for AMPL becomes available, we will announce it on this forum, and also on our Twitter feed and under What's New on our homepage.


--
Robert Fourer
am...@googlegroups.com
On Tue, Dec 3, 2019 at 11:12 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hi
thank you. how one would become aware of this updated version of AMPL? will
it be posted on this forum?

On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, hosein....@gmail.com

On Mon, Dec 2, 2019 at 12:53 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
We are actively working on updating the AMPL solver interface to Gurobi release 9, but we do not have a definite date for release as yet.


--
Robert Fourer
am...@googlegroups.com

Hossein Haghighat

unread,
Dec 9, 2019, 9:15:17 PM12/9/19
to AMPL Modeling Language
thanks for reply. I do add the option as you mentioned. 
to see there is still bugs in handling quadratic constraints, let us modify the model above slightly, as copied below:  

reset;
var x ; var y;
var u >= 0; var v >= 0;
var r; var s; var t;

minimize obj: u+v ;

s.t. C1: r^2+s^2 = u^2;
s.t. C2_1: t <= v;
s.t. C2_2: t >= -v;
s.t. C3: x+2 = r;
s.t. C4: y+1 = s;
s.t. C5: x+y = t;

option solver gurobi;
option gurobi_options " NonConvex 2  ";
solve;

it give the error below: 

Gurobi 9.0.0: NonConvex 2
Gurobi 9.0.0: Gurobi cannot handle quadratic equality constraints.

I have also tested a more general model with bilinear terms. it cannot handle. 

AMPL Google Group

unread,
Dec 10, 2019, 5:45:52 AM12/10/19
to AMPL Modeling Language
We don't immediately see anything in the Gurobi 9.0 documentation that explicitly prohibits quadratic equality constraints when nonconvex=2 is set. We are investigating the error message that you see, and will report as soon as there is a fix or an explanation.


--
Robert Fourer
am...@googlegroups.com
{#HS:1019856070-61673#}
On Tue, Dec 10, 2019 at 2:15 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
thanks for reply. I do add the option as you mentioned.
to see there is still bugs in handling quadratic constraints, let us modify
the model above slightly, as copied below:

reset;
var x ; var y;
var u >= 0; var v >= 0;
var r; var s; var t;

minimize obj: u+v ;

s.t. C1: r^2+s^2* = *u^2;

s.t. C2_1: t <= v;
s.t. C2_2: t >= -v;
s.t. C3: x+2 = r;
s.t. C4: y+1 = s;
s.t. C5: x+y = t;

option solver gurobi;
option gurobi_options " NonConvex 2 ";
solve;

it give the error below:

Gurobi 9.0.0: NonConvex 2
Gurobi 9.0.0: Gurobi cannot handle quadratic equality constraints.

I have also tested a more general model with bilinear terms. it cannot
handle.


On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat
On Tue, Dec 10, 2019 at 1:33 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
It is important to consider the new options in Gurobi 9.0, particularly the new option nonconvex:

   nonconvex    How to handle non-convex quadratic objectives and constraints:
                     -1 = default choice (currently the same as 1)
                      0 = complain about non-convex quadratic terms
                      1 = complain if Gurobi's presolve cannot discard or
                             eliminate nonquadratic terms
                      2 = translate quadratic forms to bilinear form and use
                             spatial branching.

To get Gurobi to accept nonconvex terms, you need to specify "option gurobi_options 'nonconvex=2';" (or add nonconvex=2 to a gurobi_options string that you are already specifying).


--
Robert Fourer
am...@googlegroups.com
On Mon, Dec 9, 2019 at 6:32 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
here is the model:

var x; var y;
var u >= 0; var v >= 0;
var r; var s; var t;

minimize obj: u+v + *u * x*;


s.t. C1: r^2+s^2 <= u^2;
s.t. C2_1: t <= v;
s.t. C2_2: t >= -v;
s.t. C3: x+2 = r;
s.t. C4: y+1 = s;
s.t. C5: x+y = t;

if we remove u * x it is solved. otherwise not.

On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat
On Mon, Dec 9, 2019 at 6:19 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hi,
regarding the new feature for handling bilinear terms, I model a term like
z * y in the objective function where z is a sign-free variable and y a
bounded variable.
when I solve with gurobi 9, I get the error below:

Gurobi 9.0.0: quadratic objective is not positive definite
No basis.

why this happens, as we expect the new version handles it.




On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat
On Sun, Dec 8, 2019 at 2:17 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
Gurobi 9.0 for AMPL is now available.
See https://groups.google.com/d/msg/ampl/Q-a5YaD5_VI/LZRNmzNGAwAJ.


--
Robert Fourer
am...@googlegroups.com
On Wed, Dec 4, 2019 at 11:36 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
When Gurobi 9.0 for AMPL becomes available, we will announce it on this forum, and also on our Twitter feed and under What's New on our homepage.


--
Robert Fourer
am...@googlegroups.com
On Tue, Dec 3, 2019 at 11:12 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hi
thank you. how one would become aware of this updated version of AMPL? will
it be posted on this forum?

On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, hosein....@gmail.com

On Mon, Dec 2, 2019 at 12:53 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
We are actively working on updating the AMPL solver interface to Gurobi release 9, but we do not have a definite date for release as yet.


--
Robert Fourer
am...@googlegroups.com

Hossein Haghighat

unread,
Dec 13, 2019, 12:15:17 AM12/13/19
to AMPL Modeling Language
hi,
regarding bilinear terms in AMPL-Gurobi 9, I have figured out that some times instead of explicitly writing  terms like  X * Y (in objective or constraints), the following reformulation works!: 

Z= X * Y  ====>   Z >= X * Y  , Z<= X * Y;

I would appreciate it very much if the main cause of this error can be identified and fixed ASAP. 

AMPL Google Group

unread,
Dec 13, 2019, 6:51:04 PM12/13/19
to AMPL Modeling Language
We have fixed the AMPL-Gurobi interface so that quadratic equality constraints are accepted when 'nonconvex 2' is specified. An updated build, containing this fix, is now available for download.


--
Robert Fourer
am...@googlegroups.com
{#HS:1019856070-61673#}
On Fri, Dec 13, 2019 at 5:15 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hi,
regarding bilinear terms in AMPL-Gurobi 9, I have figured out that some
times instead of explicitly writing terms like X * Y (in objective or
constraints), the following reformulation works!:

Z= X * Y ====> Z >= X * Y , Z<= X * Y;

I would appreciate it very much if the main cause of this error can be
identified and fixed ASAP.



On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat

On Tue, Dec 10, 2019 at 10:45 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
We don't immediately see anything in the Gurobi 9.0 documentation that explicitly prohibits quadratic equality constraints when nonconvex=2 is set. We are investigating the error message that you see, and will report as soon as there is a fix or an explanation.


--
Robert Fourer
am...@googlegroups.com
On Tue, Dec 10, 2019 at 2:15 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
thanks for reply. I do add the option as you mentioned.
to see there is still bugs in handling quadratic constraints, let us modify
the model above slightly, as copied below:

reset;
var x ; var y;
var u >= 0; var v >= 0;
var r; var s; var t;

minimize obj: u+v ;

s.t. C1: r^2+s^2* = *u^2;
s.t. C2_1: t <= v;
s.t. C2_2: t >= -v;
s.t. C3: x+2 = r;
s.t. C4: y+1 = s;
s.t. C5: x+y = t;

option solver gurobi;
option gurobi_options " NonConvex 2 ";
solve;

it give the error below:

Gurobi 9.0.0: NonConvex 2
Gurobi 9.0.0: Gurobi cannot handle quadratic equality constraints.

I have also tested a more general model with bilinear terms. it cannot
handle.


On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat
On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat
On Mon, Dec 9, 2019 at 6:19 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hi,
regarding the new feature for handling bilinear terms, I model a term like
z * y in the objective function where z is a sign-free variable and y a
bounded variable.
when I solve with gurobi 9, I get the error below:

Gurobi 9.0.0: quadratic objective is not positive definite
No basis.

why this happens, as we expect the new version handles it.




On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat
On Sun, Dec 8, 2019 at 2:17 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
Gurobi 9.0 for AMPL is now available.
See https://groups.google.com/d/msg/ampl/Q-a5YaD5_VI/LZRNmzNGAwAJ.


--
Robert Fourer
am...@googlegroups.com
On Wed, Dec 4, 2019 at 11:36 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
When Gurobi 9.0 for AMPL becomes available, we will announce it on this forum, and also on our Twitter feed and under What's New on our homepage.


--
Robert Fourer
am...@googlegroups.com
On Tue, Dec 3, 2019 at 11:12 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hi
thank you. how one would become aware of this updated version of AMPL? will
it be posted on this forum?

On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, hosein....@gmail.com

Hossein Haghighat

unread,
Dec 13, 2019, 9:46:12 PM12/13/19
to AMPL Modeling Language
hello,
thanks a lot. I do not see the updated version in my download page. 

AMPL Google Group

unread,
Dec 14, 2019, 4:38:46 AM12/14/19
to AMPL Modeling Language
The Gurobi build that contains the fix is dated 20191211. Your download page at https://ampl.com/dl/ampl-download.html should show some of the following (depending on the platforms that you are using):

dceb030ed98e9ea0c2e83396a905cebc.png

(Older dates correspond to platforms that Gurobi stopped supporting.) If you are not seeing the 20191211 versions, can you post a screenshot?


--
Robert Fourer
am...@googlegroups.com
{#HS:1019856070-61673#}
On Sat, Dec 14, 2019 at 2:46 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hello,
thanks a lot. I *do not see* the updated version in my download page.


On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat
On Fri, Dec 13, 2019 at 11:50 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
We have fixed the AMPL-Gurobi interface so that quadratic equality constraints are accepted when 'nonconvex 2' is specified. An updated build, containing this fix, is now available for download.


--
Robert Fourer
am...@googlegroups.com
On Fri, Dec 13, 2019 at 5:15 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hi,
regarding bilinear terms in AMPL-Gurobi 9, I have figured out that some
times instead of explicitly writing terms like X * Y (in objective or
constraints), the following reformulation works!:

Z= X * Y ====> Z >= X * Y , Z<= X * Y;

I would appreciate it very much if the main cause of this error can be
identified and fixed ASAP.



On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat
On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat
On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat
On Mon, Dec 9, 2019 at 6:19 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hi,
regarding the new feature for handling bilinear terms, I model a term like
z * y in the objective function where z is a sign-free variable and y a
bounded variable.
when I solve with gurobi 9, I get the error below:

Gurobi 9.0.0: quadratic objective is not positive definite
No basis.

why this happens, as we expect the new version handles it.




On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat

Hossein Haghighat

unread,
Dec 14, 2019, 4:54:15 AM12/14/19
to am...@googlegroups.com

hello,
many thanks for the excellent support! it is resolved now.
Mailtrack Sender notified by
Mailtrack 12/14/19, 01:23:29 PM

--
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/Y17TZSoqFvc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/reply-77152-1019856070-2916030464-1576316321-1594914609%40helpscout.net.

Hossein Haghighat

unread,
Dec 14, 2019, 10:01:17 PM12/14/19
to AMPL Modeling Language
hello,
I am running a model with AMPL-Gurobi 9. two consecutive runs give two different solutions. is there any heuristic method in this version ? which solution I can trust? 

AMPL Google Group

unread,
Dec 17, 2019, 2:35:51 PM12/17/19
to AMPL Modeling Language
All of Gurobi's methods are based on optimal algorithms, though they sometimes stop short of optimality due to settings such as feasibility tolerance, mip gap, or node limit. Even with these settings, Gurobi is designed to be "deterministic", meaning that it finds the same objective value and the same values of the variables when it is run twice in exactly the same way; see Is Gurobi Deterministic? for a discussion (and a few exceptions).

To get more help with the different solutions that you are seeing, post the listings of your AMPL runs, along with an explanation that shows where the solutions are different. Also attach your files so that we can try running the same example.


--
Robert Fourer
am...@googlegroups.com
{#HS:1019856070-61673#}
On Sun, Dec 15, 2019 at 3:01 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hello,
I am running a model with AMPL-Gurobi 9. two consecutive runs give two different solutions. is there any heuristic method in this version ? which solution I can trust?

On Sat, Dec 14, 2019 at 9:54 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hello,
many thanks for the excellent support! it is resolved now.

Mailtrack
Sender notified by
Mailtrack 12/14/19, 01:23:29 PM


On Sat, Dec 14, 2019 at 9:38 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
The Gurobi build that contains the fix is dated 20191211. Your download page at https://ampl.com/dl/ampl-download.html should show some of the following (depending on the platforms that you are using):

dceb030ed98e9ea0c2e83396a905cebc.png

(Older dates correspond to platforms that Gurobi stopped supporting.) If you are not seeing the 20191211 versions, can you post a screenshot?


--
Robert Fourer
am...@googlegroups.com
On Sat, Dec 14, 2019 at 2:46 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
hello,
thanks a lot. I *do not see* the updated version in my download page.

On Saturday, November 30, 2019 at 4:33:45 PM UTC+3:30, Hossein Haghighat
On Fri, Dec 13, 2019 at 11:50 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
We have fixed the AMPL-Gurobi interface so that quadratic equality constraints are accepted when 'nonconvex 2' is specified. An updated build, containing this fix, is now available for download.


--
Robert Fourer
am...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages