Presolve Infeasibility warning in IPOPT solver

Warning:
presolve: constraint nod_SiSf cannot hold:
body >= 0 cannot be <= -0.000123621; difference = 0.000123621

I need to expand this constraint to see what is the reason for infeasibility. I am not using console. All the solution I found online are for console. I need the python command for the same

1 Like

Hi @Monish_Kumar,

You can evaluate any AMPL statement such as expand and solexpand using the AMPL.eval method. For instance:

ampl.eval("solexpand nod_SiSf;")

@fdabrandao Thanks Filipe. Is there a way to debug the constraints infeasibility in IPOPT solver in amplpy?

Hi @Monish_Kumar,

That message comes from the AMPL presolver than runs before passing the problem to ipopt. The expression in the output of solexpand nod_SiSf; seems to be infeasible. Could you please send us the expression in that constraint? To debug it you can use ampl.get_value("*expression in the body of the constraint*") and then simplify it until you see what is resulting in the infeasibility.

@fdabrandao
Thanks for this. I found the error. Can you please tell me is there a way to provide multiple start points to the ipopt solver?

var S_pred_bath = (0.035 * s_pi_foundry_grade + 0.03 * s_pi_steel_grade + 0.01 * s_crc_scrap + 0.05 * s_ms_scrap + 0.03243645172500395 * s_heel)/furnace_buffer;
var Sfinal >= 0.007;
subject to nod_Sfinal: Sfinal <= 0.025;
subject to nod_SiSf: S_pred_bath >= Sfinal;

Here are the constraints

You can only pass one solution at time, but you can invoke ipopt multiple times with each starting point. In case you are having performance issues, other non-linear solvers like Knitro should help.

Sure, will it support the same “.mod” file format. The following is the format of themod file

options ipopt_options “print_level=12 output_file=‘ipopt_output.txt’”;

#Variables:

var s_tin >= 0;

var s_pi_foundry_grade >= 0;

var s_pi_steel_grade >= 0;

var s_crc_scrap >= 0;

var s_ms_scrap >= 0;

var s_inoculant_ladle >= 6.0;

var s_inoculant_stream >= 1.0;

var s_fesimg >= 24;

var s_fecr >= 0;

var s_simn >= 0;

var s_fesi >= 0;

var s_cpc >= 0;

var s_calcined_anthracite >= 0;

param s_heel = 3000.0000;

param s_ladle = 2000.0000;

var Sfinal >= 0.007;

var Mgfinal >= 0.05;

var optimised_cost = 1 * s_tin + 25 * s_pi_foundry_grade + 25 * s_pi_steel_grade + 25 * s_crc_scrap + 25 * s_ms_scrap + 1 * s_inoculant_ladle + 1 * s_inoculant_stream + 10 * s_fesimg + 1 * s_fecr + 1 * s_simn + 1 * s_fesi + 1 * s_cpc + 1 * s_calcined_anthracite + 1 * s_heel;

var furnace_buffer = (0.97 * s_pi_foundry_grade+0.97 * s_pi_steel_grade+0.97 * s_crc_scrap+0.97 * s_ms_scrap+1 * s_heel);

var Sn_pred_bath = (0.00654655274596392 * s_heel+(95.0 * 100.0/100) * s_tin)/furnace_buffer;

var Sn_pred_final = Sn_pred_bath + (0.0)/s_ladle;

var Sn_mean_dev >= 0, <= 0.04 - 0.03;

var C_pred_bath = (4.02 * s_pi_foundry_grade + 4.28 * s_pi_steel_grade + 0.017 * s_crc_scrap + 0.18 * s_ms_scrap + 3.723474944394807 * s_heel+(0.0 * 100.0/100) * s_fecr + (0.0 * 100.0/100) * s_simn + (0.0 * 100.0/100) * s_fesi + (88.0 * 100.0/100) * s_cpc + (80.0 * 100.0/100) * s_calcined_anthracite)/furnace_buffer;

