File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 168168right_c2 = opt_mod .sum (((limitante [elementos .index ('PB' )]/ 100 )* demanda - ((limitanteMaxInf [elementos .index ('PB' )]/ 100 )* (limitante [elementos .index ('PB' )]/ 100 )* demanda )) for i in range (len (ingredientes )))
169169opt_mod .add_constraint (left_c2 >= right_c2 , ctname = 'c2' )
170170
171+ left_c3 = opt_mod .sum ((valores [i ][elementos .index ('PB' )]/ 100 )* q [i ] for i in range (len (ingredientes )))
172+ right_c3 = opt_mod .sum (((limitante [elementos .index ('PB' )]/ 100 )* demanda + ((limitanteMaxSup [elementos .index ('PB' )]/ 100 )* (limitante [elementos .index ('PB' )]/ 100 )* demanda )) for i in range (len (ingredientes )))
173+ opt_mod .add_constraint (left_c3 >= right_c3 , ctname = 'c3' )
174+
175+ left_c4 = opt_mod .sum ((valores [i ][elementos .index ('NDT' )]/ 100 )* q [i ] for i in range (len (ingredientes )))
176+ right_c4 = opt_mod .sum (((limitante [elementos .index ('NDT' )]/ 100 )* demanda - ((limitanteMaxInf [elementos .index ('NDT' )]/ 100 )* (limitante [elementos .index ('NDT' )]/ 100 )* demanda )) for i in range (len (ingredientes )))
177+ opt_mod .add_constraint (left_c4 >= right_c4 , ctname = 'c4' )
178+
179+ left_c5 = opt_mod .sum ((valores [i ][elementos .index ('NDT' )]/ 100 )* q [i ] for i in range (len (ingredientes )))
180+ right_c5 = opt_mod .sum (((limitante [elementos .index ('NDT' )]/ 100 )* demanda + ((limitanteMaxSup [elementos .index ('NDT' )]/ 100 )* (limitante [elementos .index ('NDT' )]/ 100 )* demanda )) for i in range (len (ingredientes )))
181+ opt_mod .add_constraint (left_c5 >= right_c5 , ctname = 'c5' )
182+
171183
172184#Define a funcao objetivo
173185opt_mod .set_objective ('min' , obj )
You can’t perform that action at this time.
0 commit comments