Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PLUM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Land Use Lab
PLUM
Commits
d0b747f6
Commit
d0b747f6
authored
9 years ago
by
Peter Alexander
Browse files
Options
Downloads
Patches
Plain Diff
Fix meat production constraint
parent
302892a8
Loading
Loading
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GAMS/IntExtOpt.gms
+5
-3
5 additions, 3 deletions
GAMS/IntExtOpt.gms
with
5 additions
and
3 deletions
GAMS/IntExtOpt.gms
+
5
−
3
View file @
d0b747f6
...
...
@@ -100,6 +100,7 @@ $gdxin
MAX_NET_IMPORT_CONSTRAINT(import_crop) constraint on max net imports
MIN_NET_IMPORT_CONSTRAINT(import_crop) constraint on min net imports
PASTURE_IMPORT_CONSTRAINT constraint to not import pasture
PASTURE_EXPORT_CONSTRAINT
MIN_FEED_CONSTRAINT constraint on min feed rate
IRRIGATION_CONSTRAINT(location) constraint no water usage
NET_SUPPLY_EQ(crop) calc net supply for crops
...
...
@@ -138,7 +139,7 @@ $gdxin
TOTAL_CEREAL_DEMAND_CONSTRAINT .. sum(cereal_crop, net_supply(cereal_crop)) =G= demand('cereals');
MEAT_DEMAND_CONSTRAINT .. meatEfficency*sum(feed_crop, feedDM(feed_crop) * feedAmount(feed_crop)) =G= demand('meat') - importAmount('meat')
-
exportAmount('meat');
MEAT_DEMAND_CONSTRAINT .. meatEfficency*sum(feed_crop, feedDM(feed_crop) * feedAmount(feed_crop)) =G= demand('meat') - importAmount('meat')
+
exportAmount('meat');
MAX_FERT_INTENSITY_CONSTRAINT(crop, location) .. fertI(crop, location) =L= 1;
MAX_IRRIG_INTENSITY_CONSTRAINT(crop, location) .. irrigI(crop, location) =L= 1;
...
...
@@ -150,7 +151,8 @@ $gdxin
MAX_NET_IMPORT_CONSTRAINT(import_crop) .. importAmount(import_crop) - exportAmount(import_crop) =L= maxNetImport(import_crop);
MIN_NET_IMPORT_CONSTRAINT(import_crop) .. importAmount(import_crop) - exportAmount(import_crop) =G= minNetImport(import_crop);
PASTURE_IMPORT_CONSTRAINT .. importAmount('pasture') - exportAmount('pasture') =E= 0;
PASTURE_IMPORT_CONSTRAINT .. importAmount('pasture') =E= 0;
PASTURE_EXPORT_CONSTRAINT .. exportAmount('pasture') =E= 0;
MIN_FEED_CONSTRAINT .. sum(feed_crop_less_pasture, feedDM(feed_crop_less_pasture) * feedAmount(feed_crop_less_pasture)) =G= minFeedRate * (demand('meat') - importAmount('meat') + exportAmount('meat'));
...
...
@@ -190,7 +192,7 @@ $gdxin
SOLVE LAND_USE USING NLP MINIMIZING energy;
*
display agriLandExpansion.l, previousArea, area.l, net_supply.l, demand, feedAmount.l, yield.l,
netIm
portAmount.l;
display agriLandExpansion.l, previousArea, area.l, net_supply.l, demand, feedAmount.l, yield.l,
importAmount.l, ex
portAmount.l;
area.l(crop_less_pasture, location) = area.l(crop_less_pasture, location) / (1.0 - unhandledCropArea);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment