Class FieldDevelopmentRunner

java.lang.Object
neqsim.mcp.runners.FieldDevelopmentRunner

public class FieldDevelopmentRunner extends Object
Stateless field development economics runner for MCP integration.

Supports cash flow analysis with multiple fiscal regimes (Norwegian NCS, UK, Brazil, US-GOM), production profile generation with exponential/hyperbolic/harmonic decline, and breakeven analysis.

Version:
1.0
Author:
Even Solbraa
  • Field Details

    • GSON

      private static final com.google.gson.Gson GSON
  • Constructor Details

    • FieldDevelopmentRunner

      private FieldDevelopmentRunner()
      Private constructor — all methods are static.
  • Method Details

    • run

      public static String run(String json)
      Runs a field development economics calculation from a JSON input.

      Supports two modes:

      • "cashflow" — full NPV/IRR/payback analysis with annual cash flow breakdown
      • "productionProfile" — generate decline curve production profiles
      Parameters:
      json - the JSON field development specification
      Returns:
      a JSON string with the economics results
    • runCashFlow

      private static String runCashFlow(com.google.gson.JsonObject input)
      Runs a full cash flow analysis.
      Parameters:
      input - the JSON input object
      Returns:
      the cash flow results as JSON
    • runProductionProfile

      private static String runProductionProfile(com.google.gson.JsonObject input)
      Generates a production profile using decline curve analysis.
      Parameters:
      input - the JSON input object
      Returns:
      the production profile as JSON
    • parseYearProfile

      private static Map<Integer,Double> parseYearProfile(com.google.gson.JsonObject obj)
      Parses a JSON object of year:value pairs into a Map.
      Parameters:
      obj - the JSON object
      Returns:
      the year-to-value map
    • errorJson

      private static String errorJson(String code, String message, String remediation)
      Creates a standard error JSON string.
      Parameters:
      code - the error code
      message - the error message
      remediation - the fix suggestion
      Returns:
      the error JSON string