Question: this is the data value and the objective function must be 6 8 : % This first case is a very simple test on 2
this is the data value and the objective function must be : This first case is a very simple test on days and wind turbines
You can solve it by hand to be sure of your result and modify the data for testing purposes
nemployee ;
nturbine ;
ntasks ;
nweek ;
nday ;
nperiod nday; periods per day
productivity of an wind turbine at each period
productivity arraydnturbine,nperiod,
;
duration and location of each task
onturbine arraydntasks,;
length arraydntasks,;
here is the minizinc code: include "globals.mzn;
Parameters
int: ntasks; Number of tasks
int: nturbine; Number of turbines
int: nemployee; Number of employees
int: nperiod; Number of time periods
int: nweek; Number of weeks
int: nday; Number of days
Input Data
arraynturbine, nperiod of int: productivity; Productivity of each turbine per period
arrayntasks of int: onturbine; Turbine assigned to each task
Decision Variables
arrayntasks of var nperiod: starttime; Start time of each task
arrayntasks of var nperiod: endtime; End time of each task
arrayntasks of var nperiod: length; Duration of each task
arraynturbine of var int: lossturbine; Productivity loss for each turbine
Derived Variables
arraynturbine of var int: totalproductivity
sump in nperiodproductivityt p t in nturbine
;
Constraints
No two tasks on the same turbine can overlap
constraint forallt in nturbine
cumulative
starttimei i in ntasks where onturbinei t
lengthi i in ntasks where onturbinei t
i in ntasks where onturbinei t
;
Duration calculation
constraint foralli in ntasks
lengthi endtimei starttimei
;
Each employee handles only one task at a time
constraint cumulativestarttime, length, in ntasks nemployee;
Calculation of productivity losses for each turbine
constraint forallt in nturbine
lossturbinet sump in nperiod
sumi in ntasks where onturbinei t
boolintstarttimei p p endtimei productivityt p
;
Objective Function
var int: actualproductivity sumt in nturbine
totalproductivityt lossturbinet
;
solve maximize actualproductivity;
please correct the code for me in order to get as objective function value.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
