Skip to content

Instantly share code, notes, and snippets.

@trialsolution
trialsolution / ev.gms
Created October 31, 2012 11:59
EV frontier analysis for a simple farm management problem
$ontext
PROBLEM STATMENT
EV analysis from Hazell-Norton
AIM: draw the EV-frontier for the following farm planning problem
MODEL 1. EXPECTED PROFIT MAXIMIZATION (farm with fixed land, 4 crops, fixed labour and a rotational constraint)
@trialsolution
trialsolution / polar_rose.R
Created January 1, 2011 16:55
drawing "polar roses" curves in polar coordinate system
require(ggplot2)
#data points
p <- data.frame(t=seq(-2*pi, 2*pi, 0.1))
#1.. drawing polar rose
c <- ggplot(p, aes(x=t, y=cos(3*t)))
c + geom_line() + coord_polar()
#2.. another one with sine