var C_pred_final = C_pred_bath + ((0.0 * 100.0/100) * s_inoculant_ladle + (0.0 * 100.0/100) * s_inoculant_stream + (0.0 * 100.0/100) * s_fesimg)/s_ladle;

var C_mean_dev_bath >= 0, <= 3.8 - 3.65;

var C_mean_dev_final >= 0, <= 3.7 - 3.55;

var Si_pred_bath = (1.75 * s_pi_foundry_grade + 0.5 * s_pi_steel_grade + 0.21 * s_crc_scrap + 0.15 * s_ms_scrap + 1.561061733353812 * s_heel+(0.0 * 100.0/100) * s_fecr + (13.0 * 100.0/100) * s_simn + (60.0 * 100.0/100) * s_fesi + (0.0 * 100.0/100) * s_cpc + (0.0 * 100.0/100) * s_calcined_anthracite)/furnace_buffer;

var Si_pred_final = Si_pred_bath + ((65.0 * 100.0/100) * s_inoculant_ladle + (65.0 * 100.0/100) * s_inoculant_stream + (40.0 * 100.0/100) * s_fesimg)/furnace_buffer;

var Si_mean_dev_bath >= 0, <= 1.75 - 1.65;

var Si_mean_dev_final >= 0, <= 2.5 - 2.375;

var Mn_pred_bath = (0.18 * s_pi_foundry_grade + 0.08 * s_pi_steel_grade + 0.27 * s_crc_scrap + 0.475 * s_ms_scrap + 0.4507366145214538 * s_heel+(0.0 * 100.0/100) * s_fecr + (57.0 * 100.0/100) * s_simn + (0.0 * 100.0/100) * s_fesi + (0.0 * 100.0/100) * s_cpc + (0.0 * 100.0/100) * s_calcined_anthracite)/furnace_buffer;

var Mn_pred_final = Mn_pred_bath + ((0.0 * 100.0/100) * s_inoculant_ladle + (0.0 * 100.0/100) * s_inoculant_stream + (0.0 * 100.0/100) * s_fesimg)/furnace_buffer;

var P_pred_bath = (0.11 * s_pi_foundry_grade + 0.07 * s_pi_steel_grade + 0.023 * s_crc_scrap + 0.05 * s_ms_scrap + 0.07044083047855525 * s_heel+(0.0 * 100.0/100) * s_fecr + (0.0 * 100.0/100) * s_simn + (0.0 * 100.0/100) * s_fesi + (0.0 * 100.0/100) * s_cpc + (0.0 * 100.0/100) * s_calcined_anthracite)/furnace_buffer;

var P_pred_final = Mn_pred_bath + ((0.0 * 100.0/100) * s_inoculant_ladle + (0.0 * 100.0/100) * s_inoculant_stream + (0.0 * 100.0/100) * s_fesimg)/furnace_buffer;

var Cr_pred_bath = (0.0 * s_pi_foundry_grade + 0.0 * s_pi_steel_grade + 0.03 * s_crc_scrap + 0.0 * s_ms_scrap + 0.05718614448611581 * s_heel+(57.0 * 100.0/100) * s_fecr + (0.0 * 100.0/100) * s_simn + (0.0 * 100.0/100) * s_fesi + (0.0 * 100.0/100) * s_cpc + (0.0 * 100.0/100) * s_calcined_anthracite)/furnace_buffer;

var Cr_pred_final = Cr_pred_bath + ((0.0 * 100.0/100) * s_inoculant_ladle + (0.0 * 100.0/100) * s_inoculant_stream + (0.0 * 100.0/100) * s_fesimg)/furnace_buffer;

var S_pred_bath = (0.035 * s_pi_foundry_grade + 0.03 * s_pi_steel_grade + 0.01 * s_crc_scrap + 0.05 * s_ms_scrap + 0.03243645172500395 * s_heel)/furnace_buffer;

Objective:

minimize z: optimised_cost + 10000 * Sn_mean_dev + 10000 * (C_mean_dev_bath + C_mean_dev_final) + 10000 * (Si_mean_dev_bath + Si_mean_dev_final);

#Constraints

subject to c_furnace: s_tin + s_pi_foundry_grade + s_pi_steel_grade + s_crc_scrap + s_ms_scrap + s_fecr + s_simn + s_fesi + s_cpc + s_calcined_anthracite + s_heel <= 3000 + 300.0000;

subject to max_s_inoculant_ladle: s_inoculant_ladle <= 6.0;

subject to max_s_inoculant_stream: s_inoculant_stream <= 1.2;

subject to max_s_fesimg: s_fesimg <= 26;

subject to nod_Mgfinal: Mgfinal <= 0.07;

subject to nod_Sfinal: Sfinal <= 0.025;

subject to nod_SiSf: S_pred_bath >= Sfinal;

subject to Sn_mean_min_bath: Sn_pred_bath + Sn_mean_dev >= 0.03;

subject to Sn_mean_max_bath: Sn_pred_bath - (Sn_mean_dev) <= 0.03;

subject to Sn_mean_min_final: Sn_pred_final + Sn_mean_dev >= 0.03;

subject to Sn_mean_max_final: Sn_pred_final - (Sn_mean_dev) <= 0.03;

subject to C_mean_min_bath: C_pred_bath + C_mean_dev_bath >= 3.65;

subject to C_mean_max_bath: C_pred_bath - (C_mean_dev_bath) <= 3.65;

subject to C_mean_min_final: C_pred_final+ C_mean_dev_final >= 3.55;

subject to C_mean_max_final: C_pred_final - (C_mean_dev_final) <= 3.55;

subject to Si_mean_min_bath: Si_pred_bath + Si_mean_dev_bath >= 1.65;

subject to Si_mean_max_bath: Si_pred_bath - (Si_mean_dev_bath) <= 1.65;

subject to Si_mean_min_final: Si_pred_final + Si_mean_dev_final >= 2.375;

subject to Si_mean_max_final: Si_pred_final - (Si_mean_dev_final) <= 2.375;

subject to Mn_min_bath: Mn_pred_bath >= 0.4;

subject to Mn_max_bath: Mn_pred_bath <= 0.7;

subject to Mn_min_final: Mn_pred_final >= 0.4;

subject to Mn_max_final: Mn_pred_final <= 0.7;

subject to P_max_bath: P_pred_bath <= 0.08;

subject to P_max_final: P_pred_final <= 0.08;

subject to Cr_max_bath: Cr_pred_bath <= 0.08;

subject to Cr_max_final: Cr_pred_final <= 0.08;

#subject to S_max_bath: S_pred_bath <= 0.04;

subject to nodularization : s_fesimg = s_ladle * ((Mgfinal + 0.76 * (S_pred_bath - Sfinal) + 0.001 * 2.0) / (8.5 * 45.0/100)) * (1485/1450)^2 ;

end;

Hi @Monish_Kumar,

That model is infeasible due the constraint S_pred_bath >= Sfinal since S_pred_bath is 0.0305995 and Sfinal is 0.025.

Can you help me out on how did you get those values?

Since the constraint subject to nod_SiSf: S_pred_bath >= Sfinal; is the one being declared as infeasible, you can see why by checking the bounds computed by AMPL:

>>> ampl.get_value("S_pred_bath.ub2 - Sfinal.lb2")
-0.00012362057577362112

S_pred_bath.ub2 gives the upper bound for S_pred_bath, and Sfinal.lb2 gives the lower bound for Sfinal. Since the upper bound for S_pred_bath is bigger than the lower bound for Sfinal, the constraint is infeasible.

Thank you so much for your valuable time Filipe.
I need to understand about IPOPT solver options in amplpy and also want to understand IPOPT solver in a deeper level. Can you suggest any material or any other sources?

