0

I have a small problem in which gurobi returns an error because Q matrix is not positive semi-definite (PSD).

Minimize
  CAV_TDiff_LK_0_0 + CAV_TDiff_LK_0_1 + 0 TC_l_0_0 + 0 TC_lz1_0_1
Subject To
 CSTR_T_LK_0_1: CDV_T_EPS_L_0 + 7.8133169096884169e+006 C_l_0 - CAV_T_LK_0_1 + 319573.9014647137 TC_l_0_1 = 0
 CSTR_T_l_z1_LK_0_0: T_lz1_0_0 = 24.7593615199
 CSTR_T_l_z1_LK_0_1: - 1.3992339234055925e+007 C_lz1_0 - T_lz1_0_0 + T_lz1_0_1 + 159786.9507323569 TC_lz1_0_0 = 0
 CSTR_TDiff_LK_TEPGEqT_0_0: CAV_TDiff_LK_0_0 + CAV_T_LK_0_0   >= 24.7593615199
 CSTR_TDiff_LK_TEPGEqT_0_1: CAV_TDiff_LK_0_1 + CAV_T_LK_0_1   >= 24.4491708299
 CSTR_TDiff_LK_TGEqTEP_0_0: CAV_TDiff_LK_0_0 - CAV_T_LK_0_0   >= -24.7593615199
 CSTR_TDiff_LK_TGEqTEP_0_1: CAV_TDiff_LK_0_1 - CAV_T_LK_0_1   >= -24.4491708299
 CSTR_C_l_T_l_z1_LK_0_0: 3.888e+007 TC_l_0_0 + [ - 40 C_l_0 * TC_l_0_0  + 0.025 T_lz1_0_0 ^ 2 - 972000 T_lz1_0_0 * TC_l_0_0 ] <= 0
 CSTR_C_l_T_l_z1_LK_0_1: 3.888e+007 TC_l_0_1 + [ - 40 C_l_0 * TC_l_0_1  + 0.025 T_lz1_0_1 ^ 2 - 972000 T_lz1_0_1 * TC_l_0_1 ] <= 0
 CSTR_C_l_z1_T_l_z1_LK_0_0: 7.4210304e+007 TC_lz1_0_0 + [ - 40 C_lz1_0 * TC_l_0_0 + 0.025 T_lz1_0_0 ^ 2 - 1.8552576000000001e+006 T_lz1_0_0 * TC_lz1_0_0 ] <= 0
 CSTR_C_l_z1_T_l_z1_LK_0_1: 7.4210304e+007 TC_lz1_0_1 + [ - 40 C_lz1_0 * TC_l_0_1 + 0.025 T_lz1_0_1 ^ 2 - 1.8552576000000001e+006 T_lz1_0_1 * TC_lz1_0_1 ] <= 0
Bounds
End

Given the '.lp' generated by gurobi, I try to check if SCIP can solve this model. I am using 'scip-3.1.0.win.x86_64.msvc.opt.spx.ld' version with pre-compiled binaries. Unfortunately, SCIP returns

[src\scip\reader_lp.c:147] ERROR: Syntax error in line 18 ('972000'): two consecutive values.
  input:    + 0.025 T_lz1_0_0 ^ 2 - 972000 T_lz1_0_0 * TC_l_0_0 ] <= 0
                                     ^
[src\scip\reader_lp.c:3307] ERROR: Error <-2> in function call error reading file <myfile.lp>

My questions are, (a) Do you have any clue what is this error about and how to overcome it?

(b) Let say, if this error is fixed, would SCIP automatically linearizes this constraint? This is a convex model, but not second-order cone. Will SCIP relaxes it with outer-approximation (or any other method)?

(c) If not, if it is limited by the gurobi's generated format, would you recommend any modelling language that I can quickly write it so SCIP can solve?

twfx
  • 1,664
  • 9
  • 29
  • 56

1 Answers1

2

(a) The problem is the space between '^' and '2'. SCIP expects this to be "^2". I don't think that adding a space between '^' and '2' is allowed, too.

(b) Yes, linearization via outer-approximation.

(c) AMPL, GAMS, ZIMPL.

stefan
  • 799
  • 4
  • 9
  • Excellent! Not sure if I should start a new question. Is it possible to output SCIP-linearized model to an LP file? SCIP+ipopt seems to take pretty long (>1hr) and still going, probably I should try with SCIP+gurobi or SCIP+cplex. – twfx Feb 16 '15 at 12:12
  • Well, SCIP creates a linear relaxation of the problem, not a linear reformulation. If you run SCIP from its shell and interrupt it, e.g., after the root node, then you can use the "write lp" command to write out the current LP relaxation. With the C API, use the function SCIPwriteLP(). – stefan Mar 19 '16 at 12:15