("ISCC"),  set  in  2010,  take  advantage  of  the 
Maghreb-Europe  (GME)  gas  pipeline  arrangement 
between Morocco and Algeria. 
This  agreement  will  expire  towards  the  end  of 
2021. At the time of submitting this paper, there has 
been no announcement regarding the renewal of this 
agreement.  Given  this  situation,  Morocco  may 
continue the development of the Gas to Power field 
through  several  options.  These  include  mainly:            
1) Renewal of the GME contract or negotiation of a 
new contract but this time with Spain to import gas 
from Spain through the same pipeline; 2) Making use 
of recently discovered deposits in the Tendrara region 
and seeking new deposits; or, 3) Importing Liquefied 
Natural Gas (LNG). 
This paper intends to evaluate the optimal choice 
for  natural  gas  development  in  Morocco  under  the 
guidelines of the National Energy Strategy The focus 
will be on assessing whether the choice of importing 
LNG or purchasing natural gas directly from Algeria 
or Spain through the GME is optimal. To do so, we 
will describe, in section 2, the optimization tool used 
as  well  as  the  approach  followed  to  integrate  the 
renewed installed capacity objectives in its equation 
system.  In  the  3
rd
  section,  we  introduce  our  case 
study:  the  Moroccan  electrical  system  and  its 
characteristics.  We  also  present  the  scope  of  our 
research. Finally,  in the  4
th
 section, we will  discuss 
the  results  of  our  study  and  explain  the  upcoming 
research work. 
2  MATERIALS AND METHODS 
2.1  Tool: Open-Source Energy 
Modelling System  
Optimizing power systems in developing countries to 
meet demand with available supply technologies and 
resources  can  be  solved  by  bottom-up  modelling 
techniques.  The  Open-Source  Energy  Modelling 
System  (OSeMOSYS)  is  one  of  the  bottom-up, 
dynamic,  and linear optimization  models  applied  to 
integrated  assessment  and  energy  planning 
(Dhakouani,  2019).  It  aims  to  satisfy  demand  by 
accounting  for  technical,  economic,  and 
environmental parameters while optimizing the total 
discounted  cost (Howells, 2011). The developers  of 
this model designed it around a series of "blocks" of 
functionality. These functionalities are related to the 
following  aspects:  costs,  capacity  adequacy,  energy 
balance, renewable energies, emissions, and 
provisions. The parameters introduced by the analyst, 
the intermediate variables, and the equations and the 
constraints are what characterize each block (Howells 
et al., 2011). 
Initially, the code for OSeMOSYS was written in 
GNU MathProg, and recently, it has been translated 
into  GAMS  (General  algebraic  modelling  system) 
and  Python.  Our  study  uses  the  GAMS  version  of 
OSeMOSYS.  OSeMOSYS  allows  the  modeller  to 
introduce  a  constraint  of  integration  of  RES  in  the 
energy system through equation (1).  
 
"r" and "y" represent the data sets for the region 
and  the  modelling  year,  respectively.  The 
REMinProductionTarget(r,y)  parameter  is  the 
minimum renewable production target desired by the 
analyst.  Also,  the  variable 
RETotalProductionOfTargetFuelAnnual(r,y) 
stands  for 
the  Annual  Production  of  the  fuels  marked  as 
renewable  in  the  model,  and  the  variable 
TotalREProductionAnnual(r,y)
 denotes the annual 
production  of all technologies marked as  renewable 
in  the  model.  However,  using  this  equation  for  the 
case  of the  Moroccan energy  strategy  is not  viable. 
The objectives of  the Moroccan energy strategy are 
expressed as renewable installed capacity and not as 
annual renewable energy production. A modification 
of the code is necessary before proceeding with the 
modelling. 
2.2  Implementation of the Renewable 
Installed Capacity Constraint in 
OSeMOSYS 
In this section, we explain the formulas for modelling 
the installed capacity constraints of renewable energy 
sources.  To  impose  a  constraint  on  renewable 
generation, we used the same method as that used by 
(Howells  et  al.,  2011).  Thus,  we  initially  converted 
equation (1) to equation (2). 
 
Equation (2) is composed of 3 terms. The first one 
is the variable TotalRECapacityAnnual,  which  is  a 
new  variable  introduced  to  the  system.  It  allows 
identifying  the  total  annual  renewable  capacity. 
Equation (3) determines the computing method of this 
variable.  
(2)
(1)