Hi @Monish_Kumar,

In this case, the infeasibility is detected by AMPL even before passing the problem to ipopt.

>>> ampl.get_value("S_pred_bath.ub2-Sfinal.lb2")
-0.00012362057577362112
>>> ampl.get_value("Sfinal.lb2")
0.013041206858591208
>>> ampl.get_value("S_pred_bath.ub2")
0.012917586282817587

You need to figure out in your model which constraints are causing the lower bound for Sfinal to be higher than the upper bound for S_pred_bath. If there is no error in the model or data, then the problem is really infeasible.

Got it. Thanks!
I need to understand about IPOPT solver options in amplpy and also want to understand IPOPT solver in a deeper level. Can you suggest any material or any other sources?

Hi @Monish_Kumar,

You can learn about IPOPT options at: Ipopt: Ipopt Options

Hi @fdabrandao,

I ran this ampl model,

#Variables:

var s_fesimg >= 0;

var s_ferro_manganeselump >= 0;

var s_ferro_siliconlump >= 0;

var s_ci_scrap >= 0;

var s_di_pipe_scrap >= 0;

var s_ms_scrap >= 0;

var s_pig_iron >= 0;

param s_heel = 1000;

var furnace_buffer = (1 * s_ci_scrap+1 * s_di_pipe_scrap+1 * s_ms_scrap+1 * s_pig_iron+1 * s_heel);

var ladle_size = furnace_buffer;

var Sfinal >= 0.007;

var Mgfinal >= 0.03;

var SInital_bath = (0.2 * s_ci_scrap + 0.01 * s_di_pipe_scrap + 0.03 * s_ms_scrap + 0.075 * s_pig_iron + 0.0244 * s_heel)/furnace_buffer;

var optimised_cost = 10 * s_fesimg + 1 * s_ferro_manganeselump + 1 * s_ferro_siliconlump + 25 * s_ci_scrap + 25 * s_di_pipe_scrap + 25 * s_ms_scrap + 25 * s_pig_iron + 1 * s_heel;

var Si_pred_bath = (1.75 * s_ci_scrap + 1.5 * s_di_pipe_scrap + 0.8 * s_ms_scrap + 0.95 * s_pig_iron + 1.69 * s_heel+(65.0 * 100.0/100) * s_ferro_siliconlump)/furnace_buffer;

var Si_pred = Si_pred_bath + ((40.0 * 100.0/100) * s_fesimg)/ladle_size;

var Si_mean_dev >= 0, <= 2.9 - 2.575;

var Mn_pred_bath = (0.75 * s_ci_scrap + 0.2 * s_di_pipe_scrap + 0.7 * s_ms_scrap + 0.5 * s_pig_iron + 0.423 * s_heel+(65.0 * 100.0/100) * s_ferro_manganeselump)/furnace_buffer;

var Mn_pred = Mn_pred_bath;

var C_pred_bath = (3.45 * s_ci_scrap + 1.9 * s_di_pipe_scrap + 0.25 * s_ms_scrap + 4.05 * s_pig_iron + 3.82 * s_heel)/furnace_buffer;

var C_pred = C_pred_bath;

var P_pred_bath = (0.15 * s_ci_scrap + 0.065 * s_di_pipe_scrap + 0.03 * s_ms_scrap + 0.15 * s_pig_iron + 0.0761 * s_heel)/furnace_buffer;

var P_pred = P_pred_bath;

Objective:

minimize z: optimised_cost + 10000 * Si_mean_dev;

#Constraints

subject to c_furnace: s_ferro_manganeselump + s_ferro_siliconlump + s_ci_scrap + s_di_pipe_scrap + s_ms_scrap + s_pig_iron + s_heel <= 1000 + 100;

subject to nod_Mgfinal: Mgfinal <= 0.06;

subject to nod_Sfinal: Sfinal <= 0.02;

