Coder Social home page Coder Social logo

fediskhakov / egdst Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 12.0 307 KB

Generic and simple to use Matlab code for solving finite horizon discrete time optimal control problems with one continuous and one discrete control.

License: GNU General Public License v2.0

MATLAB 59.51% C 40.49%

egdst's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

egdst's Issues

intertemporal budget constraint and discrete (labor) decisions

Hi Fedor,

I have a problem regarding the timing in the budget constraint. I want to set up a model of stochastic labor income, where the individual can decide on the amount of labor supply AFTER learning the realization of the wage shock. As I understand the code and your paper, money@hand next period depends on savings this period and the discrete decision THIS period.

Can I set up the budget constraint or discrete decision in a way, that the individual decides on optimal labor supply tomorrow given the shock tomorrow?

Thanks a lot.

compilation error C2099

Hello

after attending ZICE2014, I tried using your EGDST implementation. I cannot execute a single example file, though. Since I am illiterate in C, I need some help...

I am using Matlab 2013b and MS SDK 7.1. as a compiler, which seems to work. After running init_setup/test.m I get the following:

Test mex function was successfully created!
Number of inputs: 0
Number of outputs: 0
Compiled on Feb 26 2014 17:22:47
^^^^^^ check for OpenMP message
Mex is configured properly!

Once running any example file out of egdst_examples via start.m, I receive the following compilation error:

Warning: File not found or permission denied
In model_cake1 at 5
Deleting directory tmp_cake1_fee87a84505f4fd4a8c745d5601f9eea
Writing .c and .h files:
Creating directory tmp_cake1_06bec6855538400e9cfddf61837ce6d9
Done in 0.050s
Utility contains brackes with +/- inside. For the analysis of additive separability the original expression it was transformed to:
log[consumption]
Compiler flags: -DDISTRIB=2 -DTOLERANCE=1e-10 -DZEROCONSUMPTION=1e-10 -DDOUBLEPOINT_DELTA=1e-10 -DVERBOSE=0
Compiling egdst_solver.cmodelspec.c
modelspec.c(12) : error C2099: initializer is not a constant
modelspec.c(16) : error C2099: initializer is not a constant
modelspec.c(20) : error C2099: initializer is not a constant
modelspec.c(25) : error C2099: initializer is not a constant
modelspec.c(29) : error C2099: initializer is not a constant
modelspec.c(39) : error C2099: initializer is not a constant
modelspec.c(43) : error C2099: initializer is not a constant
modelspec.c(47) : error C2099: initializer is not a constant
modelspec.c(48) : error C2099: initializer is not a constant
modelspec.c(52) : error C2099: initializer is not a constant
modelspec.c(53) : error C2099: initializer is not a constant
modelspec.c(58) : error C2099: initializer is not a constant

C:\PROGRA~1\MATLAB\R2013B\BIN\MEX.PL: Error: Compile of 'modelspec.c' failed.

Looking into the created c-file, every line that creates an error assigns some static double to -infinity which creates C2099. One example line looks like:

static double cash=-INFINITY; /for compatability with eq type=current/

Is there a problem with my compiler? I'd be grateful for any help!
Thanks a lot
Florian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.