Skip to content

Instantly share code, notes, and snippets.

Private oListener as Object
Private CellRng as Object
Sub AddListener
Dim Doc, Sheet as Object
Doc = ThisComponent
Sheet = Doc.Sheets(0)
CellRng = Sheet.getCellRangeByName("C1:C6")
#include <acado_toolkit.hpp>
#include <include/acado_gnuplot/gnuplot_window.hpp>
int main( ){
// planet parameters
double RBody = 600000.0; // meters
double MuBody = 3.5316e12; // gravitational parameter, m^3/s^2
double RotPeriod = 21600.0; // sidereal rotation period, seconds
double AtmSLPressure = 1.0; // sea-level pressure, atm
#!/bin/sh
# Build a Windows dll of Bonmin MINLP solver in MinGW
# (https://projects.coin-or.org/svn/Bonmin/trunk/)
# run this script from the top-level Bonmin directory
# stop on error
set -e
# first go through the configure of each subfolder and replace
@tavert
tavert / datenum2unixmillis.m
Created October 15, 2013 13:48
Helper functions for converting between Matlab datenum and Unix milliseconds
function out = datenum2unixmillis(in)
% convert Matlab datenum to unix milliseconds
% Matlab datenums are assumed to be in local time zone, unix ms are in UTC
[year, month, day, hour, minute, second] = datevec(in);
% java.util.GregorianCalendar constructor uses zero-based months and
% rounds seconds down to an integer, so handle seconds separately
time1 = java.util.GregorianCalendar(year(1), month(1)-1, ...
day(1), hour(1), minute(1), 0);
ms1 = time1.getTimeInMillis;
@tavert
tavert / OSinstance.m
Last active December 25, 2015 01:59
Prototype nonlinear Matlab interface to generate OSiL-format optimization problem instances. Currently only handles scalar variables and can only determine linear coefficients for simple constraints, but appears to work at least for small problems. Based on simple operator overloading and fairly thin wrappers around the OSiL XML content. Problem…
% Matlab class for Optimization Services instance
classdef OSinstance < handle
properties
document
instanceHeader
instanceData
end
methods
function instance = OSinstance
% default constructor