subject to nod_SiSf: SInital >= Sfinal * 1.10;

subject to Si_mean_min: Si_pred+ Si_mean_dev >= 2.575;

subject to Si_mean_max: Si_pred - (Si_mean_dev) <= 2.575;

subject to Mn_max: Mn_pred <= 0.55;

subject to C_min: C_pred >= 3.45;

subject to C_max: C_pred <= 3.9;

subject to P_max: P_pred <= 0.12;

subject to nodularization : s_fesimg = ladle_size * ((Mgfinal + 0.76 * (SInital - Sfinal) + 0.001 * 2.0) / (9.0 * 50.0/100)) * (1555/1450)^2 ;

end;

It throws this warning:
Warning:
test4.mod
line 58 offset 1927
SInital is not defined
context: subject to nod_SiSf: SInital >>> >= <<< Sfinal * 1.10;

But still it showed optimal solution found,
Number of nonzeros in equality constraint Jacobian…: 0
Number of nonzeros in inequality constraint Jacobian.: 6
Number of nonzeros in Lagrangian Hessian…: 0

Total number of variables…: 8
variables with only lower bounds: 7
variables with lower and upper bounds: 1
variables with only upper bounds: 0
Total number of equality constraints…: 0
Total number of inequality constraints…: 1
inequality constraints with only lower bounds: 0
inequality constraints with lower and upper bounds: 0
inequality constraints with only upper bounds: 1

iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
0 1.0336199e+003 0.00e+000 1.00e+002 -1.0 0.00e+000 - 0.00e+000 0.00e+000 0
1 1.0176110e+003 0.00e+000 2.85e+001 -1.0 5.89e-001 - 7.15e-001 7.19e-003f 2
2 1.0327733e+003 0.00e+000 1.00e-006 -1.0 1.50e+000 - 1.00e+000 1.00e+000f 1
3 1.0151105e+003 0.00e+000 2.00e-007 -1.7 1.60e+000 - 1.00e+000 1.00e+000f 1
4 1.0002123e+003 0.00e+000 7.63e-006 -3.8 3.05e+000 - 9.74e-001 1.00e+000f 1
5 1.0000014e+003 0.00e+000 1.84e-011 -5.7 1.14e-001 - 1.00e+000 1.00e+000f 1
6 9.9999990e+002 0.00e+000 2.51e-014 -8.6 3.98e-004 - 1.00e+000 1.00e+000f 1

Number of Iterations…: 6

                               (scaled)                 (unscaled)

Objective…: 9.9999990088546600e+000 9.9999990088546599e+002
Dual infeasibility…: 2.5091040356528538e-014 2.5091040356528538e-012
Constraint violation…: 0.0000000000000000e+000 0.0000000000000000e+000
Complementarity…: 2.5092953352145458e-009 2.5092953352145459e-007
Overall NLP error…: 2.5092953352145458e-009 2.5092953352145459e-007

Number of objective function evaluations = 12
Number of objective gradient evaluations = 7
Number of equality constraint evaluations = 0
Number of inequality constraint evaluations = 12
Number of equality constraint Jacobian evaluations = 0
Number of inequality constraint Jacobian evaluations = 7
Number of Lagrangian Hessian evaluations = 6
Total CPU secs in IPOPT (w/o function evaluations) = 0.004
Total CPU secs in NLP function evaluations = 0.000

EXIT: Optimal Solution Found.

Ipopt 3.11.1: Optimal Solution Found

Can you let me know, how to catch this warning in python and why it is not showing error?

Hi @Monish_Kumar,

The default error handler only raises exceptions on errors, but you can change the error handler to raise exceptions on warnings as follows:

from amplpy import AMPL
import amplpy


class MyErrorHandler(amplpy.ErrorHandler):
    def warning(self, exception):
        raise exception


ampl = AMPL()
ampl.set_error_handler(MyErrorHandler())  # change the error handler 
ampl.read("test4.mod")

