Question: Hello everyone, when I execute this code in minizinc, it not working, please support me to correct it: % Parameters int: n _ employee; %
Hello everyone, when I execute this code in minizinc, it not working, please support me to correct it: Parameters
int: nemployee; number of technicians
int: nturbine; number of wind turbines
int: ntasks; number of tasks
int: nweek; number of weeks
int: nday; number of days per week
int: nperiod nday ; number of periods per day
Productivity of each wind turbine during each period
arraynturbine, nperiod of float: productivity;
Wind turbine assigned to each task
arrayntasks of int: onturbine;
Duration of each task in periods
arrayntasks of int: length;
Skills of technicians
int: nskills; Number of available skills
arraynemployee, nskills of int: skills;
Skills required to perform each task
arrayntasks of int: skillreq;
Decision Variables
arrayntasks, nperiod of var : exec; Task execution
arrayntasks, nperiod of var : start; Task start
arrayntasks, nperiod of var : end; Task end
Constraints
Each task must start exactly once
constraint
foralli in ntasks
sump in nperiodstarti p
;
Each task must finish exactly once
constraint
foralli in ntasks
sump in nperiodendi p
;
Each task must last for its specified duration across consecutive periods
constraint
foralli in ntasks
sump in nperiodexeci p lengthi
;
No overlapping tasks on the same turbine during a single period
constraint
forallt in nturbine, p in nperiod
sumi in ntasks where onturbinei texeci p
;
execi pendi p
;
Initialization of the first period
constraint
foralli in ntasks
execi starti
;
Objective function: Maximize the total energy production
var float: totalenergy sumi in ntasks, p in nperiod
execi p productivityonturbinei p
;
solve maximize totalenergy;
here is the data value: 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,;
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
