Class FarmFinance

java.lang.Object
net.simplace.sim.model.FWSimComponent
net.simplace.sim.components.experimental.FarmFinance
All Implemented Interfaces:
net.simplace.sim.util.FWSimFieldContainer

public class FarmFinance extends net.simplace.sim.model.FWSimComponent
Author:
Andreas Enders, info@andreas-enders.de Money management like sell out and purchase - rules to limit money

Component Variables

Content TypeNameDescriptionData TypeUnitMin ValueMax ValueDefault Value
constantcAnimalPrice1price per g animal weightDOUBLEcurrency / g0.02000.0126.0
constantcAnimalPrice2price per g animal weightDOUBLEcurrency / g0.02000.0126.0
constantcAnimalPrice3price per g animal weightDOUBLEcurrency / g0.02000.0126.0
constantcConcentratePriceConversion from J to currencyDOUBLEcurrency / J0.0100.055.65
constantcDailyExpensesdaily expensesDOUBLEcurrency0.0500000.00.0
constantcInitialCashinitialState of the cashpointDOUBLEcurrency0.0500000.00.0
inputiAnimalSellout1Sold Animal per Day Juvenile FemaleDOUBLEanimal0.0100000.00.0
inputiAnimalSellout2Sold Animal per Day SubAdult FemaleDOUBLEanimal0.0100000.00.0
inputiAnimalSellout3Sold Animal per Day Adult FemaleDOUBLEanimal0.0100000.00.0
inputiConcentratePurchasePurchase concentrate amountDOUBLEJ0.0100000.00.0
inputiConcentrateSellOutEarnings of concentrate sell outDOUBLEJ0.01000.00.0
inputiDoInitializeSwitch to re-initialize the model with initial values.BOOLEAN1--false
inputiIrregularAnimalSellout1Earnings of irregular animal sell outDOUBLEcurrency0.0100000.00.0
inputiIrregularAnimalSellout2Earnings of irregular animal sell outDOUBLEcurrency0.0100000.00.0
inputiIrregularAnimalSellout3Earnings of irregular animal sell outDOUBLEcurrency0.0100000.00.0
statesCashEnteric Fermentation Emission from a livestock categoryDOUBLEcurrency0.05.0E70.0
raterCashchange of cash point todayDOUBLEcurrency0.0500000.00.0
outConcentrateCostCost of concentrate purchaseDOUBLEcurrency0.0500000.00.0
outEarningsConcentrateSaleEarnings of concentrate sell outDOUBLEcurrency-500000.0500000.00.0
outEarningsIrregularAnimalSelloutEarnings of irregular animal sell outDOUBLEcurrency0.0100000.00.0
outEarningsRegularAnimalSelloutEarnings of regular animal sell outDOUBLEcurrency0.0100000.00.0
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.simplace.sim.model.FWSimComponent

    net.simplace.sim.model.FWSimComponent.TEST_STATE
  • Field Summary

    Fields inherited from class net.simplace.sim.model.FWSimComponent

    iFieldMap, iFrequence, iInputMap, iJexlRule, iMasterComponentGroup, iName, iOrderNumber, isComponentGroup, iSimComponentElement, iSimModel, iVarMap
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty constructor used by class.forName()
  • Method Summary

    Modifier and Type
    Method
    Description
    protected net.simplace.sim.model.FWSimComponent
    clone(net.simplace.sim.util.FWSimVarMap aVarMap)
     
    HashMap<String,net.simplace.sim.util.FWSimVariable<?>>
    Create the FWSimVariables as interface for this SimComponent
    HashMap<String,net.simplace.sim.util.FWSimVariable<?>>
    fillTestVariables(int aParamIndex, net.simplace.sim.model.FWSimComponent.TEST_STATE aDefineOrCheck)
    called for single component test to check the components algorithm.
    protected void
    Initializes the fields by getting input and output FWSimVariables from VarMap
    protected void
    Process the algorithm and write the results back to VarMap

    Methods inherited from class net.simplace.sim.model.FWSimComponent

    addVariable, bind, checkCondition, createSimComponent, createSimComponent, createSimComponent, createSimComponent, doProcess, getConstantVariables, getContentType, getCreateFormXML, getDescription, getEditFormXML, getFieldMap, getFrequence, getFrequenceRuleScript, getInputs, getInputVariables, getMasterComponentGroup, getName, getOrderNumber, getOutputVariables, getVariable, getVariableField, getVarMap, initialize, isConditionCheck, isVariableAvailable, performLinks, performLinks, readInputs, removeVariable, reset, runComponentTest, setVariablesDefault, toComponentLinkingXML, toDocXML, toGroupXML, toOutputDefinitionXML, toResourcesDataXML, toResourcesDefinitionXML, toString, toXML, writeVarInfos

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • FarmFinance

      public FarmFinance()
      Empty constructor used by class.forName()
  • Method Details

    • createVariables

      public HashMap<String,net.simplace.sim.util.FWSimVariable<?>> createVariables()
      Create the FWSimVariables as interface for this SimComponent
      Specified by:
      createVariables in interface net.simplace.sim.util.FWSimFieldContainer
      Specified by:
      createVariables in class net.simplace.sim.model.FWSimComponent
      See Also:
      • net.simplace.simulation.model.FWSimComponent#createVariables()
    • init

      protected void init()
      Initializes the fields by getting input and output FWSimVariables from VarMap
      Specified by:
      init in class net.simplace.sim.model.FWSimComponent
      See Also:
      • net.simplace.simulation.model.FWSimComponent#init()
    • process

      protected void process()
      Process the algorithm and write the results back to VarMap
      Specified by:
      process in class net.simplace.sim.model.FWSimComponent
      See Also:
      • net.simplace.simulation.model.FWSimComponent#process()
    • fillTestVariables

      public HashMap<String,net.simplace.sim.util.FWSimVariable<?>> fillTestVariables(int aParamIndex, net.simplace.sim.model.FWSimComponent.TEST_STATE aDefineOrCheck)
      called for single component test to check the components algorithm.
      Specified by:
      fillTestVariables in class net.simplace.sim.model.FWSimComponent
      See Also:
      • net.simplace.sim.util.FWSimFieldContainer#fillTestVariables(int aParamIndex, TEST_STATE aDefineOrCheck)
    • clone

      protected net.simplace.sim.model.FWSimComponent clone(net.simplace.sim.util.FWSimVarMap aVarMap)
      Specified by:
      clone in class net.simplace.sim.model.FWSimComponent
      See Also:
      • net.simplace.simulation.model.FWSimComponent#clone(net.simplace.simulation.util.FWSimVarMap)