Thanks @fdabrandao!

I am running the following AMPL string in 2 different formats just changing and rearranging variables. First one gets feasible but the next one gets infeasible. I am not able to find a reason. Can you help me with that.

#Variables:
var s_crc_scrap >= 0;
var s_ms_scrap >= 0;
var s_ci_lumps >= 0;
var s_pig_iron_steel_grade >= 0;
var s_di_pipe_cutting >= 0;
var s_foundry_returns_di >= 0;
var s_graphite_granuals >= 0;
var s_fesi_lumps >= 0;
var s_femn >= 0;
var s_fesi_mg >= 0;
var s_inno_16_mm >= 0.0000;
var s_reseed_inoculant___size_0307_mm >= 4.5000;
param s_heel = 1200.0000;
var Sfinal >= 0.02;
var Mgfinal >= 0.04;
var optimised_cost = 44.25 * s_crc_scrap + 42.75 * s_ms_scrap + 43.00 * s_ci_lumps + 43.66 * s_pig_iron_steel_grade + 42.60 * s_di_pipe_cutting + 41.40 * s_foundry_returns_di + 48.00 * s_graphite_granuals + 117.00 * s_fesi_lumps + 74.00 * s_femn + 220.00 * s_fesi_mg + 193.00 * s_inno_16_mm + 193.00 * s_reseed_inoculant___size_0307_mm + 1 * s_heel;
var furnace_buffer = (1.000 * s_crc_scrap+1.000 * s_ms_scrap+1.000 * s_ci_lumps+1.000 * s_pig_iron_steel_grade+1.000 * s_di_pipe_cutting+1.000 * s_foundry_returns_di+1 * s_heel);
var C_pred = (0.100 * s_crc_scrap + 0.120 * s_ms_scrap + 2.917 * s_ci_lumps + 4.191 * s_pig_iron_steel_grade + 3.200 * s_di_pipe_cutting + 3.900 * s_foundry_returns_di + 3.9225 * 0.99 * s_heel+(90.000 * 90.000/100) * s_graphite_granuals)/furnace_buffer;
var Si_pred = (0.100 * s_crc_scrap + 0.200 * s_ms_scrap + 4.548 * s_ci_lumps + 0.736 * s_pig_iron_steel_grade + 2.100 * s_di_pipe_cutting + 2.500 * s_foundry_returns_di + 1.6163 * s_heel+(65.000 * 90.000/100) * s_fesi_lumps+(40.000 * 100.000/100) * s_fesi_mg + (65.000 * 100.000/100) * s_inno_16_mm + (65.000 * 100.000/100) * s_reseed_inoculant___size_0307_mm)/furnace_buffer;
var Si_mean_dev >= 0, <= 2.80000 - 2.650;
var Mn_pred = (0.240 * s_crc_scrap + 0.300 * s_ms_scrap + 0.333 * s_ci_lumps + 0.270 * s_pig_iron_steel_grade + 0.500 * s_di_pipe_cutting + 0.500 * s_foundry_returns_di + 0.4921 * s_heel+(55.000 * 100.000/100) * s_femn)/furnace_buffer;
var Mn_mean_dev >= 0, <= 0.60000 - 0.550;
var P_pred = (0.029 * s_crc_scrap + 0.032 * s_ms_scrap + 0.211 * s_ci_lumps + 0.122 * s_pig_iron_steel_grade + 0.070 * s_di_pipe_cutting + 0.078 * s_foundry_returns_di + 0.0914 * s_heel)/furnace_buffer;
var P_mean_dev >= 0, <= 0.09 - 0.08000;
# Objective:
minimize z: optimised_cost + 10000 * Si_mean_dev + 10000 * Mn_mean_dev + 10000 * P_mean_dev;
#Constraints
subject to c_furnace: s_crc_scrap + s_ms_scrap + s_ci_lumps + s_pig_iron_steel_grade + s_di_pipe_cutting + s_foundry_returns_di + s_graphite_granuals + s_fesi_lumps + s_femn + s_heel <= 1200 + 120.0;
subject to max_s_inno_16_mm: s_inno_16_mm <= 0.0000;
subject to max_s_reseed_inoculant___size_0307_mm: s_reseed_inoculant___size_0307_mm <= 4.5000;
subject to nod_Mgfinal: Mgfinal <= 0.05;
subject to nod_Sfinal: Sfinal <= 0.035;
subject to nod_SiSf: ((0.025 * s_crc_scrap + 0.040 * s_ms_scrap + 0.070 * s_ci_lumps + 0.037 * s_pig_iron_steel_grade + 0.020 * s_di_pipe_cutting + 0.019 * s_foundry_returns_di + 0.0183 * s_heel)/1200.0000) >= Sfinal * 1.10;
subject to C_min: C_pred >= 3.90000;
subject to C_max: C_pred <= 4.10000;
subject to Si_mean_min: Si_pred+ Si_mean_dev >= 2.650;
subject to Si_mean_max: Si_pred - (Si_mean_dev) <= 2.650;
subject to Mn_mean_min: Mn_pred+ Mn_mean_dev >= 0.550;
subject to Mn_mean_max: Mn_pred - (Mn_mean_dev) <= 0.550;
subject to P_mean_min: P_pred >= 0.08000;
subject to P_mean_max: P_pred - (P_mean_dev) <= 0.08000;
subject to nodularization : s_fesi_mg = 1200.0000 * ((Mgfinal + 0.76 * (((0.025 * s_crc_scrap + 0.040 * s_ms_scrap + 0.070 * s_ci_lumps + 0.037 * s_pig_iron_steel_grade + 0.020 * s_di_pipe_cutting + 0.019 * s_foundry_returns_di + 0.0183 * s_heel)/1200.0000) - Sfinal) + 0.001 * 1.00) / (6.000 * 60.000/100)) * (1550/1450)^2 ;
end;

This is feasible.

#Variables:
var s_crc_scrap >= 0;
var s_ms_scrap >= 0;
var s_ci_lumps >= 0;
var s_pig_iron_steel_grade >= 0;
var s_di_pipe_cutting >= 0;
var s_foundry_returns_di >= 0;
var s_graphite_granuals >= 0;
var s_fesi_lumps >= 0;
var s_femn >= 0;
var s_fesi_mg >= 0;
var s_inno_16_mm >= 0.0000;
var s_reseed_inoculant___size_0307_mm >= 4.5000;
param s_heel = 1200.0000;
var furnace_buffer = (1.000 * s_crc_scrap + 1.000 * s_ms_scrap + 1.000 * s_ci_lumps + 1.000 * s_pig_iron_steel_grade + 1.000 * s_di_pipe_cutting + 1.000 * s_foundry_returns_di + 1 * s_heel);
var ladle_size = 1200;
var Sfinal >= 0.02;
var Mgfinal >= 0.04;
var SInitial_bath = (0.025 * s_crc_scrap + 0.040 * s_ms_scrap + 0.070 * s_ci_lumps + 0.037 * s_pig_iron_steel_grade + 0.020 * s_di_pipe_cutting + 0.019 * s_foundry_returns_di + 0.0183 * s_heel)/furnace_buffer;
var SInitial = SInitial_bath;
var optimised_cost = 44.25 * s_crc_scrap + 42.75 * s_ms_scrap + 43.00 * s_ci_lumps + 43.66 * s_pig_iron_steel_grade + 42.60 * s_di_pipe_cutting + 41.40 * s_foundry_returns_di + 48.00 * s_graphite_granuals + 117.00 * s_fesi_lumps + 74.00 * s_femn + 220.00 * s_fesi_mg + 193.00 * s_inno_16_mm + 193.00 * s_reseed_inoculant___size_0307_mm + 1 * s_heel;
var C_pred_bath = (0.100 * s_crc_scrap + 0.120 * s_ms_scrap + 2.917 * s_ci_lumps + 4.191 * s_pig_iron_steel_grade + 3.200 * s_di_pipe_cutting + 3.900 * s_foundry_returns_di + 3.9225 * s_heel+(90.000 * 90.000/100) * s_graphite_granuals)/furnace_buffer;
var C_pred = C_pred_bath;
var Si_pred_bath = (0.100 * s_crc_scrap + 0.200 * s_ms_scrap + 4.548 * s_ci_lumps + 0.736 * s_pig_iron_steel_grade + 2.100 * s_di_pipe_cutting + 2.500 * s_foundry_returns_di + 1.6163 * s_heel+(65.000 * 90.000/100) * s_fesi_lumps)/furnace_buffer;
var Si_pred = Si_pred_bath + ((40.000 * 100.000/100) * s_fesi_mg + (65.000 * 100.000/100) * s_inno_16_mm + (65.000 * 100.000/100) * s_reseed_inoculant___size_0307_mm)/ladle_size;
var Si_mean_dev >= 0, <= 2.80000 - 2.650;
var Mn_pred_bath = (0.240 * s_crc_scrap + 0.300 * s_ms_scrap + 0.333 * s_ci_lumps + 0.270 * s_pig_iron_steel_grade + 0.500 * s_di_pipe_cutting + 0.500 * s_foundry_returns_di + 0.4921 * s_heel+(55.000 * 100.000/100) * s_femn)/furnace_buffer;
var Mn_pred = Mn_pred_bath;
var Mn_mean_dev >= 0, <= 0.60000 - 0.550;
var P_pred_bath = (0.029 * s_crc_scrap + 0.032 * s_ms_scrap + 0.211 * s_ci_lumps + 0.122 * s_pig_iron_steel_grade + 0.070 * s_di_pipe_cutting + 0.078 * s_foundry_returns_di + 0.0914 * s_heel)/furnace_buffer;
var P_pred = P_pred_bath;
var P_mean_dev >= 0, <= 0.09 - 0.08000;
# Objective:
minimize z: optimised_cost + 10000 * Si_mean_dev + 10000 * Mn_mean_dev + 10000 * P_mean_dev;
#Constraints
subject to c_furnace: s_crc_scrap + s_ms_scrap + s_ci_lumps + s_pig_iron_steel_grade + s_di_pipe_cutting + s_foundry_returns_di + s_graphite_granuals + s_fesi_lumps + s_femn + s_heel <= 1200 + 120.0;
subject to max_s_inno_16_mm: s_inno_16_mm <= 0.0000;
subject to max_s_reseed_inoculant___size_0307_mm: s_reseed_inoculant___size_0307_mm <= 4.5000;
subject to nod_Mgfinal: Mgfinal <= 0.05;
subject to nod_Sfinal: Sfinal <= 0.035;
subject to nod_SiSf: SInitial >= Sfinal * 1.10;
subject to C_min: C_pred >= 3.90000;
subject to C_max: C_pred <= 4.10000;
subject to Si_mean_min: Si_pred + Si_mean_dev >= 2.650;
subject to Si_mean_max: Si_pred - (Si_mean_dev) <= 2.650;
subject to Mn_mean_min: Mn_pred + Mn_mean_dev >= 0.550;
subject to Mn_mean_max: Mn_pred - (Mn_mean_dev) <= 0.550;
subject to P_mean_min: P_pred >= 0.08000;
subject to P_mean_max: P_pred - (P_mean_dev) <= 0.08000;
subject to nodularization : s_fesi_mg = ladle_size * ((Mgfinal + 0.76 * (SInitial - Sfinal) + 0.001 * 1.00) / (6.000 * 60.000/100)) * (1550/1450)^2 ;
end;

This is infeasible code.

Thanks in advance.